Constructors
constructor
- new ADSR(attackLength: number, decayLength: number, sustainLevel: number, sustainLength: number, releaseLength: number, sampleRate: number): ADSR
-
Parameters
-
attackLength: number
-
decayLength: number
-
sustainLevel: number
-
sustainLength: number
-
releaseLength: number
-
sampleRate: number
Properties
attack
attack: number
attackLength
attackLength: number
attackSamples
attackSamples: number
decay
decay: number
decayLength
decayLength: number
decaySamples
decaySamples: number
release
release: number
releaseLength
releaseLength: number
releaseSamples
releaseSamples: number
sampleRate
sampleRate: number
samplesProcessed
samplesProcessed: number
sustain
sustain: number
sustainLength
sustainLength: number
sustainLevel
sustainLevel: number
sustainSamples
sustainSamples: number
Methods
process
- process(buffer: number[] | Float64Array): number[] | Float64Array
-
Parameters
-
buffer: number[] | Float64Array
Returns number[] | Float64Array
processSample
- processSample(sample: number): number
Attack-Decay-Sustain-Release Envelope