public class Static extends UGen
UGen
with a fixed value. Since the value is fixed, Static doesn't actually calculate anything, and overrides the methods getValue()
and getValue(int, int)
to return its fixed value.UGen.OutputInitializationRegime, UGen.OutputPauseRegime
Modifier and Type | Field and Description |
---|---|
float |
x
The stored value.
|
bufferSize, bufIn, bufOut, context, ins, outputInitializationRegime, outputPauseRegime, outs
Constructor and Description |
---|
Static(AudioContext context,
float x)
Instantiates a new Static with the given value.
|
Modifier and Type | Method and Description |
---|---|
void |
calculateBuffer()
Called by the signal chain to update this UGen's ouput data.
|
float |
getValue()
Gets the value of the buffer, assuming that the buffer only has one value.
|
float |
getValue(int a,
int b)
Gets a specific specified value from the output buffer, with indices i (channel)
and j (offset into buffer).
|
void |
setValue(float value)
Sets the value of
UGen.bufOut . |
addDependent, addInput, addInput, clearDependents, clearInputConnections, containsInput, crossfadeInput, getConnectedInputs, getContext, getEnvelopes, getIns, getNumberOfConnectedUGens, getNumberOfDependents, getOutBuffer, getOuts, getTimeTakenLastUpdate, getValueDouble, getValueDouble, initializeOuts, isTimerMode, isUpdated, noInputs, pause, printInBuffers, printInputList, printOutBuffers, removeAllConnections, removeConnection, removeDependent, setOutsToPause, setTimerMode, update, zeroIns, zeroOuts
getKillListener, getName, isDeleted, isPaused, kill, message, messageReceived, setKillListener, setName, start, toString
public Static(AudioContext context, float x)
context
- the AudioContext.x
- the value.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 void setValue(float value)
UGen
UGen.bufOut
. This is mainly a convenience method for use with Static
and Envelope
type UGens.public float getValue(int a, int b)
UGen
public float getValue()
UGen
Static
type UGens. It is equivalent to UGen.getValue(0, 0)
.