Set the amplitude between 0 and 1.0. Or, pass in an object such as an oscillator to modulate amplitude with an audio signal.

シンタックス

amp(vol, [rampTime], [timeFromNow])

パラメーター

vol
Number|Object:

between 0 and 1.0 or a modulating signal/oscillator

rampTime
Number:

create a fade that lasts rampTime

timeFromNow
Number:

schedule this event to happen seconds from now

リターン

AudioParam: gain If no value is provided, returns the Web Audio API AudioParam that controls this oscillator's gain/amplitude/volume)
Notice any errors or typos? Please let us know. Please feel free to edit lib/addons/p5.sound.js and open a pull request!

関連するリファレンス