Reference noteAttack()

noteAttack()

Trigger the Attack, and Decay portion of a MonoSynth. Similar to holding down a key on a piano, but it will hold the sustain level until you let go.

Examples

Syntax

noteAttack([note], [velocity], [secondsFromNow])

Parameters

note
Number:

midi note on which attack should be triggered.

velocity
Number:

velocity of the note to play (ranging from 0 to 1)/

secondsFromNow
Number:

time from now (in seconds)

Notice any errors or typos? Please let us know. Please feel free to edit lib/addons/p5.sound.js and open a pull request!

Related References