Reference rate()

rate()

Set the playback rate of a sound file. Will change the speed and the pitch. Values less than zero will reverse the audio buffer.

Examples

Syntax

rate([playbackRate])

Parameters

playbackRate
Number:

Set the playback rate. 1.0 is normal, .5 is half-speed, 2.0 is twice as fast. Values less than zero play backwards.

Notice any errors or typos? Please let us know. Please feel free to edit lib/addons/p5.sound.js and open a pull request!

Related References