Get the current amplitude or 'loudness' of a sound. Useful for audio-responsive visualizations or analysis.
Ejemplos
Sintaxis
p5.Amplitude([smoothing])
Parámetros
smoothing
Number: Smooth the amplitude analysis by averaging with the last analysis frame. 0.0 is no time averaging with the last analysis frame.
Métodos
setInput
Connect an audio source to the amplitude object.
getLevel
Get the current amplitude value of a sound.
smooth
Averages values in the analysis to get less jumpy output. A value closer to 1 will be more smooth but will also introduce a slight delay.
Notice any errors or typos? Please let us know. Please feel free to edit src/analysis/Amplitude.js and open a pull request!