Get the current volume of a sound.
Examples
Syntax
p5.Amplitude([smoothing])
Parameters
smoothing
Number: Smooth the amplitude analysis by averaging with the last analysis frame. 0.0 is no time averaging with the last analysis frame.
Methods
setInput
Connect an audio source to the amplitude object.
getLevel
Get the current amplitude value of a sound.
toggleNormalize
Determines whether the results of Amplitude.process() will be Normalized. To normalize, Amplitude finds the difference the loudest reading it has processed and the maximum amplitude of 1.0. Amplitude adds this difference to all values to produce results that will reliably map between 0.0 and 1.0. However, if a louder moment occurs, the amount that Normalize adds to all the values will change. Accepts an optional boolean parameter (true or false). Normalizing is off by default.
smooth
Get the current amplitude value of a sound.
Notice any errors or typos? Please let us know. Please feel free to edit src/Amplitude.js and open a pull request!