I'm doing my first attempt at incorporating an animation into my GUI. The way it's intended to function is that while any midi note(s) is/are active, the animation ping pong loops. When all notes are released, I would like to switch the playbackMode to "reverse_once". Basically, the animation should only play while active voices are happening.
Is this possible? I was able to switch playbackMode on both note_on and note_off events, but the behavior is unpredictable because each note on/off sends another playbackMode switch. Does DS have any conditional logic to detect when no voices are active?