org.jfugue.extras
Class DurationPatternTool

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

public class DurationPatternTool
extends PatternTool

Calculates the length of the given pattern, in pulses per quarter (PPQ)

Version:
2.0
Author:
David Koelle

Constructor Summary
DurationPatternTool()
           
 
Method Summary
 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 noteEvent(Note note)
          Called when the parser encounters an initial note event.
 void reset()
          Resets the variables in a subclass of PatternTool.
 void voiceEvent(Voice voice)
          Called when the parser encounters a voice event.
 
Methods inherited from class org.jfugue.PatternTool
execute
 
Methods inherited from class org.jfugue.ParserListenerAdapter
channelPressureEvent, controllerEvent, instrumentEvent, keySignatureEvent, layerEvent, measureEvent, parallelNoteEvent, pitchBendEvent, polyphonicPressureEvent, sequentialNoteEvent, tempoEvent, timeEvent
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DurationPatternTool

public DurationPatternTool()
Method Detail

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

noteEvent

public void noteEvent(Note note)
Description copied from class: ParserListenerAdapter
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

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

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