Reference triggerAttack()

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. Input can be any p5.sound object, or a Web Audio Param.

Examples

Syntax

triggerAttack(unit, secondsFromNow)

Parameters

unit
Object:

p5.sound Object or Web Audio Param

secondsFromNow
Number:

time from now (in seconds)

This page is generated from the comments in lib/addons/p5.sound.js . Please feel free to edit it and submit a pull request!

Related References