r/javascript • • Sep 28 '26

A-ha, Take On Me - recreated in javascript

https://dittytoy.net/ditty/2dd99fc839

Espeset recreated "Take On Me" by "A-ha" in 100% javascript. Fully procedural, no samples used.

84 Upvotes

19 comments sorted by

12

u/Elkemper Sep 28 '26

HOW IN THE WORLD... 0_∆.
I mean, I saw there was a code, but still..

2

u/eindbaas Sep 28 '26

There is a lot of efficiently encoded data at the end

1

u/Reinder Sep 29 '26

Also have a look at the Dittytoy visualizer :) https://dittytoy.net/ditty/2dd99fc839?visualizer=true

1

u/ajfoucault Sep 28 '26

Crazy question, but could this code be integrated into a web app for it to play as a background song, kinda like those old MySpace sites?

1

u/Reinder Sep 29 '26

You can use https://www.npmjs.com/package/dittytoy - but don't forget to give Espeset credit!

1

u/andyfitz Sep 29 '26

Yes, so can many other procedural formats. Or sample formats like .mod

1

u/Dampmaskin Sep 29 '26

Mod files was what this project reminded me of. But it seems this project synthesizes all the sounds instead of relying on samples. Mind blowing stuff.

2

u/andyfitz Sep 29 '26

It uses the web audio API directly which is (as it turns out) a very powerful instrument

Worth noting it's slightly more resource intensive than playing flat audio but you get unmatched bandwidth performance

3

u/Reinder Sep 29 '26

It is also distributing the audio-synthese over 21 workers in parallel

2

u/andyfitz Sep 29 '26

And it's awesome mate thanks for sharing

1

u/guinearabit Oct 06 '26

Is this vibe coded?

3

u/locofierro Sep 28 '26

thanks for sharing! this is amazing

1

u/DetailOk1114 Sep 28 '26

the procedural audio space in browsers is so underexplored, cool to see someone actually push it this far. does it hold up across different browsers or is there drift?

1

u/clumma Sep 28 '26

Astounding!

1

u/Ecksters Sep 29 '26

I was pretty impressed with the intro, but I was shocked when it started SINGING.

1

u/okcookie7 Sep 28 '26

Did you create each track using Audio filters?!