UNPKG

@polygonjs/polygonjs

Version:

node-based WebGL 3D engine https://polygonjs.com

33 lines (32 loc) 1.61 kB
/** * creates an amplitude envelope to analyse sounds * * */ import { TypedAudioNode } from './_Base'; import { NodeParamsConfig } from '../utils/params/ParamsConfig'; import { AudioBuilder } from '../../../core/audio/AudioBuilder'; interface AmplitudeEnvelopeParams { attack: number; decay: number; release: number; sustain: number; } export declare const ENVELOPE_DEFAULTS: AmplitudeEnvelopeParams; declare class AmplitudeEnvelopeAudioParamsConfig extends NodeParamsConfig { /** @param The amount of time it takes for the envelope to go from 0 to it's maximum value. */ attack: import("../utils/params/ParamsConfig").ParamTemplate<import("../../index_all").ParamType.FLOAT>; /** The period of time after the attack that it takes for the envelope to fall to the sustain value. */ decay: import("../utils/params/ParamsConfig").ParamTemplate<import("../../index_all").ParamType.FLOAT>; /** The percent of the maximum value that the envelope rests at until the release is triggered. */ sustain: import("../utils/params/ParamsConfig").ParamTemplate<import("../../index_all").ParamType.FLOAT>; /** The amount of time after the release is triggered it takes to reach 0. */ release: import("../utils/params/ParamsConfig").ParamTemplate<import("../../index_all").ParamType.FLOAT>; } export declare class AmplitudeEnvelopeAudioNode extends TypedAudioNode<AmplitudeEnvelopeAudioParamsConfig> { paramsConfig: AmplitudeEnvelopeAudioParamsConfig; static type(): string; initializeNode(): void; cook(inputContents: AudioBuilder[]): void; } export {};