Skip to content

Instantly share code, notes, and snippets.

View jhedev96's full-sized avatar
🏠
Working from home

JheDevX ID jhedev96

🏠
Working from home
View GitHub Profile
@TF3RDL
TF3RDL / audio-analyzer.js
Last active September 8, 2024 15:42
A collection of audio analysis algorithms and some helper functions
/**
* A collection of audio analysis algorithms and some helper functions
*/
// p5.js map function
function map(x, min, max, targetMin, targetMax) {
return (x - min) / (max - min) * (targetMax - targetMin) + targetMin;
}
function clamp(x, min, max) {