toxi.music
Class QuantizedTimeProvider

java.lang.Object
  extended by java.lang.Thread
      extended by toxi.music.QuantizedTimeProvider
All Implemented Interfaces:
java.lang.Runnable

public class QuantizedTimeProvider
extends java.lang.Thread


Nested Class Summary
 
Nested classes/interfaces inherited from class java.lang.Thread
java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler
 
Field Summary
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
QuantizedTimeProvider(double tempo, int beats, int ticks)
           
 
Method Summary
 int getBeatsPerBar()
           
 toxi.util.events.EventDispatcher<QuantizedTimeHandler> getDispatcher()
           
 double getTargetTempo()
           
 double getTempo()
           
 double getTempoChangeSpeed()
           
 int getTicks()
           
 int getTicksPerBar()
           
 int getTicksPerBeat()
           
 void makeHighPriority()
           
 void run()
           
 void setBeatsPerBar(int beatsPerBar)
           
 void setTargetTempo(double targetBPM)
           
 void setTempo(double bpm)
           
 void setTempoChangeSpeed(double tempoChangeSpeed)
           
 void setTicksPerBeat(int ticksPerBeat)
           
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

QuantizedTimeProvider

public QuantizedTimeProvider(double tempo,
                             int beats,
                             int ticks)
Method Detail

getBeatsPerBar

public int getBeatsPerBar()
Returns:
the beatsPerBar

getDispatcher

public toxi.util.events.EventDispatcher<QuantizedTimeHandler> getDispatcher()
Returns:
the dispatcher

getTargetTempo

public double getTargetTempo()
Returns:
the targetBPM

getTempo

public double getTempo()
Returns:
the bpm

getTempoChangeSpeed

public double getTempoChangeSpeed()
Returns:
the tempoChangeSpeed

getTicks

public int getTicks()
Returns:
the ticks

getTicksPerBar

public int getTicksPerBar()
Returns:
the ticksPerBar

getTicksPerBeat

public int getTicksPerBeat()
Returns:
the ticksPerBeat

makeHighPriority

public void makeHighPriority()

run

public void run()
Specified by:
run in interface java.lang.Runnable
Overrides:
run in class java.lang.Thread

setBeatsPerBar

public void setBeatsPerBar(int beatsPerBar)
Parameters:
beatsPerBar - the beatsPerBar to set

setTargetTempo

public void setTargetTempo(double targetBPM)
Parameters:
targetBPM - the targetBPM to set

setTempo

public void setTempo(double bpm)

setTempoChangeSpeed

public void setTempoChangeSpeed(double tempoChangeSpeed)
Parameters:
tempoChangeSpeed - the tempoChangeSpeed to set

setTicksPerBeat

public void setTicksPerBeat(int ticksPerBeat)
Parameters:
ticksPerBeat - the ticksPerBeat to set