|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.beadsproject.beads.core.Bead
net.beadsproject.beads.core.UGen
net.beadsproject.beads.ugens.DelayEvent
public abstract class DelayEvent
An abstract UGen that waits for a specified amount of time before "triggering"
(executing some code). The trigger()
method is called when the delay
time has elapsed. DelayEvent is the base class for DelayTrigger
(used to send
Bead messages) and DelayData
(used to send DataBeads).
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 | |
---|---|
DelayEvent(AudioContext context,
double delay)
Instantiates a new DelayEvent with the specified millisecond delay and receiver. |
|
DelayEvent(AudioContext context,
double delay,
boolean triggerAfter)
Instantiates a new DelayEvent with the specified millisecond delay and receiver. |
Method Summary | |
---|---|
void |
calculateBuffer()
Called by the signal chain to update this UGen's ouput data. |
double |
getCount()
Gets the current count. |
double |
getSampleDelay()
Gets the sample delay. |
boolean |
isTriggeredAfter()
Returns true if the DelayEvent is triggered during the frame
after the delay time expires; returns false if it is
triggered during the frame in which the delay time expires. |
void |
reset()
Reset timer to zero. |
DelayEvent |
setSampleDelay(float sampleDelay)
Sets the sample delay; this may cause the DelayEvent to trigger immediately. |
abstract void |
trigger()
Called when the delay time has elapsed. |
DelayEvent |
triggeredAfter(boolean f)
Sets whether the Delay event fires during the frame in which the delay time expires ( false , the default), or the frame after (
true ). |
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 |
---|
public DelayEvent(AudioContext context, double delay)
context
- The audio context.delay
- The delay time in milliseconds.receiver
- The receiver.public DelayEvent(AudioContext context, double delay, boolean triggerAfter)
triggerAfter
indicates whether the object is
triggered at the beginning of the frame in which the delay time elapses (
false
), or after (true
).
context
- The audio context.delay
- The delay in milliseconds.receiver
- The receiver.triggerAfter
- Whether the object fires just before or just after the delay
time expires.Method Detail |
---|
public void reset()
public void calculateBuffer()
UGen
UGen.bufIn
and putting data
into UGen.bufOut
in some way. UGen.bufIn
and UGen.bufOut
are 2D arrays of floats of the form float[numChannels][bufferSize]. The length of the buffers is given by
UGen.bufferSize
, and the number of channels of the input and output buffers are given by UGen.ins
and UGen.outs
respectively.
calculateBuffer
in class UGen
public abstract void trigger()
public double getSampleDelay()
public DelayEvent setSampleDelay(float sampleDelay)
sampleDelay
- The new sample delay in milliseconds.
public double getCount()
public boolean isTriggeredAfter()
true
if the DelayEvent is triggered during the frame
after the delay time expires; returns false
if it is
triggered during the frame in which the delay time expires.
public DelayEvent triggeredAfter(boolean f)
false
, the default), or the frame after (
true
).
f
- Whether to fire after the frame when the delay time expires.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |