1 | import { Frequency, NormalRange, Time } from "../core/type/Units.js";
|
2 | import { RecursivePartial } from "../core/util/Interface.js";
|
3 | import { Instrument, InstrumentOptions } from "./Instrument.js";
|
4 | export interface PluckSynthOptions extends InstrumentOptions {
|
5 | attackNoise: number;
|
6 | dampening: Frequency;
|
7 | resonance: NormalRange;
|
8 | release: Time;
|
9 | }
|
10 |
|
11 |
|
12 |
|
13 |
|
14 |
|
15 |
|
16 |
|
17 |
|
18 |
|
19 |
|
20 | export declare class PluckSynth extends Instrument<PluckSynthOptions> {
|
21 | readonly name = "PluckSynth";
|
22 | |
23 |
|
24 |
|
25 | private _noise;
|
26 | private _lfcf;
|
27 | |
28 |
|
29 |
|
30 |
|
31 |
|
32 |
|
33 | attackNoise: number;
|
34 | |
35 |
|
36 |
|
37 | resonance: NormalRange;
|
38 | |
39 |
|
40 |
|
41 | release: Time;
|
42 | constructor(options?: RecursivePartial<PluckSynthOptions>);
|
43 | static getDefaults(): PluckSynthOptions;
|
44 | /**
|
45 | * The dampening control. i.e. the lowpass filter frequency of the comb filter
|
46 | * @min 0
|
47 | * @max 7000
|
48 | */
|
49 | get dampening(): Frequency;
|
50 | set dampening(fq: Frequency);
|
51 | triggerAttack(note: Frequency, time?: Time): this;
|
52 | /**
|
53 | * Ramp down the {@link resonance} to 0 over the duration of the release time.
|
54 | */
|
55 | triggerRelease(time?: Time): this;
|
56 | dispose(): this;
|
57 | }
|