org.jfugue
Class DurationPatternTool

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

public class DurationPatternTool
extends ParserListenerAdapter

Calculates the length of the given pattern, in milliseconds

Version:
2.0, 4.0.2 - Changed from returning PPQ to milliseconds
Author:
David Koelle

Constructor Summary
DurationPatternTool()
           
 
Method Summary
 long getDuration()
           
 void noteEvent(Note note)
          Called when the parser encounters an initial note event.
 void reset()
           
 void voiceEvent(Voice voice)
          Called when the parser encounters a voice event.
 
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
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DurationPatternTool

public DurationPatternTool()
Method Detail

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()

getDuration

public long getDuration()