*/
public SmafEvent[] getIntervalSmafEvents() {
int interval = 0;
int track = 0;
MidiEvent midiEvent = midiTrack.get(midiEventIndex);
MidiMessage midiMessage = midiEvent.getMessage();
if (midiMessage instanceof ShortMessage) {
// note
ShortMessage shortMessage = (ShortMessage) midiMessage;
int channel = shortMessage.getChannel();
track = retrieveSmafTrack(channel);
interval = retrieveDelta(track, midiEvent.getTick());
} else if (midiMessage instanceof MetaMessage && ((MetaMessage) midiMessage).getType() == 81) {
// tempo
track = smafTrackNumber;
interval = retrieveDelta(track, midiEvent.getTick());
Debug.println("interval for tempo[" + smafTrackNumber + "]: " + interval);
} else if (midiMessage instanceof MetaMessage && ((MetaMessage) midiMessage).getType() == 47) {
// eot
track = smafTrackNumber;
interval = retrieveDelta(track, midiEvent.getTick());
Debug.println("interval for EOT[" + smafTrackNumber + "]: " + interval);
} else if (midiMessage instanceof SysexMessage) {
return null;
} else {
Debug.println(Level.WARNING, "not supported message: " + midiMessage);