All Packages Class Hierarchy This Package Previous Next Index
Class com.nosuch.midi.MidiFsm
java.lang.Object
|
+----com.nosuch.midi.MidiFsm
- public class MidiFsm
- extends Object
Finite State Machine for parsing incoming MIDI bytes.
-
MidiFsm(MidiAction)
- Construct a new Fsm.
-
parse(int)
- Parse a single MIDI byte.
MidiFsm
public MidiFsm(MidiAction a)
- Construct a new Fsm. The MidiAction object receives
method invocations as the MIDI messages are recognized
- Parameters:
- a - MidiAction object whose methods are invoked as callbacks.
parse
public void parse(int inbyte)
- Parse a single MIDI byte.
If it completes a MIDI message, the callback methods of the
MidiAction object are invoked. Calling parse(-1) will reset
the state machine.
- Parameters:
- inbyte - Input MIDI byte (or -1 to reset state machine).
All Packages Class Hierarchy This Package Previous Next Index