Skip to content

Instantly share code, notes, and snippets.

View jem-computer's full-sized avatar
🌈

Jem jem-computer

🌈
View GitHub Profile
float getBPMVis(float bpm){
// this function can be found graphed out here :https://www.desmos.com/calculator/rx86e6ymw7
float bps = 60./bpm; // beats per second
float bpmVis = tan((time*PI)/bps);
// multiply it by PI so that tan has a regular spike every 1 instead of PI
// divide by the beat per second so there are that many spikes per second
bpmVis = clamp(bpmVis,0.,10.);
// tan goes to infinity so lets clamp it at 10
bpmVis = abs(bpmVis)/20.;
@mattdesl
mattdesl / README.md
Last active November 18, 2021 13:14
seedable PRNG from hash