*/
public int getDuration() {
if (!hasNoteOffEvent()) return 0;
- return (int)(getTick() - noteOffEvent.getTick());
+ return (int)(noteOffEvent.getTick() - getTick());
}
/**
* @return the note off MidiEvent
*/
public boolean hasNoteOffEvent() {
- return noteOffEvent == null;
+ return noteOffEvent != null;
}
}
\ No newline at end of file