public class Delay extends UGen
UGen.InputType, UGen.UGenInput
Modifier and Type | Field and Description |
---|---|
UGen.UGenInput |
audio
audio is the incoming audio
|
UGen.UGenInput |
delAmp
delAmp is the strength of each repetition compared to the previous.
|
UGen.UGenInput |
delTime
delTime is the time for delay between repetitions.
|
Constructor and Description |
---|
Delay()
Constructor for Delay.
|
Delay(float maxDelayTime)
Constructor for Delay.
|
Delay(float maxDelayTime,
float amplitudeFactor)
Constructor for Delay.
|
Delay(float maxDelayTime,
float amplitudeFactor,
boolean feedBackOn)
Constructor for Delay.
|
Delay(float maxDelayTime,
float amplitudeFactor,
boolean feedBackOn,
boolean passAudioOn)
Constructor for Delay.
|
Modifier and Type | Method and Description |
---|---|
protected void |
sampleRateChanged()
When the sample rate is changed the buffer needs to be resized.
|
void |
setDelAmp(float delayAmplitude)
changes the feedback amplification of the echos.
|
void |
setDelTime(float delayTime)
changes the time in between the echos to the value specified.
|
protected void |
uGenerate(float[] channels)
Implement this method when you extend UGen.
|
addInput, getLastValues, patch, patch, patch, printInputs, removeInput, sampleRate, setAudioChannelCount, setSampleRate, tick, unpatch, unpatch
public UGen.UGenInput audio
public UGen.UGenInput delTime
public UGen.UGenInput delAmp
public Delay()
maxDelayTime
- is the maximum delay time for any one echo. This defaults to 0.25s.amplitudeFactor
- is the amplification factor for feedback and should generally be from 0 to 1.
This defaults to 0.5.feedBackOn
- is a boolean flag specifying if the repetition continue to feed back.
The default value is false.passAudioOn
- is a boolean value specifying whether to pass the input audio to the output as well.
This defaults to true.public Delay(float maxDelayTime)
maxDelayTime
- is the maximum delay time for any one echo.amplitudeFactor
- is the amplification factor for feedback and should generally be from 0 to 1.
This defaults to 0.5.feedBackOn
- is a boolean flag specifying if the repetition continue to feed back.
The default value is false.passAudio
- is a boolean value specifying whether to pass the input audio to the output as well.
This defaults to true.public Delay(float maxDelayTime, float amplitudeFactor)
maxDelayTime
- is the maximum delay time for any one echo and the default echo time.amplitudeFactor
- is the amplification factor for feedback and should generally be from 0 to 1.feedBackOn
- is a boolean flag specifying if the repetition continue to feed back.
The default value is false.passAudioOn
- is a boolean value specifying whether to pass the input audio to the output as well.
This defaults to true.public Delay(float maxDelayTime, float amplitudeFactor, boolean feedBackOn)
maxDelayTime
- is the maximum delay time for any one echo and the default echo time.amplitudeFactor
- is the amplification factor for feedback and should generally be from 0 to 1.feedBackOn
- is a boolean flag specifying if the repetition continue to feed back.passAudioOn
- is a boolean value specifying whether to pass the input audio to the output as well.
This defaults to true.public Delay(float maxDelayTime, float amplitudeFactor, boolean feedBackOn, boolean passAudioOn)
maxDelayTime
- is the maximum delay time for any one echo and the default echo time.amplitudeFactor
- is the amplification factor for feedback and should generally be from 0 to 1.feedBackOn
- is a boolean flag specifying if the repetition continue to feed back.passAudioOn
- is a boolean value specifying whether to pass the input audio to the output as well.protected void sampleRateChanged()
sampleRateChanged
in class UGen
public void setDelTime(float delayTime)
delTime
- It can be up to the maxDelayTime specified.
The lowest it can be is 1/sampleRate.public void setDelAmp(float delayAmplitude)
delayAmplitude
- This should normally be between 0 and 1 for decreasing feedback.
Phase inverted feedback can be generated with negative numbers, but each echa will be the inverse
of the one before it.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
.