Package org.jjazz.midi.api.parser
Class MidiParser
java.lang.Object
org.jjazz.midi.api.parser.MidiParser
-
Nested Class Summary
-
Field Summary
Modifier and TypeFieldDescriptionstatic final byte
static final byte
static final byte
static final byte
static final byte
static final byte
static final byte
static final byte
static final byte
static final byte
static final byte
static final byte
static final byte
static final byte
static final byte
static final double
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addAuxilliaryMidiParser
(MidiParser.AuxilliaryMidiParser auxilliaryParser) void
addParserListener
(MidiParserListener listener) void
void
void
Parse the Midi sequence track by track and notifies the registered parsers.void
parseEvent
(MidiEvent event) Parses the following messages:
Note On events ,Note Off events ,Polyphonic Aftertouch ,Controller Events ,Program Change (instrument changes) ,Channel Aftertouch ,Pitch Wheel
Meta Events: Tempo, Lyric, Marker, Key Signature, Time Signature, Marker, Text, TrackName
SysEx Eventsvoid
removeAuxilliaryMidiParser
(MidiParser.AuxilliaryMidiParser auxilliaryParser) void
removeParserListener
(MidiParserListener listener)
-
Field Details
-
META_SEQUENCE_NUMBER
public static final byte META_SEQUENCE_NUMBER- See Also:
-
META_TEXT_EVENT
public static final byte META_TEXT_EVENT- See Also:
-
META_COPYRIGHT_NOTICE
public static final byte META_COPYRIGHT_NOTICE- See Also:
-
META_TRACK_NAME
public static final byte META_TRACK_NAME- See Also:
-
META_INSTRUMENT_NAME
public static final byte META_INSTRUMENT_NAME- See Also:
-
META_LYRIC
public static final byte META_LYRIC- See Also:
-
META_MARKER
public static final byte META_MARKER- See Also:
-
META_CUE_POINT
public static final byte META_CUE_POINT- See Also:
-
META_MIDI_CHANNEL_PREFIX
public static final byte META_MIDI_CHANNEL_PREFIX- See Also:
-
META_END_OF_TRACK
public static final byte META_END_OF_TRACK- See Also:
-
META_TEMPO
public static final byte META_TEMPO- See Also:
-
META_SMTPE_OFFSET
public static final byte META_SMTPE_OFFSET- See Also:
-
META_TIMESIG
public static final byte META_TIMESIG- See Also:
-
META_KEYSIG
public static final byte META_KEYSIG- See Also:
-
META_VENDOR
public static final byte META_VENDOR- See Also:
-
MS_PER_MIN
public static final double MS_PER_MIN- See Also:
-
-
Constructor Details
-
MidiParser
public MidiParser()
-
-
Method Details
-
parse
Parse the Midi sequence track by track and notifies the registered parsers.- Parameters:
sequence
-name
- Optional name use when logging errors. Can be null.
-
parseEvent
Parses the following messages:
Note On events ,Note Off events ,Polyphonic Aftertouch ,Controller Events ,Program Change (instrument changes) ,Channel Aftertouch ,Pitch Wheel
Meta Events: Tempo, Lyric, Marker, Key Signature, Time Signature, Marker, Text, TrackName
SysEx EventsAny other MIDI messages (particularly, other Meta Events) are not handled by this MidiParser.
You may implement an AuxilliaryMidiParser to know when MidiParser has parsed or not parsed a given MIDI message.
- Parameters:
event
- the event to parse- See Also:
-
addParserListener
-
removeParserListener
-
addAuxilliaryMidiParser
-
removeAuxilliaryMidiParser
-
fireBeforeParsingStarts
public void fireBeforeParsingStarts() -
fireAfterParsingFinished
public void fireAfterParsingFinished()
-