Live data from Hacker News

JavaScript retro sound effects generator

github.grumdrig.com

11–20 of 25 posts

Re: JavaScript retro sound effects generator

#11
post #2

I used the Flash predecessor to generate audio for my mobile game Cobalt Dungeon. It had pretty much the same controls and generated WAV files as well. Basically find something close to what you want then mutate it a whole bunch and then you're good to go.

FutureSplash?

They likely mean as3sfxr, a predecessor of TFA that was built in Flash.

Re: JavaScript retro sound effects generator

#12
post #4

Instead of exporting to a file is there a way to just make the sounds on the fly and then reuse them? For example in a JavaScript browser game?

Dont know about the library but any byte array in javascript can be converted to base64 and referenced via a data url

Re: JavaScript retro sound effects generator

#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 satisfying!)

I also used Software Automatic Mouth (originally for the C64) for TTS:

https://discordier.github.io/sam/

Re: JavaScript retro sound effects generator

#18
love the wav download option

I tried to create a tone in Glicol (https://glicol.org/) with some random idea there and it works quite well:

``` o: squ ~pitch >> mul ~amp_env >> mul 0.4;

~amp_env: ~trigger >> envperc 0.02 0.19;

~pitch: ~pitch_env >> mul 200 >> add 200;

~pitch_env: ~trigger >> envperc 0.01 0.15;

~trigger: speed 4.0 >> seq 60

```

Post reply on HN