Package com.softsynth.jmsl.midi
Class MidiParser
java.lang.Object
com.softsynth.jmsl.midi.MidiParser
public class MidiParser
extends java.lang.Object
MidiParser.java
This class parses a Midi input stream. It maintains a Vector of classes who implement the MidiListener interface, and notifies each listener of each input event.
MidiParser and MidiListener currently supports the following:
This class parses a Midi input stream. It maintains a Vector of classes who implement the MidiListener interface, and notifies each listener of each input event.
MidiParser and MidiListener currently supports the following:
public void handleNoteOn(double timeStamp, int channel, int pitch, int velocity); public void handleNoteOff(double timeStamp, int channel, int pitch, int velocity); public void handlePolyphonicAftertouch(double timeStamp, int channel, int pitch, int pressure); public void handleControlChange(double timeStamp, int channel, int id, int value); public void handleProgramChange(double timeStamp, int channel, int program); public void handleChannelAftertouch(double timeStamp, int channel, int pressure); public void handlePitchBend(double timeStamp, int channel, int lsb, int msb); public void handleSysEx(double timeStamp, byte[] data); // only supported by MidiShare
- Author:
- Phil Burk and Nick Didkovsky
- See Also:
MidiListener
-
Constructor Summary
Constructors Constructor Description MidiParser()
-
Method Summary
Modifier and Type Method Description void
addMidiListener(MidiListener listener)
void
handleSysEx(double timeStamp, byte[] data)
SysEx message stored in data[].static void
main(java.lang.String[] args)
void
parseMessage(double timeStamp, byte[] buffer)
This method is called by a MIDI input device that might be getting data from a MIDI keyboard, or a standard MIDI file.void
removeMidiListener(MidiListener listener)
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
MidiParser
public MidiParser()
-
-
Method Details
-
addMidiListener
-
removeMidiListener
-
handleSysEx
public void handleSysEx(double timeStamp, byte[] data)SysEx message stored in data[]. data[] does NOT include start/stop SysEx codes (0xF0, 0xF7) -
parseMessage
public void parseMessage(double timeStamp, byte[] buffer)This method is called by a MIDI input device that might be getting data from a MIDI keyboard, or a standard MIDI file. -
main
public static void main(java.lang.String[] args)
-