public class FlangerEffect extends java.lang.Object implements AudioProcessor
Adds a flanger effect to a signal. The implementation is done with a delay buffer and an LFO in the form of a sine wave. It is probably the most straightforward flanger implementation possible.
| Constructor and Description |
|---|
FlangerEffect(double maxFlangerLength,
double wet,
double sampleRate,
double lfoFrequency) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
process(AudioEvent audioEvent)
Process the audio event.
|
void |
processingFinished()
Notify the AudioProcessor that no more data is available and processing
has finished.
|
void |
setDry(double dry)
Sets the wetness and wetness of the effect.
|
void |
setFlangerLength(double flangerLength)
Set the new length of the delay LineWavelet.
|
void |
setLFOFrequency(double lfoFrequency)
Sets the frequency of the LFO (sine wave), in Hertz.
|
void |
setWet(double wet)
Sets the wetness and dryness of the effect.
|
public FlangerEffect(double maxFlangerLength,
double wet,
double sampleRate,
double lfoFrequency)
maxFlangerLength - in secondswet - The 'wetness' of the flanging effect. A value between 0 and 1.
Zero meaning no flanging effect in the resulting signal, one
means total flanging effect and no original signal left. The
dryness of the signal is determined by dry = "1-wet".sampleRate - the sample rate in Hz.lfoFrequency - in Hertzpublic boolean process(AudioEvent audioEvent)
AudioProcessorprocess in interface AudioProcessoraudioEvent - The audio event that contains audio data.public void processingFinished()
AudioProcessorprocessingFinished in interface AudioProcessorpublic void setFlangerLength(double flangerLength)
flangerLength - The new length of the delay LineWavelet, in seconds.public void setLFOFrequency(double lfoFrequency)
lfoFrequency - The new LFO frequency in Hertz.public void setWet(double wet)
wet - A value between zero and one (inclusive) that determines the
wet and dryness of the resulting mix.public void setDry(double dry)
dry - A value between zero and one (inclusive) that determines the
wet and dryness of the resulting mix.