|
||||||||||
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.Summer
public class Summer
A Summer allows you to sum the outputs of multiple UGens to be sent further down the chain. Unlike most UGen effects, you can patch more than one UGen to a Summer.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class ddf.minim.ugens.UGen |
---|
UGen.InputType, UGen.UGenInput |
Constructor Summary | |
---|---|
Summer()
Constructs a Summer that you can patch multiple UGens to. |
|
Summer(AudioOutput output)
Don't use this constructor, it won't stay public. |
Method Summary | |
---|---|
protected void |
addInput(UGen input)
If you want to do something other than the default behavior when your UGen is patched to, you can override this method in your derived class. |
void |
generate(float[] mono)
Generates a buffer of samples by ticking this UGen mono.length times. |
void |
generate(float[] left,
float[] right)
Fills left and right with values in the range
of [-1, 1]. |
protected void |
removeInput(UGen input)
If you need to do something specific when something is unpatched from your UGen, you can override this method. |
protected void |
sampleRateChanged()
Override this method in your derived class to receive a notification when the sample rate of your UGen has changed. |
protected void |
uGenerate(float[] channels)
Implement this method when you extend UGen. |
Methods inherited from class ddf.minim.ugens.UGen |
---|
getLastValues, patch, patch, patch, printInputs, sampleRate, setSampleRate, tick, unpatch, unpatch |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Summer()
public Summer(AudioOutput output)
output
- Method Detail |
---|
protected void addInput(UGen input)
UGen
addInput
in class UGen
protected void removeInput(UGen input)
UGen
removeInput
in class UGen
protected void sampleRateChanged()
UGen
sampleRateChanged
in class UGen
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.public void generate(float[] mono)
generate
in interface AudioSignal
mono
- the float array to fillpublic void generate(float[] left, float[] right)
AudioSignal
left
and right
with values in the range
of [-1, 1]. left
represents the left channel of a stereo
signal, right
represents the right channel of that same
stereo signal.
generate
in interface AudioSignal
left
- the left channelright
- the right channel
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |