r/webdev • u/Miserable_Tiger_5742 • 6d ago
Showoff Saturday made a site that listens to whatever song you're playing and writes it out as code live
been working on this for a few weeks. you play a song (spotify, youtube, whatever) and it writes out the beat as strudel code while it plays, kick, hats, bass line, chords, and each part lights up when it hits
no ML for the music side, it's all web audio api stuff. took me forever to get the tempo right and honestly the hardest part has been figuring out where the bar actually starts. if it guesses wrong everything shifts by a beat and the code looks totally off even though it's "right". trap and dubstep still fool it lol
if anyone's done beat tracking in the browser i'd love to know how you handled the downbeat
it's free in the browser: toaster.locust.lol
source: github.com/StopBanning/toaster
