Package com.softsynth.jmsl.jsyn2
Class JSyn2SynthClock
java.lang.Object
com.softsynth.jmsl.DefaultMusicClock
com.softsynth.jmsl.jsyn2.JSyn2SynthClock
- All Implemented Interfaces:
MusicClock
public class JSyn2SynthClock extends DefaultMusicClock
SynthClock to allow use of JSyn timers with JMSL
- Author:
- Phil Burk (C) 1997 Phil Burk, adapted to JSyn2 by N Didkovsky Jan 2013
-
Constructor Summary
Constructors Constructor Description JSyn2SynthClock()
-
Method Summary
Modifier and Type Method Description long
getNativeTicks()
Override this method to support other integer based clocks like JSyn's.void
sleepUntilNative(long wakeupTicks)
Sleep until the specified native time.Methods inherited from class com.softsynth.jmsl.DefaultMusicClock
getAdvance, getNativeRate, getRate, now, realTime, setAdvance, setRate, sleepUntil, timeToNative
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
JSyn2SynthClock
public JSyn2SynthClock()
-
-
Method Details
-
getNativeTicks
public long getNativeTicks()Description copied from interface:MusicClock
Override this method to support other integer based clocks like JSyn's.- Specified by:
getNativeTicks
in interfaceMusicClock
- Overrides:
getNativeTicks
in classDefaultMusicClock
-
sleepUntilNative
public void sleepUntilNative(long wakeupTicks) throws java.lang.InterruptedExceptionSleep until the specified native time.- Specified by:
sleepUntilNative
in interfaceMusicClock
- Overrides:
sleepUntilNative
in classDefaultMusicClock
- Throws:
java.lang.InterruptedException
- thrown if Thread.interrupt() called.
-