net.beadsproject.beads.ugens
Class DelayTrigger

java.lang.Object
  extended by net.beadsproject.beads.core.Bead
      extended by net.beadsproject.beads.core.UGen
          extended by net.beadsproject.beads.ugens.DelayEvent
              extended by net.beadsproject.beads.ugens.DelayTrigger

public class DelayTrigger
extends DelayEvent

A DelayTrigger waits for a specified duration and then notifies a receiver.

Version:
0.9.5
Author:
ollie, Benito Crawford

Nested Class Summary
 
Nested classes/interfaces inherited from class net.beadsproject.beads.core.UGen
UGen.OutputInitializationRegime, UGen.OutputPauseRegime
 
Field Summary
 
Fields inherited from class net.beadsproject.beads.core.UGen
bufferSize, bufIn, bufOut, context, ins, outputInitializationRegime, outputPauseRegime, outs
 
Constructor Summary
DelayTrigger(AudioContext context, double delay, Bead receiver)
          Instantiates a new DelayTrigger with the specified millisecond delay and receiver.
DelayTrigger(AudioContext context, double delay, Bead receiver, Bead message)
          Instantiates a new DelayTrigger with the specified millisecond delay, receiver, and message.
 
Method Summary
 Bead getMessage()
          Gets the message Bead that will be sent when the DelayMessage fires.
 Bead getReceiver()
          Gets this DelayMessage's receiver.
 DelayTrigger setMessage(Bead message)
          Sets the message to send when the DelayMessage fires.
 DelayTrigger setReceiver(Bead receiver)
          Sets this DelayMessage's receiver.
 void trigger()
          Called when the delay time has elapsed.
 
Methods inherited from class net.beadsproject.beads.ugens.DelayEvent
calculateBuffer, getCount, getSampleDelay, isTriggeredAfter, reset, setSampleDelay, triggeredAfter
 
Methods inherited from class net.beadsproject.beads.core.UGen
addDependent, addInput, addInput, clearDependents, clearInputConnections, containsInput, crossfadeInput, getConnectedInputs, getContext, getEnvelopes, getIns, getNumberOfConnectedUGens, getNumberOfDependents, getOutBuffer, getOuts, getTimeTakenLastUpdate, getValue, getValue, getValueDouble, getValueDouble, initializeOuts, isTimerMode, isUpdated, noInputs, pause, printInBuffers, printInputList, printOutBuffers, removeAllConnections, removeConnection, removeDependent, setOutsToPause, setTimerMode, setValue, update, zeroIns, zeroOuts
 
Methods inherited from class net.beadsproject.beads.core.Bead
getKillListener, getName, isDeleted, isPaused, kill, message, messageReceived, setKillListener, setName, start, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DelayTrigger

public DelayTrigger(AudioContext context,
                    double delay,
                    Bead receiver)
Instantiates a new DelayTrigger with the specified millisecond delay and receiver. By default, a DelayTrigger object will send itself as the message.

Parameters:
context - the AudioContext.
delay - the delay in milliseconds.
receiver - the receiver.

DelayTrigger

public DelayTrigger(AudioContext context,
                    double delay,
                    Bead receiver,
                    Bead message)
Instantiates a new DelayTrigger with the specified millisecond delay, receiver, and message.

Parameters:
context - The audio context.
delay - The delay in milliseconds.
receiver - The receiver.
Method Detail

trigger

public void trigger()
Description copied from class: DelayEvent
Called when the delay time has elapsed. Implement this method with code to be executed after the delay.

Specified by:
trigger in class DelayEvent

getReceiver

public Bead getReceiver()
Gets this DelayMessage's receiver.

Returns:
the receiver.

setReceiver

public DelayTrigger setReceiver(Bead receiver)
Sets this DelayMessage's receiver.

Parameters:
receiver - the new receiver.
Returns:
This DelayMessage instance.

getMessage

public Bead getMessage()
Gets the message Bead that will be sent when the DelayMessage fires.

Returns:
The message Bead.

setMessage

public DelayTrigger setMessage(Bead message)
Sets the message to send when the DelayMessage fires.

Parameters:
message - The message Bead.
Returns:
This DelayMessage instance.