Play a note by triggering noteAttack and noteRelease with sustain time
Examples
Syntax
play([note], [velocity], [secondsFromNow], [sustainTime])
Parameters
note
Number:
midi note to play (ranging from 0 to 127 - 60 being a middle C)
velocity
Number:
velocity of the note to play (ranging from 0 to 1)
secondsFromNow
Number:
time from now (in seconds) at which to play
sustainTime
Number:
time to sustain before releasing the envelope
This page is generated from the comments in lib/addons/p5.sound.js . Please feel free to edit it and submit a pull request!