リファレンス p5.Envelope

p5.Envelope

Generate an amplitude envelope.

実例

シンタックス

p5.Envelope([attack], [decay], [sustain], [release])

パラメーター

attack
Number: how quickly the envelope reaches the maximum level
decay
Number: how quickly the envelope reaches the sustain level
sustain
Number: how long the envelope stays at the decay level
release
Number: how quickly the envelope fades out after the sustain level

メソッド

play
Trigger the envelope and release it after the sustain time.
triggerAttack
Trigger the Attack, and Decay portion of the Envelope. Similar to holding down a key on a piano, but it will hold the sustain level until you let go.
triggerRelease
Trigger the Release of the envelope. Similar to releasing the key on a piano and letting the sound fade according to the release level and release time.
setADSR
Sets the attack, decay, sustain, and release times of the envelope.
releaseTime
Sets the release time of the envelope.
attackTime
Sets the attack time of the envelope.
Notice any errors or typos? Please let us know. Please feel free to edit src/Envelope.js and open a pull request!

関連するリファレンス