com.softsynth.jmsl.jsyn
Class SynthClock

java.lang.Object
  extended by com.softsynth.jmsl.DefaultMusicClock
      extended by com.softsynth.jmsl.jsyn.SynthClock
All Implemented Interfaces:
MusicClock

public class SynthClock
extends DefaultMusicClock

SynthClock to allow use of JSyn timers with JMSL

Author:
Phil Burk (C) 1997 Phil Burk

Constructor Summary
SynthClock()
           
 
Method Summary
 double getNativeRate()
          Return rate of underlying native clock.
 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, getRate, now, realTime, setAdvance, setRate, sleepUntil, timeToNative
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SynthClock

public SynthClock()
Method Detail

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 interface MusicClock
Overrides:
getNativeTicks in class DefaultMusicClock

getNativeRate

public double getNativeRate()
Description copied from interface: MusicClock
Return rate of underlying native clock.

Specified by:
getNativeRate in interface MusicClock
Overrides:
getNativeRate in class DefaultMusicClock

sleepUntilNative

public void sleepUntilNative(long wakeupTicks)
                      throws java.lang.InterruptedException
Sleep until the specified native time.

Specified by:
sleepUntilNative in interface MusicClock
Overrides:
sleepUntilNative in class DefaultMusicClock
Throws:
java.lang.InterruptedException - thrown if Thread.interrupt() called.