|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.softsynth.jmsl.DefaultMusicClock
public class DefaultMusicClock
Default clock for JMSL uses Java millisecond timer.
| Constructor Summary | |
|---|---|
DefaultMusicClock()
|
|
| 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 DefaultMusicClock()
| Method Detail |
|---|
public long getNativeTicks()
MusicClock
getNativeTicks in interface MusicClockpublic double getNativeRate()
MusicClock
getNativeRate in interface MusicClockpublic double realTime()
realTime in interface MusicClockpublic double now()
now in interface MusicClockpublic void setAdvance(double duration)
setAdvance in interface MusicClockpublic double getAdvance()
getAdvance in interface MusicClockpublic long timeToNative(double time)
timeToNative in interface MusicClock
public void sleepUntilNative(long wakeupTicks)
throws java.lang.InterruptedException
sleepUntilNative in interface MusicClockjava.lang.InterruptedException - thrown if Thread.interrupt() called.
public void sleepUntil(double time)
throws java.lang.InterruptedException
sleepUntil in interface MusicClockjava.lang.InterruptedException - thrown if Thread.interrupt() called.
MOD PB 5/27/99 6:26PMpublic void setRate(double rate)
setRate in interface MusicClockpublic double getRate()
getRate in interface MusicClock
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||