com.softsynth.jmsl.jsyn
Class AllocatorFreeEvent

java.lang.Object
  extended by com.softsynth.jmsl.jsyn.AllocatorFreeEvent
All Implemented Interfaces:
ScheduledEvent

public class AllocatorFreeEvent
extends java.lang.Object
implements ScheduledEvent

This event can be posted in the future to free a SynthCircuit allocated by a jsyn.util.VoiceAllocator
For example, in a JMSL Instrument's play() method, you could post a free() the same JMSL time as a noteOff(), by calling freeVoice() NOTE: Scheduled playTime is JMSL time! But free() time is int JSyn time!!!
Not used by any JMSL classes.

Author:
Nick Didkovsky, 2/17/0

Constructor Summary
AllocatorFreeEvent(EventScheduler scheduler, com.softsynth.jsyn.util.VoiceAllocator allocator, com.softsynth.jsyn.SynthCircuit circuit)
           
 
Method Summary
static void freeVoice(double playTime, EventScheduler scheduler, com.softsynth.jsyn.util.VoiceAllocator allocator, com.softsynth.jsyn.SynthCircuit circuit)
          Post a free() in the future
 double getPlayTime()
           
 void play()
          Called by EventScheduler to cause event to happen.
 void setPlayTime(double playTime)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AllocatorFreeEvent

public AllocatorFreeEvent(EventScheduler scheduler,
                          com.softsynth.jsyn.util.VoiceAllocator allocator,
                          com.softsynth.jsyn.SynthCircuit circuit)
Method Detail

getPlayTime

public double getPlayTime()
Specified by:
getPlayTime in interface ScheduledEvent
Returns:
time that the event should occur.

setPlayTime

public void setPlayTime(double playTime)

play

public void play()
Description copied from interface: ScheduledEvent
Called by EventScheduler to cause event to happen.

Specified by:
play in interface ScheduledEvent

freeVoice

public static void freeVoice(double playTime,
                             EventScheduler scheduler,
                             com.softsynth.jsyn.util.VoiceAllocator allocator,
                             com.softsynth.jsyn.SynthCircuit circuit)
Post a free() in the future