ZzFX Sound Effect Generator for Playdate

ZzFX for Playdate

I ported ZzFX, my tiny JS sound effect generator, to Playdate! Every sound is made from a short array of numbers, no audio files at all. Make a sound in the web editor, paste the params into Lua, and it plays exactly the same.

import "zzfx"
zzfx({nil,nil,1675,nil,.06,.24,1,nil,nil,nil,837,.06})  -- coin

The synth is C under the hood, but you just call zzfx({...}) from Lua. The repo has a little demo with preset sounds on the buttons and the crank playing a scale.

This works a bit like PDFXR but with a web interface and many more parameters to control the sound. Sounds can also be saved as wave files from the web interface for faster loading when you are ready to ship.

MIT, source and demo here: GitHub - KilledByAPixel/ZzFX-Playdate: ZzFX for Playdate: a C port of ZzFX with a Lua API and playable demo. Generate retro game sound effects live from code, no audio files required! · GitHub

Would love to know if anyone uses it.

5 Likes

really cool project. I love live synthesis on the device. I may use this to generate some sfx for my game although I don't have any coins, shooting, jumping, explosions, hits, powers, ... but still I find the idea fascinating XD maybe I can make some footstep sounds haha or rustling bushes.

I have a MIDI editor which I plan on releasing sometime soon where you can take existing MIDI and select settings on-device to change the sound.

unfortunately I think for my game live synths might be too expensive but I want to keep it all playdate - so I may migrate to doing live synthesis on my own device, recording that directly off the headphones jack, and then taking that pre-rendered audio and using it in-game. just some thoughts.

1 Like