org.jfugue
Class MidiParser
java.lang.Object
org.jfugue.Parser
org.jfugue.MidiParser
public final class MidiParser
- extends Parser
Parses MIDI data, whether from a file, a connected device, or some other stream.
- Version:
- 4.0.3 - A Note event with 0 duration is now sent when a note is first encountered
|
Method Summary |
void |
parse(javax.sound.midi.MidiMessage message,
long timestamp)
Delegator method that calls specific parsers depending on the
type of MidiMessage passed in. |
void |
parse(javax.sound.midi.Sequence sequence)
Parses a Sequence and fires events to subscribed ParserListener
interfaces. |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MidiParser
public MidiParser()
parse
public void parse(javax.sound.midi.Sequence sequence)
- Parses a
Sequence and fires events to subscribed ParserListener
interfaces. As the Sequence is parsed, events are sent
to ParserListener interfaces, which are responsible for doing
something interesting with the music data, such as adding notes to a pattern.
- Parameters:
sequence - the Sequence to parse
- Throws:
java.lang.Exception - if there is an error parsing the pattern
parse
public void parse(javax.sound.midi.MidiMessage message,
long timestamp)
- Delegator method that calls specific parsers depending on the
type of MidiMessage passed in.
- Parameters:
message - the message to parsetimestamp - the time at which the message was encountered in this track