I'm working on a drum instrument, and I've been driving myself crazy trying to implement this functionality.
Say I have a set of random round-robins for Tom 1 in one group tied to a MIDI note, in this case 42. This is working perfectly, however, I would like to choke the previous Tom 1 sample played when MIDI note 42 is struck again, so that the previous sample does not sustain through the next.
I've tried working with EVENT_ID and fade_out, but I'm a bit stuck. This is the code that I have so far:
on note
{*Tom1 RR*}
if ($EVENT_NOTE=$ART_Tom1)
fade_out(ALL_EVENTS, 1, 1) {*This is what I would like to change*}
change_note($EVENT_ID,%RRobin[$RRCount])
ignore_event($EVENT_ID)
disallow_group($ALL_GROUPS)
call rr_random
allow_group(find_group("Tom1"))
play_note($EVENT_NOTE,$EVENT_VELOCITY,0,-1)
end if
end on
Let me know if more information is needed, or if I haven't explained this properly. I know what I'm after, I'm just not sure how to articulate it properly.