Listen for onsets (a sharp increase in volume) within a given frequency range.
Syntax
p5.OnsetDetect(freqLow, freqHigh, threshold, callback)
Parameters
freqLow
Number:
Low frequency
freqHigh
Number:
High frequency
threshold
Number:
Amplitude threshold between 0 (no energy) and 1 (maximum)
callback
Function:
Function to call when an onset is detected
This page is generated from the comments in lib/addons/p5.sound.js . Please feel free to edit it and submit a pull request!