public class Gain extends UGen
UGen.InputType, UGen.UGenInput
Modifier and Type | Field and Description |
---|---|
UGen.UGenInput |
audio
The audio input is where incoming signals should be patched, however you do not need
to patch directly to this input because patching to the Gain itself will accomplish
the same thing.
|
UGen.UGenInput |
gain
The gain input controls the value of this Gain.
|
Constructor and Description |
---|
Gain()
Construct a Gain UGen with a value of 0 dB, which means
it will not change the volume of something patched to it.
|
Gain(float dBvalue)
Construct a Gain with the specific dBvalue.
|
Modifier and Type | Method and Description |
---|---|
void |
setValue(float dBvalue)
Set the value of this Gain to a given dB value.
|
protected void |
uGenerate(float[] channels)
Implement this method when you extend UGen.
|
addAudio, addControl, addControl, addInput, channelCount, channelCountChanged, getLastValues, patch, patch, patch, printInputs, removeInput, sampleRate, sampleRateChanged, setChannelCount, setSampleRate, tick, unpatch, unpatch
public UGen.UGenInput audio
public UGen.UGenInput gain
public Gain()
public Gain(float dBvalue)
dBvalue
- float: the amount of gain to apply to the incoming signalpublic void setValue(float dBvalue)
dBvalue
- float: the new value for this Gain, in decibels.protected void uGenerate(float[] channels)
UGen
getLastValues
method of your audio UGenInput to
retrieve the audio you want to modify, which you will then modify however
you need to, assigning the result to the values in channels
.