Package toxi.music
Class QuantizedTimeProvider
java.lang.Object
java.lang.Thread
toxi.music.QuantizedTimeProvider
- All Implemented Interfaces:
Runnable
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Thread
Thread.State, Thread.UncaughtExceptionHandler
-
Field Summary
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionint
double
double
getTempo()
double
int
getTicks()
int
int
void
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, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, onSpinWait, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, suspend, toString, yield
-
Constructor Details
-
QuantizedTimeProvider
public QuantizedTimeProvider(double tempo, int beats, int ticks)
-
-
Method Details
-
getBeatsPerBar
public int getBeatsPerBar()- Returns:
- the beatsPerBar
-
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() -
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
-