hi
I'm looking to do a simple reverse function on a sequence of MIDI messages, so need a way to change the time of a message.
At the moment, I get the time by looking at the EventHolder relating to the message, and can get the timestamp/time via
sequence.getEventTime(i);
but if I do a simple call like:
eventHolder->message.setTimeStamp(endTime - tmpTime);
just for the first message, then the whole sequence becomes unordered. The message timestamp itself () is not changed, eg:
when the endTime is 3840 and the first message is reversed the list appears:
print seq[7]: eventtime 3840, timestamp 0 (3) note on : 144, 48, 98 note off matches 8
print seq[8]: eventtime 264, timestamp 264 (3) note off: 128, 48, 64
print seq[9]: eventtime 490, timestamp 490 (3) note on : 144, 50, 98 note off matches 10
print seq[10]: eventtime 714, timestamp 714 (3) note off: 128, 50, 64
here eventtime is sequence.getEventTime(index) and the timestamp is event->message.getTimestamp()
what is the best way to reorder the timing of a single MIDI message in a MidiMessageSequence? and to ensure the event times in the sequence match the individual message timestamps?