|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object ddf.minim.ugens.UGen ddf.minim.ugens.Gain
public class Gain
Gain is another way of expressing an increase or decrease in the volume of something. It is represented in decibels (dB), which is a logorithmic scale. A gain of 0 dB means that you are not changing the volume of the incoming signal at all, positive gain boosts the signal and negative gain decreases it. You can effectively silence the incoming signal by setting the gain to something like -60.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class ddf.minim.ugens.UGen |
---|
UGen.InputType, UGen.UGenInput |
Field Summary | |
---|---|
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 Summary | |
---|---|
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. |
Method Summary | |
---|---|
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. |
Methods inherited from class ddf.minim.ugens.UGen |
---|
addInput, getLastValues, patch, patch, patch, printInputs, removeInput, sampleRate, sampleRateChanged, setSampleRate, tick, unpatch, unpatch |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public UGen.UGenInput audio
public UGen.UGenInput gain
Constructor Detail |
---|
public Gain()
public Gain(float dBvalue)
dBvalue
- Method Detail |
---|
public void setValue(float dBvalue)
dBvalue
- 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
.
uGenerate
in class UGen
channels
- an array representing one sample frame.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |