I have this very simple script working fine below but it's only able to send note-offs for all note events. I want to be able to only send note-offs to note events of the same pitch as the note event with velocity = 1, the instant that note is played.
on init
declare polyphonic $v
declare polyphonic $notenumber
end on
on note
$v := get_event_par($EVENT_ID,$EVENT_PAR_VELOCITY)
$notenumber := get_event_par($EVENT_ID,$EVENT_NOTE)
if($v = 1)
note_off($ALL_EVENTS)
end if
end on
The $notenumber part of the script isn't doing anything but I want it to. Somehow I need to filter $ALL_EVENTS to only include note events of the same pitch as the velocity = 1 note.
Seems like it should be really simple and I'm just missing something basic. Thanks in advance!