import { AmplitudeEnvelope } from "../component/envelope/AmplitudeEnvelope"; import { EnvelopeOptions } from "../component/envelope/Envelope"; import { Filter, FilterOptions } from "../component/filter/Filter"; import { RecursivePartial } from "../core/util/Interface"; import { Monophonic, MonophonicOptions } from "../instrument/Monophonic"; import { OmniOscillator } from "../source/oscillator/OmniOscillator"; import { SynthOptions } from "./Synth"; import { FrequencyEnvelope, FrequencyEnvelopeOptions } from "../component/envelope/FrequencyEnvelope"; import { Time } from "../core/type/Units"; import { Signal } from "../signal/Signal"; import { ToneAudioNodeOptions } from "../core/context/ToneAudioNode"; import { OmniOscillatorSynthOptions } from "../source/oscillator/OscillatorInterface"; export interface MonoSynthOptions extends MonophonicOptions { oscillator: OmniOscillatorSynthOptions; envelope: Omit; filterEnvelope: Omit; filter: Omit; } /** * MonoSynth is composed of one `oscillator`, one `filter`, and two `envelopes`. * The amplitude of the Oscillator and the cutoff frequency of the * Filter are controlled by Envelopes. * * @example * import { MonoSynth } from "tone"; * const synth = new MonoSynth({ * oscillator: { * type: "square" * }, * envelope: { * attack: 0.1 * } * }).toDestination(); * synth.triggerAttackRelease("C4", "8n"); */ export declare class MonoSynth extends Monophonic { readonly name = "MonoSynth"; /** * The oscillator. */ readonly oscillator: OmniOscillator; /** * The frequency control. */ readonly frequency: Signal<"frequency">; /** * The detune control. */ readonly detune: Signal<"cents">; /** * The filter. */ readonly filter: Filter; /** * The filter envelope. */ readonly filterEnvelope: FrequencyEnvelope; /** * The amplitude envelope. */ readonly envelope: AmplitudeEnvelope; constructor(options?: RecursivePartial); static getDefaults(): MonoSynthOptions; /** * start the attack portion of the envelope * @param time the time the attack should start * @param velocity the velocity of the note (0-1) */ protected _triggerEnvelopeAttack(time?: Time, velocity?: number): void; /** * start the release portion of the envelope * @param time the time the release should start */ protected _triggerEnvelopeRelease(time: Time): void; dispose(): this; }