Package org.jjazz.midi.api.parser
Class MidiParserListenerAdapter
java.lang.Object
org.jjazz.midi.api.parser.MidiParserListenerAdapter
- All Implemented Interfaces:
MidiParserListener
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidCalled when the parser has parsed its last item.voidCalled when the parser first starts up, but before it starts parsing anything.voidonChannelChanged(byte channel) Called when the parser encounters a new channel. known as a Voice).voidonChannelPressureParsed(byte pressure, float positionInBeats) voidonControllerEventParsed(byte controller, byte value, float positionInBeats) voidonInstrumentParsed(byte instrument, float positionInBeats) Called when the parser encounters a new instrument selection.voidonLyricParsed(String lyric, float positionInBeats) voidonMarkerParsed(String marker, float positionInBeats) voidonMetaEndEvent(float positionInBeats) Called when the parser encounters the END META Event.voidonNoteParsed(Note note, float positionInBeats) voidonPitchWheelParsed(byte lsb, byte msb, float positionInBeats) voidonPolyphonicPressureParsed(byte key, byte pressure, float positionInBeats) voidonSystemExclusiveParsed(float positionInBeats, byte... bytes) voidonTempoChanged(int tempoBPM, float positionInBeats) Called when the parser encounters a new tempo selection.voidonTextParsed(String name, float positionInBeats) voidonTimeSignatureParsed(byte numerator, byte powerOfTwo, float positionInBeats) The first parameter is the number of beats per measure; The second parameter is the power by which 2 must be raised to create the note that represents one beat.voidonTrackNameParsed(String name, float positionInBeats)
-
Constructor Details
-
MidiParserListenerAdapter
public MidiParserListenerAdapter()
-
-
Method Details
-
beforeParsingStarts
public void beforeParsingStarts()Description copied from interface:MidiParserListenerCalled when the parser first starts up, but before it starts parsing anything. Provides listeners with a chance to initialize variables and get ready for the parser events.- Specified by:
beforeParsingStartsin interfaceMidiParserListener
-
afterParsingFinished
public void afterParsingFinished()Description copied from interface:MidiParserListenerCalled when the parser has parsed its last item. Provides listeners with a chance to clean up.- Specified by:
afterParsingFinishedin interfaceMidiParserListener
-
onChannelChanged
public void onChannelChanged(byte channel) Description copied from interface:MidiParserListenerCalled when the parser encounters a new channel. known as a Voice). Tracks correspond to MIDI tracks/channels.- Specified by:
onChannelChangedin interfaceMidiParserListener- Parameters:
channel- the new track event that has been parsed
-
onInstrumentParsed
public void onInstrumentParsed(byte instrument, float positionInBeats) Description copied from interface:MidiParserListenerCalled when the parser encounters a new instrument selection.- Specified by:
onInstrumentParsedin interfaceMidiParserListener- Parameters:
instrument- the MIDI instrument (program change) value that has been parsed
-
onTempoChanged
public void onTempoChanged(int tempoBPM, float positionInBeats) Description copied from interface:MidiParserListenerCalled when the parser encounters a new tempo selection.- Specified by:
onTempoChangedin interfaceMidiParserListener- Parameters:
tempoBPM- The new tempo value
-
onTimeSignatureParsed
public void onTimeSignatureParsed(byte numerator, byte powerOfTwo, float positionInBeats) Description copied from interface:MidiParserListenerThe first parameter is the number of beats per measure; The second parameter is the power by which 2 must be raised to create the note that represents one beat. Example 1: For a 5/8 time signature, expect 5,3 (since 2^3 = 8) Example 2: For a 4/4 time signature, expect 4,2 (since 2^2 = 4)- Specified by:
onTimeSignatureParsedin interfaceMidiParserListener
-
onPitchWheelParsed
public void onPitchWheelParsed(byte lsb, byte msb, float positionInBeats) - Specified by:
onPitchWheelParsedin interfaceMidiParserListener
-
onChannelPressureParsed
public void onChannelPressureParsed(byte pressure, float positionInBeats) - Specified by:
onChannelPressureParsedin interfaceMidiParserListener
-
onPolyphonicPressureParsed
public void onPolyphonicPressureParsed(byte key, byte pressure, float positionInBeats) - Specified by:
onPolyphonicPressureParsedin interfaceMidiParserListener
-
onSystemExclusiveParsed
public void onSystemExclusiveParsed(float positionInBeats, byte... bytes) - Specified by:
onSystemExclusiveParsedin interfaceMidiParserListener
-
onControllerEventParsed
public void onControllerEventParsed(byte controller, byte value, float positionInBeats) - Specified by:
onControllerEventParsedin interfaceMidiParserListener
-
onLyricParsed
- Specified by:
onLyricParsedin interfaceMidiParserListener
-
onTrackNameParsed
- Specified by:
onTrackNameParsedin interfaceMidiParserListener
-
onTextParsed
- Specified by:
onTextParsedin interfaceMidiParserListener
-
onMarkerParsed
- Specified by:
onMarkerParsedin interfaceMidiParserListener
-
onNoteParsed
- Specified by:
onNoteParsedin interfaceMidiParserListener
-
onMetaEndEvent
public void onMetaEndEvent(float positionInBeats) Description copied from interface:MidiParserListenerCalled when the parser encounters the END META Event.- Specified by:
onMetaEndEventin interfaceMidiParserListener
-