public interface NoteEventParser
NoteEventParser
is any class which can handle MIDI Note On and Note Off events.
These are normally passed to it by a MidiEventParser
.MidiNote noteOn(int key, int velocity, long tick, int channel)
key
- The key pressed. This will be a number between 1 and 88 for piano.velocity
- The velocity of the press. This is a value between 1 and 127 inclusive.tick
- The midi tick location of this event.channel
- The midi channel this note came from.void noteOff(int key, long tick, int channel) throws javax.sound.midi.InvalidMidiDataException
key
- The midi key which has been turned off. This value is between 39 and 127, inclusive, for piano.tick
- The midi tick location of this event.channel
- The midi channel this note came from.javax.sound.midi.InvalidMidiDataException
- If a note off event doesn't match any previously seen note on events.