Analyze the frequency spectrum and waveform of sounds.
Examples
Syntax
p5.FFT([fftSize])
Parameters
fftSize
Number: FFT analysis size. Must be a power of two between 16 and 1024. Defaults to 32.
Methods
analyze
Returns the frequency spectrum of the input signal.
waveform
Returns an array of sample values from the input audio.
Notice any errors or typos? Please let us know. Please feel free to edit src/analysis/FFT.js and open a pull request!
Related References
getAudioContext
Get the window's audio context.
setAudioContext
Sets the AudioContext to a specified context to enable cross library compatibility.
userStartAudio
starts audio processing in the window when called from a user interaction (such as mousePressed()).
userStopAudio
stops audio processing in the browser window.