Package toxi.music

Class QuantizedTimeProvider

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

public class QuantizedTimeProvider extends Thread
  • Constructor Details

    • QuantizedTimeProvider

      public QuantizedTimeProvider(double tempo, int beats, int ticks)
  • Method Details

    • getBeatsPerBar

      public int getBeatsPerBar()
      Returns:
      the beatsPerBar
    • getDispatcher

      public 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 Runnable
      Overrides:
      run in class 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