This is a cheap building block for turning threshold crossings into a value that can linger for a few frames.
export function beatGate(level, threshold, last, decay = 0.9) {
if (level > threshold) {
return 1;
}
return last * decay;
} A tiny onset gate with adjustable decay for snapping events into motion.
This is a cheap building block for turning threshold crossings into a value that can linger for a few frames.
export function beatGate(level, threshold, last, decay = 0.9) {
if (level > threshold) {
return 1;
}
return last * decay;
} Glide audio bands instead of strobing with an attack and release you can tune.
function glsl audio-reactivesmoothingbeginnerBucket a raw FFT array into a few stable, normalized bands you can actually use.
snippet js audio-reactivefftutility