1 | import { ToneAudioNode, ToneAudioNodeOptions } from "../../core/context/ToneAudioNode.js";
|
2 | import { Frequency } from "../../core/type/Units.js";
|
3 | import { Gain } from "../../core/context/Gain.js";
|
4 | export type OnePoleFilterType = "highpass" | "lowpass";
|
5 | export interface OnePoleFilterOptions extends ToneAudioNodeOptions {
|
6 | frequency: Frequency;
|
7 | type: OnePoleFilterType;
|
8 | }
|
9 |
|
10 |
|
11 |
|
12 |
|
13 |
|
14 |
|
15 |
|
16 |
|
17 |
|
18 |
|
19 | export declare class OnePoleFilter extends ToneAudioNode<OnePoleFilterOptions> {
|
20 | readonly name: string;
|
21 | |
22 |
|
23 |
|
24 | private _frequency;
|
25 | |
26 |
|
27 |
|
28 | private _type;
|
29 | |
30 |
|
31 |
|
32 | private _filter;
|
33 | readonly input: Gain;
|
34 | readonly output: Gain;
|
35 | |
36 |
|
37 |
|
38 |
|
39 | constructor(frequency?: Frequency, type?: OnePoleFilterType);
|
40 | constructor(options?: Partial<OnePoleFilterOptions>);
|
41 | static getDefaults(): OnePoleFilterOptions;
|
42 | /**
|
43 | * Create a filter and dispose the old one
|
44 | */
|
45 | private _createFilter;
|
46 | /**
|
47 | * The frequency value.
|
48 | */
|
49 | get frequency(): Frequency;
|
50 | set frequency(fq: Frequency);
|
51 | /**
|
52 | * The OnePole Filter type, either "highpass" or "lowpass"
|
53 | */
|
54 | get type(): OnePoleFilterType;
|
55 | set type(t: OnePoleFilterType);
|
56 | /**
|
57 | * Get the frequency response curve. This curve represents how the filter
|
58 | * responses to frequencies between 20hz-20khz.
|
59 | * @param len The number of values to return
|
60 | * @return The frequency response curve between 20-20kHz
|
61 | */
|
62 | getFrequencyResponse(len?: number): Float32Array;
|
63 | dispose(): this;
|
64 | }
|