Live data from Hacker News

JavaScript retro sound effects generator

github.grumdrig.com

21–25 of 25 posts

Re: JavaScript retro sound effects generator

#21
Years ago, I made one of these at an hackathon style event for developing HTML5 gamedev tools. I didn't know much about audio programming at the time, so I read descriptions of what parameters were and then wrote code that I thought would work similarly. I got enough wrong where the end results sound a bit different than other tools, occasionally in a good way.

This predates the WebAudio API, and so it builds data URLs as WAVs instead. Every sound can be represented as a short string, and the tool can be used as a library that procedurally generates the sounds from the strings. It also has a "song mode" where notes can be provided to guide the sound, which makes certain types of more complicated sounds possible to make, including jingles and short songs.

It's definitely dated now, but if anyone is interested, you can find it here

https://www.leshylabs.com/apps/sfMaker/

See the "Example Sounds" at the bottom of the page to hear what it can do.

Re: JavaScript retro sound effects generator

#22
post #16
post #3

Oh wow! I used this last year to generate the sound effects for https://rocketblaster.app/ and it gave it a great retro vibe.

Non-minified vanilla JS. I salute you! I learned programming twenty years ago by clicking View Source on random websites. Time was when you could just read the code on the average website! That's quite rare now. I used sfxr in some game jams last year, except I shipped the library with the game and had it generate sounds at runtime. (I don't think it's smaller/faster than the mp3s would have been, but it was very sat…

Ah, yes, like a breeze of fresh air!

Re: JavaScript retro sound effects generator

#23
post #16
post #3

Oh wow! I used this last year to generate the sound effects for https://rocketblaster.app/ and it gave it a great retro vibe.

Non-minified vanilla JS. I salute you! I learned programming twenty years ago by clicking View Source on random websites. Time was when you could just read the code on the average website! That's quite rare now. I used sfxr in some game jams last year, except I shipped the library with the game and had it generate sounds at runtime. (I don't think it's smaller/faster than the mp3s would have been, but it was very sat…

You can have it both ways. You can publish minified runtime code with accompanying source maps that your browser automatically uses to expand and navigate the code. That way it's snappier and downloads/parses faster but still allows people to learn and tinker!

Re: JavaScript retro sound effects generator

#24

There is also zzfx by Frank Force who makes lots of things like this. Specially tiny pieces of code on dwitter that generates awesome visuals. https://killedbyapixel.github.io/ZzFX/

Is it me, or am I the only one not finding the play button on this via mobile safari?
Post reply on HN