Play tells the envelope to start acting on a given input. If the input is a p5.sound object (i.e. AudioIn, Oscillator, SoundFile), then Envelope will control its output volume. Envelopes can also be used to control any Web Audio Audio Param.
Examples
Syntax
play(unit, [startTime], [sustainTime])
Parameters
unit
Object:
A p5.sound object or Web Audio Param.
startTime
Number:
time from now (in seconds) at which to play
sustainTime
Number:
time to sustain before releasing the envelope
Notice any errors or typos? Please let us know. Please feel free to edit lib/addons/p5.sound.js and open a pull request!