|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectedu.columbia.ee.csmit.MidiKaraoke.MidiMessage.RawMidiMessageParser
public class RawMidiMessageParser
This class provides the parse function to parse raw
javax.sound.midi.MidiMessage objects. For more information on the
javax.sound.midi package, visit the java API website. For more information
on the format and meaning of various midi messages, google
"midi file format." I personally found the website
http://faydoc.tripod.com/formats/mid.htm
very useful.
This call can parse most, but not necessarily all midi messages. You can add
to its capabilities by implementing a new Parser
for a new kind of midi message. Simply call addParser to
add your new parser before calling parse.
| Nested Class Summary | |
|---|---|
static interface |
RawMidiMessageParser.Parser
Defines a class that can parse some kind of midi message. |
| Field Summary | |
|---|---|
static byte |
CHANNEL_AFTER_TOUCH
|
static byte |
CONTINUE_STOPPED_SEQUENCE
|
static byte |
CONTROL_CHANGE
|
static byte |
COPYRIGHT_TEXT_EVENT
|
static byte |
CUE_POINT
|
static byte |
KEY_AFTER_TOUCH
|
static byte |
KEY_SIGNATURE
|
static byte |
LOWER_NIBBLE
|
static byte |
LYRIC
|
static byte |
MARKER
|
static byte |
META_EVENT
|
static byte |
NOTE_OFF
|
static byte |
NOTE_ON
|
static byte |
PITCH_WHEEL_CHANGE
|
static byte |
PROGRAM_CHANGE
|
static byte |
SEQUENCE_OR_TRACK_NAME
|
static byte |
SEQUENCER_SPECIFIC_INFORMATION
|
static byte |
SET_TEMPO
|
static byte |
SET_TRACK_SEQUENCE_NUMBER
|
static byte |
START_CURRENT_SEQUENCE
|
static byte |
STOP_A_SEQUENCE
|
static byte |
TEXT_EVENT
|
static byte |
TIME_SIGNATURE
|
static byte |
TIMING_CLOCK
|
static byte |
TRACK_END
|
static byte |
TRACK_INSTRUMENT_NAME
|
static byte |
UPPER_NIBBLE
|
| Constructor Summary | |
|---|---|
RawMidiMessageParser()
Creates a new RawMidiMessageParser. |
|
| Method Summary | |
|---|---|
void |
addParser(RawMidiMessageParser.Parser parser)
When (@link #parse} is called, it tries each of the parsers in its list in order until it finds a Parser what will parse the current MidiMessage. |
void |
addParsers(java.util.Collection<RawMidiMessageParser.Parser> parsers)
When (@link parse} is called, it tries each of the parsers in its list in order until it finds a Parser what will parse the current MidiMessage. |
MidiCommand |
parse(javax.sound.midi.MidiMessage mm)
Returns a parsed raw MidiMessage. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final byte UPPER_NIBBLE
public static final byte LOWER_NIBBLE
public static final byte NOTE_OFF
public static final byte NOTE_ON
public static final byte KEY_AFTER_TOUCH
public static final byte CONTROL_CHANGE
public static final byte PROGRAM_CHANGE
public static final byte CHANNEL_AFTER_TOUCH
public static final byte PITCH_WHEEL_CHANGE
public static final byte META_EVENT
public static final byte SET_TRACK_SEQUENCE_NUMBER
public static final byte TEXT_EVENT
public static final byte COPYRIGHT_TEXT_EVENT
public static final byte SEQUENCE_OR_TRACK_NAME
public static final byte TRACK_INSTRUMENT_NAME
public static final byte LYRIC
public static final byte MARKER
public static final byte CUE_POINT
public static final byte TRACK_END
public static final byte SET_TEMPO
public static final byte TIME_SIGNATURE
public static final byte KEY_SIGNATURE
public static final byte SEQUENCER_SPECIFIC_INFORMATION
public static final byte TIMING_CLOCK
public static final byte START_CURRENT_SEQUENCE
public static final byte CONTINUE_STOPPED_SEQUENCE
public static final byte STOP_A_SEQUENCE
| Constructor Detail |
|---|
public RawMidiMessageParser()
| Method Detail |
|---|
public void addParser(RawMidiMessageParser.Parser parser)
MidiMessage. This function adds a new RawMidiMessageParser.Parser to the beginning of the list of parsers. So, it will be the
first Parser parse tries.
parser - The new parser you want to add.addParsers(java.util.Collection) public void addParsers(java.util.Collection<RawMidiMessageParser.Parser> parsers)
MidiMessage. This function adds the new
collection of parsers to the front of its parser list in the same order
as the collection's iterator returns the parsers.
parsers - The new parsers you want to add.addParser(edu.columbia.ee.csmit.MidiKaraoke.MidiMessage.RawMidiMessageParser.Parser)public MidiCommand parse(javax.sound.midi.MidiMessage mm)
mm - the midi message you want to parse
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||