-
Hello, |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hey @akkolad – I moved the audio reactivity code to the backend and thooought I documented using it in the readme?? but perhaps it's only documented in the demo : demos » audio » _audio_analysis Anyways there's already an FFT object loaded, you can check out what's happening behind the scenes in p5live-audio.js – but essentially you just need to attach the function setup() {
createCanvas(windowWidth, windowHeight)
setupAudio(true) // true makes all audio variables GLOBAL, otherwise use `a5.` in front of each var
}
function draw() {
updateAudio()
// print(fftRaw.getEnergy(1000)) // debug value
clear()
circle(width / 2, height / 2, fftRaw.getEnergy(1000))
} |
Beta Was this translation helpful? Give feedback.
Hey @akkolad – I moved the audio reactivity code to the backend and thooought I documented using it in the readme?? but perhaps it's only documented in the demo : demos » audio » _audio_analysis
Anyways there's already an FFT object loaded, you can check out what's happening behind the scenes in p5live-audio.js – but essentially you just need to attach the
getEnergy()
to the exposed variable calledfftRaw
(fft
is the already filtered array of values). Here's an example: