|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.softsynth.jmsl.NonRealTimeMusicClock
public class NonRealTimeMusicClock
Clock runs as fast as possible, for non-realtime applications (like nonrealtime JSyn or loading a JavaSound Sequencer)
Constructor Summary | |
---|---|
NonRealTimeMusicClock()
|
Method Summary | |
---|---|
double |
getAdvance()
|
double |
getNativeRate()
Return rate of underlying native clock. |
long |
getNativeTicks()
Override this method to support other integer based clocks like JSyn's. |
double |
getRate()
|
double |
now()
Use this time when you want to schedule a Composable to start in the very near future. |
double |
realTime()
Use this time when you want to play something immediately. |
void |
setAdvance(double duration)
Set amount of time to wake up early. |
void |
setRate(double rate)
Set clock rate. |
void |
sleepUntil(double time)
Sleep until the specified time minus the advance time. |
void |
sleepUntilNative(long wakeupTicks)
Sleep until the specified native time. |
long |
timeToNative(double time)
Convert JMSL time to underlying native timer ticks. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public NonRealTimeMusicClock()
Method Detail |
---|
public long getNativeTicks()
MusicClock
getNativeTicks
in interface MusicClock
public double getNativeRate()
MusicClock
getNativeRate
in interface MusicClock
public double realTime()
realTime
in interface MusicClock
public double now()
now
in interface MusicClock
public void setAdvance(double duration)
setAdvance
in interface MusicClock
public double getAdvance()
getAdvance
in interface MusicClock
public long timeToNative(double time)
timeToNative
in interface MusicClock
public void sleepUntilNative(long wakeupTicks) throws java.lang.InterruptedException
sleepUntilNative
in interface MusicClock
java.lang.InterruptedException
- thrown if Thread.interrupt() called.public void sleepUntil(double time) throws java.lang.InterruptedException
sleepUntil
in interface MusicClock
java.lang.InterruptedException
- thrown if Thread.interrupt() called.
MOD PB 5/27/99 6:26PMpublic void setRate(double rate)
setRate
in interface MusicClock
public double getRate()
getRate
in interface MusicClock
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |