Package org.jfugue.tools
Class GetInstrumentsUsedTool
java.lang.Object
org.jfugue.parser.ParserListenerAdapter
org.jfugue.tools.GetInstrumentsUsedTool
- All Implemented Interfaces:
ParserListener
Returns a List containing all of the instruments used in the given pattern.
This is especially useful for loading instruments from a soundbank, to make sure
you only load instruments that are needed by the pattern.
- Version:
- 4.0
- Author:
- David Koelle
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetInstrumentsUsedInPattern
(PatternProducer patternProducer) void
onInstrumentParsed
(byte instrument) Called when the parser encounters a new instrument selection.Methods inherited from class org.jfugue.parser.ParserListenerAdapter
afterParsingFinished, beforeParsingStarts, onBarLineParsed, onChannelPressureParsed, onChordParsed, onControllerEventParsed, onFunctionParsed, onKeySignatureParsed, onLayerChanged, onLyricParsed, onMarkerParsed, onNoteParsed, onNotePressed, onNoteReleased, onPitchWheelParsed, onPolyphonicPressureParsed, onSystemExclusiveParsed, onTempoChanged, onTimeSignatureParsed, onTrackBeatTimeBookmarked, onTrackBeatTimeBookmarkRequested, onTrackBeatTimeRequested, onTrackChanged
-
Constructor Details
-
GetInstrumentsUsedTool
public GetInstrumentsUsedTool()
-
-
Method Details
-
onInstrumentParsed
public void onInstrumentParsed(byte instrument) Description copied from interface:ParserListener
Called when the parser encounters a new instrument selection.- Specified by:
onInstrumentParsed
in interfaceParserListener
- Overrides:
onInstrumentParsed
in classParserListenerAdapter
- Parameters:
instrument
- the MIDI instrument value that has been parsed
-
getInstrumentsUsedInPattern
-