Reference p5.Amplitude

p5.Amplitude

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.
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!

Related References