Package org.jfugue.tools
Class ComputeDurationForEachTrackTool
java.lang.Object
org.jfugue.parser.ParserListenerAdapter
org.jfugue.tools.ComputeDurationForEachTrackTool
- All Implemented Interfaces:
ParserListener
- Version:
- 5.0
- Author:
- David Koelle
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondouble[]
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
onTrackChanged
(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, onChordParsed, onControllerEventParsed, onFunctionParsed, onInstrumentParsed, onKeySignatureParsed, onLayerChanged, onLyricParsed, onMarkerParsed, onNotePressed, onNoteReleased, onPitchWheelParsed, onPolyphonicPressureParsed, onSystemExclusiveParsed, onTempoChanged, onTimeSignatureParsed, onTrackBeatTimeBookmarked, onTrackBeatTimeBookmarkRequested, onTrackBeatTimeRequested
-
Constructor Details
-
ComputeDurationForEachTrackTool
public ComputeDurationForEachTrackTool()
-
-
Method Details
-
onTrackChanged
public void onTrackChanged(byte track) Description copied from interface:ParserListener
Called 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:
onTrackChanged
in interfaceParserListener
- Overrides:
onTrackChanged
in classParserListenerAdapter
- Parameters:
track
- the new track event that has been parsed
-
onNoteParsed
Description copied from interface:ParserListener
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.- Specified by:
onNoteParsed
in interfaceParserListener
- Overrides:
onNoteParsed
in classParserListenerAdapter
- Parameters:
note
- The note that was parsed. Please see the Note class for more details about notes!- See Also:
-
getDurations
public double[] getDurations()
-