I tried implementing this script I found for poly aftertouch cymbal choking from EvilDragon, and it sort of works. The issue, however, is that it doesn't totally kill the voice, it just reduces it in volume. The sample continues playing at this reduced volume. I've implemented it verbatim, and I'm a bit stumped.
on init
declare const $NUM_CYMBALS := 4
declare const $FADE_OUT_TIME := 20000
declare $search_cymbal
declare %cymbal_keys[$NUM_CYMBALS] := (49, 52, 55, 57)
end on
on note
$search_cymbal := search(%cymbal_keys, $EVENT_NOTE)
if ($search_cymbal # -1)
set_event_mark($EVENT_ID, sh_left($MARK_1, $search_cymbal))
end if
end on
on poly_at
$search_cymbal := search(%cymbal_keys, $POLY_AT_NUM)
if ($search_cymbal # -1)
fade_out(by_marks(sh_left($MARK_1, $search_cymbal)), $FADE_OUT_TIME, 1)
end if
end on