Skip to Main Content

Java SE (Java Platform, Standard Edition)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Bug when using Sequencer.setTickPosition() ?

8dadb8c4-07e9-45ef-a78a-74ae3f41898eJan 29 2015 — edited Jan 29 2015

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?

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Feb 26 2015
Added on Jan 29 2015
0 comments
843 views