1 | import { Monophonic, MonophonicOptions } from "./Monophonic.js";
|
2 | import { MonoSynth, MonoSynthOptions } from "./MonoSynth.js";
|
3 | import { Signal } from "../signal/Signal.js";
|
4 | import { RecursivePartial } from "../core/util/Interface.js";
|
5 | import { Frequency, NormalRange, Positive, Seconds, Time } from "../core/type/Units.js";
|
6 | import { Param } from "../core/context/Param.js";
|
7 | export interface DuoSynthOptions extends MonophonicOptions {
|
8 | voice0: Omit<MonoSynthOptions, keyof MonophonicOptions>;
|
9 | voice1: Omit<MonoSynthOptions, keyof MonophonicOptions>;
|
10 | harmonicity: Positive;
|
11 | vibratoRate: Frequency;
|
12 | vibratoAmount: Positive;
|
13 | }
|
14 |
|
15 |
|
16 |
|
17 |
|
18 |
|
19 |
|
20 |
|
21 |
|
22 | export declare class DuoSynth extends Monophonic<DuoSynthOptions> {
|
23 | readonly name: string;
|
24 | readonly frequency: Signal<"frequency">;
|
25 | readonly detune: Signal<"cents">;
|
26 | |
27 |
|
28 |
|
29 | readonly voice0: MonoSynth;
|
30 | |
31 |
|
32 |
|
33 | readonly voice1: MonoSynth;
|
34 | |
35 |
|
36 |
|
37 | vibratoAmount: Param<"normalRange">;
|
38 | |
39 |
|
40 |
|
41 | vibratoRate: Signal<"frequency">;
|
42 | |
43 |
|
44 |
|
45 |
|
46 |
|
47 |
|
48 |
|
49 |
|
50 |
|
51 | harmonicity: Signal<"positive">;
|
52 | |
53 |
|
54 |
|
55 | private _vibrato;
|
56 | |
57 |
|
58 |
|
59 | private _vibratoGain;
|
60 | constructor(options?: RecursivePartial<DuoSynthOptions>);
|
61 | getLevelAtTime(time: Time): NormalRange;
|
62 | static getDefaults(): DuoSynthOptions;
|
63 | /**
|
64 | * Trigger the attack portion of the note
|
65 | */
|
66 | protected _triggerEnvelopeAttack(time: Seconds, velocity: number): void;
|
67 | /**
|
68 | * Trigger the release portion of the note
|
69 | */
|
70 | protected _triggerEnvelopeRelease(time: Seconds): this;
|
71 | dispose(): this;
|
72 | }
|