1 | import { AmplitudeEnvelope } from "../component/envelope/AmplitudeEnvelope.js";
|
2 | import { EnvelopeOptions } from "../component/envelope/Envelope.js";
|
3 | import { Filter, FilterOptions } from "../component/filter/Filter.js";
|
4 | import { RecursivePartial } from "../core/util/Interface.js";
|
5 | import { Monophonic, MonophonicOptions } from "../instrument/Monophonic.js";
|
6 | import { OmniOscillator } from "../source/oscillator/OmniOscillator.js";
|
7 | import { FrequencyEnvelope, FrequencyEnvelopeOptions } from "../component/envelope/FrequencyEnvelope.js";
|
8 | import { NormalRange, Seconds, Time } from "../core/type/Units.js";
|
9 | import { Signal } from "../signal/Signal.js";
|
10 | import { ToneAudioNodeOptions } from "../core/context/ToneAudioNode.js";
|
11 | import { OmniOscillatorSynthOptions } from "../source/oscillator/OscillatorInterface.js";
|
12 | export interface MonoSynthOptions extends MonophonicOptions {
|
13 | oscillator: OmniOscillatorSynthOptions;
|
14 | envelope: Omit<EnvelopeOptions, keyof ToneAudioNodeOptions>;
|
15 | filterEnvelope: Omit<FrequencyEnvelopeOptions, keyof ToneAudioNodeOptions>;
|
16 | filter: Omit<FilterOptions, keyof ToneAudioNodeOptions>;
|
17 | }
|
18 |
|
19 |
|
20 |
|
21 |
|
22 |
|
23 |
|
24 |
|
25 |
|
26 |
|
27 |
|
28 |
|
29 |
|
30 |
|
31 |
|
32 |
|
33 |
|
34 |
|
35 | export declare class MonoSynth extends Monophonic<MonoSynthOptions> {
|
36 | readonly name = "MonoSynth";
|
37 | |
38 |
|
39 |
|
40 | readonly oscillator: OmniOscillator<any>;
|
41 | |
42 |
|
43 |
|
44 | readonly frequency: Signal<"frequency">;
|
45 | |
46 |
|
47 |
|
48 | readonly detune: Signal<"cents">;
|
49 | |
50 |
|
51 |
|
52 | readonly filter: Filter;
|
53 | |
54 |
|
55 |
|
56 | readonly filterEnvelope: FrequencyEnvelope;
|
57 | |
58 |
|
59 |
|
60 | readonly envelope: AmplitudeEnvelope;
|
61 | constructor(options?: RecursivePartial<MonoSynthOptions>);
|
62 | static getDefaults(): MonoSynthOptions;
|
63 | /**
|
64 | * start the attack portion of the envelope
|
65 | * @param time the time the attack should start
|
66 | * @param velocity the velocity of the note (0-1)
|
67 | */
|
68 | protected _triggerEnvelopeAttack(time: Seconds, velocity?: number): void;
|
69 | /**
|
70 | * start the release portion of the envelope
|
71 | * @param time the time the release should start
|
72 | */
|
73 | protected _triggerEnvelopeRelease(time: Seconds): void;
|
74 | getLevelAtTime(time: Time): NormalRange;
|
75 | dispose(): this;
|
76 | }
|