Package org.jfugue.integration
Class LilyPondParserListener
- java.lang.Object
-
- org.jfugue.parser.ParserListenerAdapter
-
- org.jfugue.integration.LilyPondParserListener
-
- All Implemented Interfaces:
ParserListener
public class LilyPondParserListener extends ParserListenerAdapter
This class listens to events from the MusicString parser. In response to this events, a Lilypond string is produced. The Lilypond string is produced with relative octave notation.- Author:
- Hans Beemsterboer
-
-
Constructor Summary
Constructors Constructor Description LilyPondParserListener()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetLyString()voidonChordParsed(Chord chord)voidonInstrumentParsed(byte instrument)Called when the parser encounters a new instrument selection.voidonNoteParsed(Note note2)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.voidonTrackChanged(byte track)Called when the parser encounters a new track (also known as a channel; previously in JFugue, known as a Voice).-
Methods inherited from class org.jfugue.parser.ParserListenerAdapter
afterParsingFinished, beforeParsingStarts, onBarLineParsed, onChannelPressureParsed, onControllerEventParsed, onFunctionParsed, onKeySignatureParsed, onLayerChanged, onLyricParsed, onMarkerParsed, onNotePressed, onNoteReleased, onPitchWheelParsed, onPolyphonicPressureParsed, onSystemExclusiveParsed, onTempoChanged, onTimeSignatureParsed, onTrackBeatTimeBookmarked, onTrackBeatTimeBookmarkRequested, onTrackBeatTimeRequested
-
-
-
-
Method Detail
-
onTrackChanged
public void onTrackChanged(byte track)
Description copied from interface:ParserListenerCalled when the parser encounters a new track (also known as a channel; previously in JFugue, known as a Voice). Tracks correspond to MIDI tracks/channels.- Specified by:
onTrackChangedin interfaceParserListener- Overrides:
onTrackChangedin classParserListenerAdapter- Parameters:
track- the new track event that has been parsed
-
onInstrumentParsed
public void onInstrumentParsed(byte instrument)
Description copied from interface:ParserListenerCalled when the parser encounters a new instrument selection.- Specified by:
onInstrumentParsedin interfaceParserListener- Overrides:
onInstrumentParsedin classParserListenerAdapter- Parameters:
instrument- the MIDI instrument value that has been parsed
-
onNoteParsed
public void onNoteParsed(Note note2)
Description copied from interface:ParserListenerWe 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.- Specified by:
onNoteParsedin interfaceParserListener- Overrides:
onNoteParsedin classParserListenerAdapter- Parameters:
note2- The note that was parsed. Please see the Note class for more details about notes!- See Also:
Note
-
onChordParsed
public void onChordParsed(Chord chord)
- Specified by:
onChordParsedin interfaceParserListener- Overrides:
onChordParsedin classParserListenerAdapter
-
getLyString
public java.lang.String getLyString()
-
-