org.jfugue.extras
Class GetPatternForVoiceTool

java.lang.Object
  extended by org.jfugue.ParserListenerAdapter
      extended by org.jfugue.PatternTool
          extended by org.jfugue.extras.GetPatternForVoiceTool
All Implemented Interfaces:
java.util.EventListener, ParserListener

public class GetPatternForVoiceTool
extends PatternTool

Returns all of the MusicString events that are played in the requested Voice (i.e., Channel)

Version:
3.0
Author:
David Koelle

Constructor Summary
GetPatternForVoiceTool(int voice)
           
 
Method Summary
 void channelPressureEvent(ChannelPressure channelPressure)
          Called when the parser encounters a channel pressure event.
 void controllerEvent(Controller controller)
          Called when the parser encounters a controller event.
 java.lang.String getDescription()
          Indicates what this PatternTool does.
 java.lang.Object getResult()
          Returns the result of the pattern tool after it has been executed on a pattern.
 void instrumentEvent(Instrument instrument)
          Called when the parser encounters an instrument event.
 void keySignatureEvent(KeySignature keySig)
          Key Signature changes affect the voice regardless of what voice they appear to be in
 void layerEvent(Layer layer)
          Called when the parser encounters a layer event.
static void main(java.lang.String[] args)
           
 void measureEvent(Measure measure)
          Called when the parser encounters a measure event.
 void noteEvent(Note note)
          Called when the parser encounters an initial note event.
 void parallelNoteEvent(Note note)
          Called when the parser encounters a parallel note event.
 void pitchBendEvent(PitchBend pitchBend)
          Called when the parser encounters a pitch bend event.
 void polyphonicPressureEvent(PolyphonicPressure polyphonicPressure)
          Called when the parser encounters a polyphonic pressure event.
 void reset()
          Resets the variables in a subclass of PatternTool.
 void sequentialNoteEvent(Note note)
          Called when the parser encounters a sequential note event.
 void tempoEvent(Tempo tempo)
          Tempo changes affect the voice regardless of what voice they appear to be in
 void timeEvent(Time time)
          Called when the parser encounters a time event.
 void voiceEvent(Voice voice)
          Called when the parser encounters a voice event.
 
Methods inherited from class org.jfugue.PatternTool
execute
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GetPatternForVoiceTool

public GetPatternForVoiceTool(int voice)
Method Detail

reset

public void reset()
Description copied from class: PatternTool
Resets the variables in a subclass of PatternTool. This method is called every time this class's execute() method is called.

Specified by:
reset in class PatternTool

getDescription

public java.lang.String getDescription()
Description copied from class: PatternTool
Indicates what this PatternTool does.

Overrides:
getDescription in class PatternTool
Returns:
A String giving a quick description of this tool

voiceEvent

public void voiceEvent(Voice voice)
Description copied from class: ParserListenerAdapter
Called when the parser encounters a voice event.

Specified by:
voiceEvent in interface ParserListener
Overrides:
voiceEvent in class ParserListenerAdapter
Parameters:
voice - the event that has been parsed
See Also:
Voice

tempoEvent

public void tempoEvent(Tempo tempo)
Tempo changes affect the voice regardless of what voice they appear to be in

Specified by:
tempoEvent in interface ParserListener
Overrides:
tempoEvent in class ParserListenerAdapter
Parameters:
tempo - the event that has been parsed
See Also:
Tempo

keySignatureEvent

public void keySignatureEvent(KeySignature keySig)
Key Signature changes affect the voice regardless of what voice they appear to be in

Specified by:
keySignatureEvent in interface ParserListener
Overrides:
keySignatureEvent in class ParserListenerAdapter
See Also:
KeySignature

instrumentEvent

public void instrumentEvent(Instrument instrument)
Called when the parser encounters an instrument event.

Specified by:
instrumentEvent in interface ParserListener
Overrides:
instrumentEvent in class ParserListenerAdapter
Parameters:
instrument - the event that has been parsed
See Also:
Instrument

layerEvent

public void layerEvent(Layer layer)
Called when the parser encounters a layer event.

Specified by:
layerEvent in interface ParserListener
Overrides:
layerEvent in class ParserListenerAdapter
Parameters:
layer - the event that has been parsed
See Also:
Layer

measureEvent

public void measureEvent(Measure measure)
Called when the parser encounters a measure event.

Specified by:
measureEvent in interface ParserListener
Overrides:
measureEvent in class ParserListenerAdapter
Parameters:
measure - the event that has been parsed
See Also:
Measure

timeEvent

public void timeEvent(Time time)
Called when the parser encounters a time event.

Specified by:
timeEvent in interface ParserListener
Overrides:
timeEvent in class ParserListenerAdapter
Parameters:
time - the event that has been parsed
See Also:
Time

controllerEvent

public void controllerEvent(Controller controller)
Called when the parser encounters a controller event.

Specified by:
controllerEvent in interface ParserListener
Overrides:
controllerEvent in class ParserListenerAdapter
Parameters:
controller - the event that has been parsed

channelPressureEvent

public void channelPressureEvent(ChannelPressure channelPressure)
Called when the parser encounters a channel pressure event.

Specified by:
channelPressureEvent in interface ParserListener
Overrides:
channelPressureEvent in class ParserListenerAdapter
Parameters:
channelPressure - the event that has been parsed
See Also:
ChannelPressure

polyphonicPressureEvent

public void polyphonicPressureEvent(PolyphonicPressure polyphonicPressure)
Called when the parser encounters a polyphonic pressure event.

Specified by:
polyphonicPressureEvent in interface ParserListener
Overrides:
polyphonicPressureEvent in class ParserListenerAdapter
Parameters:
polyphonicPressure - the event that has been parsed
See Also:
PolyphonicPressure

pitchBendEvent

public void pitchBendEvent(PitchBend pitchBend)
Called when the parser encounters a pitch bend event.

Specified by:
pitchBendEvent in interface ParserListener
Overrides:
pitchBendEvent in class ParserListenerAdapter
Parameters:
pitchBend - the event that has been parsed
See Also:
PitchBend

noteEvent

public void noteEvent(Note note)
Called when the parser encounters an initial note event.

Specified by:
noteEvent in interface ParserListener
Overrides:
noteEvent in class ParserListenerAdapter
Parameters:
note - the event that has been parsed
See Also:
Note

sequentialNoteEvent

public void sequentialNoteEvent(Note note)
Called when the parser encounters a sequential note event.

Specified by:
sequentialNoteEvent in interface ParserListener
Overrides:
sequentialNoteEvent in class ParserListenerAdapter
Parameters:
note - the event that has been parsed
See Also:
Note

parallelNoteEvent

public void parallelNoteEvent(Note note)
Called when the parser encounters a parallel note event.

Specified by:
parallelNoteEvent in interface ParserListener
Overrides:
parallelNoteEvent in class ParserListenerAdapter
Parameters:
note - the event that has been parsed
See Also:
Note

getResult

public java.lang.Object getResult()
Description copied from class: PatternTool
Returns the result of the pattern tool after it has been executed on a pattern.

Specified by:
getResult in class PatternTool
Returns:
the result of executing this pattern tool on a pattern

main

public static final void main(java.lang.String[] args)