import { Gain } from "../../core/context/Gain"; import { ToneAudioNode, ToneAudioNodeOptions } from "../../core/context/ToneAudioNode"; import { Cents, Decibels, Frequency, GainFactor, Positive } from "../../core/type/Units"; import { Signal } from "../../signal/Signal"; interface FilterOptions extends ToneAudioNodeOptions { type: BiquadFilterType; frequency: Frequency; rolloff: number; Q: Positive; detune: Cents; gain: GainFactor; } /** * Tone.Filter is a filter which allows for all of the same native methods * as the [BiquadFilterNode](http://webaudio.github.io/web-audio-api/#the-biquadfilternode-interface). * Tone.Filter has the added ability to set the filter rolloff at -12 * (default), -24 and -48. * @example * var filter = new Filter(200, "highpass"); * @category Component */ export declare class Filter extends ToneAudioNode { readonly name: string; readonly input: Gain; readonly output: Gain; private _filters; /** * the rolloff value of the filter */ private _rolloff; private _type; /** * The Q or Quality of the filter */ readonly Q: Signal; /** * The cutoff frequency of the filter. */ readonly frequency: Signal; /** * The detune parameter */ readonly detune: Signal; /** * The gain of the filter, only used in certain filter types */ readonly gain: Signal; /** * @param frequency The cutoff frequency of the filter. * @param type The type of filter. * @param rolloff The drop in decibels per octave after the cutoff frequency */ constructor(frequency?: Frequency, type?: BiquadFilterType, rolloff?: number); constructor(options?: Partial); static getDefaults(): FilterOptions; /** * The type of the filter. Types: "lowpass", "highpass", * "bandpass", "lowshelf", "highshelf", "notch", "allpass", or "peaking". */ type: BiquadFilterType; /** * The rolloff of the filter which is the drop in db * per octave. Implemented internally by cascading filters. * Only accepts the values -12, -24, -48 and -96. */ rolloff: number | string; /** * Get the frequency response curve. This curve represents how the filter * responses to frequencies between 20hz-20khz. * @param len The number of values to return * @return The frequency response curve between 20-20kHz */ getFrequencyResponse(len?: number): Float32Array; /** * Clean up. */ dispose(): this; } export {};