HI,
I created a Track and added a few ControlChange events in ticks 0,96,192,288,384.
This corresponds to beat indicators in a resolution of 96 (PPQ).
I set the sequencer for a loop, starting at tick 0, and ending at tick 384.
While the sequencer is running, I sometimes set back the tick position using Sequencer.setTickPosition(...) to one of the beat points.
I also added a ControllerEventListener using Sequencer.addControllerEventListener(...) which listens on the mentioned ControlChange events.
What I see in debug logs printed by my listener, is that when I set the tick Position to say, 96, both the 0 and 96 events are being dispatched. I expected only the 96 one to fire. The 0 one is extra...
In fact, setting the tick position to any value from 1-96 (inclusive), causes the event created with tick 0 to fire.
If this is a feature and not a BUG, it is implied that a ControlChange has some kind of "sustain" until the next ControlChange, than at least I expect that setting the tick position to 0-95 (inclusive) would fire the 0 event, but at tick 96 there is already a different event.
BTW:
I am differentiating between the event but having them created with corresponding data1 argument set to (0,1,2,3,4).
Can anyone explain this weird behavior?