Reference onPeak()

onPeak()

onPeak accepts two arguments: a function to call when a peak is detected. The value of the peak, between 0.0 and 1.0, is passed to the callback.

Examples

Syntax

onPeak(callback, [val])

Parameters

callback
Function:

Name of a function that will be called when a peak is detected.

val
Object:

Optional value to pass into the function when a peak 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!

Related References