T - The type of UGen being wrapped, like GranulateSteady.public class Bypass<T extends UGen> extends UGen
Your usage of Bypass might look something like this:
Bypass granulate = new Bypass( new GranulateSteady() ); filePlayer.patch( granulate ).patch( mainOut );
If you needed to patch something else to one of the inputs of the GranulateSteady,
you'd use the ugen method of Bypass to retrieve the wrapped UGen
and operate on it:
grainLenLine.patch( granulate.ugen().grainLen );
Now, calling the activate method will bypass the granulate effect
so that the Bypass object outputs the audio that is coming into it. Calling the
deactivate method will route the audio through the wrapped effect. The
isActive method indicates whether or not the wrapped effect is currently
being bypassed.
UGen.InputType, UGen.UGenInput| Constructor and Description |
|---|
Bypass(T ugen)
Construct a Bypass UGen that wraps a UGen of type T.
|
| Modifier and Type | Method and Description |
|---|---|
void |
activate()
Activate the bypass functionality.
|
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 |
deactivate()
Deactivate the bypass functionality.
|
boolean |
isActive() |
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.
|
void |
setAudioChannelCount(int channelCount)
Let this UGen know how many channels of audio you will be asking it for.
|
T |
ugen() |
protected void |
uGenerate(float[] channels)
Implement this method when you extend UGen.
|
getLastValues, patch, patch, patch, printInputs, sampleRate, setSampleRate, tick, unpatch, unpatchpublic Bypass(T ugen)
ugen - public T ugen()
protected void sampleRateChanged()
UGensampleRateChanged in class UGenprotected void addInput(UGen input)
UGenprotected void removeInput(UGen input)
UGenremoveInput in class UGenpublic void setAudioChannelCount(int channelCount)
UGensetAudioChannelCount in class UGenchannelCount - how many channels of audio you will be generating with this
UGenpublic void activate()
public void deactivate()
public boolean isActive()
protected void uGenerate(float[] channels)
UGengetLastValues 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.