public interface ParserListener
Modifier and Type | Method and Description |
---|---|
void |
afterParsingFinished()
Called when the parser has parsed its last item.
|
void |
beforeParsingStarts()
Called when the parser first starts up, but before it starts parsing anything.
|
void |
onBarLineParsed(long id)
The separator character which indicates a bar line has been parsed.
|
void |
onChannelPressureParsed(byte pressure) |
void |
onChordParsed(Chord chord) |
void |
onControllerEventParsed(byte controller,
byte value) |
void |
onFunctionParsed(java.lang.String id,
java.lang.Object message) |
void |
onInstrumentParsed(byte instrument)
Called when the parser encounters a new instrument selection.
|
void |
onKeySignatureParsed(byte key,
byte scale) |
void |
onLayerChanged(byte layer)
Called when the parser encounters a new layer.
|
void |
onLyricParsed(java.lang.String lyric) |
void |
onMarkerParsed(java.lang.String marker) |
void |
onNoteParsed(Note note)
We may have actually parsed a musical note!
In previous versions of JFugue, ParserListener had separate listeners for parallel notes and sequential notes
(now termed harmonic and melodic notes, respectively)
In this version of JFugue, whether a note is the first note, a harmonic note, or a melodic note is kept
as a property on the Note object itself.
|
void |
onNotePressed(Note note)
Used to indicate when a note is pressed.
|
void |
onNoteReleased(Note note)
Used to indicate when a note is released.
|
void |
onPitchWheelParsed(byte lsb,
byte msb) |
void |
onPolyphonicPressureParsed(byte key,
byte pressure) |
void |
onSystemExclusiveParsed(byte... bytes) |
void |
onTempoChanged(int tempoBPM)
Called when the parser encounters a new tempo selection.
|
void |
onTimeSignatureParsed(byte numerator,
byte powerOfTwo)
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.
|
void |
onTrackBeatTimeBookmarked(java.lang.String timeBookmarkId) |
void |
onTrackBeatTimeBookmarkRequested(java.lang.String timeBookmarkId) |
void |
onTrackBeatTimeRequested(double time) |
void |
onTrackChanged(byte track)
Called when the parser encounters a new track (also known as a channel; previously in JFugue,
known as a Voice).
|
void beforeParsingStarts()
void afterParsingFinished()
void onTrackChanged(byte track)
track
- the new track event that has been parsedvoid onLayerChanged(byte layer)
newTrack
- the new track event that has been parsedoldTrack
- the previous track. The default value for oldTrack is 0.void onInstrumentParsed(byte instrument)
instrument
- the MIDI instrument value that has been parsedvoid onTempoChanged(int tempoBPM)
tempoBPM
- The new tempo valuevoid onKeySignatureParsed(byte key, byte scale)
void onTimeSignatureParsed(byte numerator, byte powerOfTwo)
void onBarLineParsed(long id)
id
- This is the id of the measure, which is an optional numeric value following the bar character.void onTrackBeatTimeBookmarked(java.lang.String timeBookmarkId)
void onTrackBeatTimeBookmarkRequested(java.lang.String timeBookmarkId)
void onTrackBeatTimeRequested(double time)
void onPitchWheelParsed(byte lsb, byte msb)
void onChannelPressureParsed(byte pressure)
void onPolyphonicPressureParsed(byte key, byte pressure)
void onSystemExclusiveParsed(byte... bytes)
void onControllerEventParsed(byte controller, byte value)
void onLyricParsed(java.lang.String lyric)
void onMarkerParsed(java.lang.String marker)
void onFunctionParsed(java.lang.String id, java.lang.Object message)
void onNotePressed(Note note)
void onNoteReleased(Note note)
void onNoteParsed(Note note)
note
- The note that was parsed. Please see the Note class for more details about notes!Note
void onChordParsed(Chord chord)