This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* 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) { |