Just updated to the latest and it works (ignoring event_id ignores input).
Just having a logic problem in my script (My issue, not the sampler)

When I put in the full parameters for play_note and tell it to keep the
same note_off value for the original note, in 'case 0', the $event_note is
played correctly, but in 'case 1', the $event_note and $event_note + 5 get
played the same time. I thought I had told ignore_event to ignore the
initial note?

If I ignore event_id, the whole instrument because silent (well, this is
the correct behaviour of course :D )


--

On a related note, it seems that 'change_note' in ksp could achieve the
desired effect of transposing incoming notes:

"The values of $EVENT_NOTE and $EVENT_VELOCITY can be changed by using the
following functions:

change_note(<ID-number>,<new-note-number>)

change the note value of a specific note event

change_velo(<ID-number>,<new-velocity-number>)
change the velocity value of a specific note event"

Andrew.

on init
declare polyphonic $alt
end on

on note
ignore_event($EVENT_NOTE)

message("Alt is: " & $alt)

select $alt

case 0
play_note($EVENT_NOTE, $EVENT_VELOCITY, 0, -1)
message("Root note")
$alt := 1
case 1
play_note($EVENT_NOTE+5, $EVENT_VELOCITY, 0, -1)
message("Transposed")
$alt := 0
end select

end on

On Wed, May 24, 2017 at 9:12 PM, Christian Schoenebeck <
schoeneb...@linuxsampler.org> wrote:

> On Wednesday, May 24, 2017 15:30:12 Andrew C wrote:
> > One question, how does "ignore_event" work? I RTFM and it says it can be
> > used to ignore MIDI note-on and note-off commands before they're
> triggered.
> > I would imagine this *should* make the current note in $EVENT_ID not be
> > played, but when I click on the piano in gigedit/jsampler, the note plays
> > anyway.
> >
> > note_off($EVENT_ID) in a "on note" block causes linuxsampler to segfault
> > too. :\
>
> I haven't tried your script yet. However I just fixed a bunch of event
> scheduling bugs which might potentially be related to what you
> encountered. So
> please update LS to latest SVN and try again. If the script still does not
> work as expected, let me know!
>
> CU
> Christian
>
> ------------------------------------------------------------
> ------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> _______________________________________________
> Linuxsampler-devel mailing list
> Linuxsampler-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/linuxsampler-devel
>
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Linuxsampler-devel mailing list
Linuxsampler-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linuxsampler-devel

Reply via email to