public class MoogFilter extends UGen
frequency
input. Because this is a resonant
filter, it means that frequencies close to the cutoff of center frequency
will become slighly emphasized, depending on the value of the
resonance
input. The resonance of the filter has a
range from 0 to 1, where as the resonance approaches 1 the filter will
begin to "ring" at the cutoff frequency.Modifier and Type | Class and Description |
---|---|
static class |
MoogFilter.Type
The MoogFilter.Type enumeration is used to set
the filter mode of a MoogFilter.
|
UGen.InputType, UGen.UGenInput
Modifier and Type | Field and Description |
---|---|
UGen.UGenInput |
audio
The main audio input where the the UGen
you want to filter should be patched.
|
UGen.UGenInput |
frequency
The cutoff (or center) frequency of the filter,
expressed in Hz.
|
UGen.UGenInput |
resonance
The resonance of the filter, expressed as a normalized value [0,1].
|
MoogFilter.Type |
type
The current type of this filter: low pass, high pass, or band pass.
|
Constructor and Description |
---|
MoogFilter(float frequencyInHz,
float normalizedResonance)
Creates a low pass filter.
|
MoogFilter(float frequencyInHz,
float normalizedResonance,
MoogFilter.Type filterType)
Creates a filter of the type specified.
|
Modifier and Type | Method and Description |
---|---|
protected void |
channelCountChanged()
This method is only called when setChannelCount results in the channel count
of this UGen actually changing.
|
protected void |
uGenerate(float[] out)
Implement this method when you extend UGen.
|
addAudio, addControl, addControl, addInput, channelCount, getLastValues, patch, patch, patch, printInputs, removeInput, sampleRate, sampleRateChanged, setChannelCount, setSampleRate, tick, unpatch, unpatch
public UGen.UGenInput audio
public UGen.UGenInput frequency
public UGen.UGenInput resonance
public MoogFilter.Type type
public MoogFilter(float frequencyInHz, float normalizedResonance)
frequencyInHz
- float: the cutoff frequency for the filternormalizedResonance
- float: the resonance of the filter [0,1]public MoogFilter(float frequencyInHz, float normalizedResonance, MoogFilter.Type filterType)
frequencyInHz
- float: the cutoff frequency for the filternormalizedResonance
- float: the resonance of the filter [0,1]filterType
- the type of the filter: MoogFilter.Type.HP (high pass),
MoogFitler.Type.LP (low pass), or MoogFilter.Type.BP (band pass)protected void channelCountChanged()
UGen
channelCountChanged
in class UGen
protected void uGenerate(float[] out)
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
.