AutoFilter
class Effect ↳ extends LFOEffect<AutoFilterOptions>
AutoFilter is a Tone.Filter with a Tone.LFO connected to the filter cutoff frequency. Setting the LFO rate and depth allows for control over the filter modulation rate and depth.
// create an autofilter and start its LFO
const autoFilter = new Tone.AutoFilter("4n").toDestination().start();
// route an oscillator through the filter and start it
const oscillator = new Tone.Oscillator().connect(autoFilter).start();Constructor
Section titled “Constructor”Parameters
new AutoFilter(options?: Partial<AutoFilterOptions>)Parameters
- options
Partial<AutoFilterOptions>optional
Properties
Section titled “Properties”read-only ↳ inherited from LFOEffect
depth: Param<"normalRange">The range of the filter modulating between the min and max frequency. 0 = no modulation. 1 = full modulation.
frequency
Section titled “frequency”read-only ↳ inherited from LFOEffect
frequency: Signal<"frequency">How fast the filter modulates between min and max.
↳ inherited from Effect
wet: Signal<"normalRange">The wet control is how much of the effected will pass through to the output. 1 = 100% effected signal, 0 = 100% dry signal.
baseFrequency
Section titled “baseFrequency”baseFrequency: FrequencyThe minimum value of the filter’s cutoff frequency.
↳ inherited from LFOEffect
type: ToneOscillatorTypeThe type of the LFO’s oscillator.
const autoFilter = new Tone.AutoFilter().start().toDestination(); const noise = new Tone.Noise().start().connect(autoFilter); autoFilter.type = "square";
See also: Oscillator.type
Methods
Section titled “Methods”start()
Section titled “start()”↳ inherited from LFOEffect
start(time?: Time): thisStart the effect.
Parameters
- time
Timeoptional
Returns this
stop()
Section titled “stop()”↳ inherited from LFOEffect
stop(time?: Time): thisStop the lfo
Parameters
- time
Timeoptional
Returns this
sync()
Section titled “sync()”↳ inherited from LFOEffect
sync(): thisSync the filter to the transport.
See also: LFO.sync
Returns this
unsync()
Section titled “unsync()”↳ inherited from LFOEffect
unsync(): thisUnsync the filter from the transport.
Returns this
getDefaults()
Section titled “getDefaults()”static
getDefaults(): AutoFilterOptionsReturns all of the default options belonging to the class.
Returns AutoFilterOptions
Inherited members
Section titled “Inherited members”- From
ToneWithContext: context, blockTime, sampleTime, get(), immediate(), now(), set(), toFrequency(), toSeconds(), toTicks() - From
Tone: debug, version, disposed, toString() - From
ToneAudioNode: channelCount, channelCountMode, channelInterpretation, numberOfInputs, numberOfOutputs, chain(), connect(), disconnect(), fan(), toDestination(), toMaster()