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:
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
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MidiParser
public MidiParser()
addMidiListener
public void addMidiListener(MidiListener listener)
removeMidiListener
public void removeMidiListener(MidiListener listener)
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)