Simple tool to check how the built-in synth will actually sound on device
It was very helpful for me since I use only synthesised audio in my games
You can fiddle with Pitch, ADSR, as well as Soundwave
How to use:
Crank to change the pitch
Crank+B -> step
Crank+A -> length
Crank+Left -> attack
Crank+Up -> sustain
Crank+Right -> decay
Crank+Down -> release
Go to menu to change the soundwave
ADSR.pdx.zip (9.5 KB)
This is very helpful. Would you mind releasing the source code for this? I am trying to debug sound effects inconsistencies in pulp-to-lua and it would be very helpful to compare.
Edit: I think I just found the bug. It seems
sustain doesn't work if specified through
playdate.sound.synth:setSustain, but it does work through
sound.envelope.new. I'll submit a bug report.
main.lua.zip (2.1 KB)
Here's the code, sorry it's not pretty ))
Amazing little tool, saved me a bunch of time. I know essentially nothing about synths and was on the brink of plugging in values at random until I got something that worked but I'm pretty sure I wouldn't have found the parameters I was looking for without being able to play around quickly with this.
Thanks again for this!
I added a small bit of code, which prints definition for the current sound to the console when you press the menu button.
Which makes it easy to copy and paste into your code
print( string.format("playdate.sound.synth:setADSR(%.2f, %.2f, %.2f, %.2f) -- attack, decay, sustain, release", attack, decay, sustain, release) )
print( string.format("playdate.sound.synth:playNote(%d, 1, %.2f) -- pitch, volume, length", pitch, 1, length) )
edit: I added more code: the ability to generate a random sound of various types, but it's too big a change as it required me to implement a way to refresh the screen.
That's really cool and useful!
I've developed far more sophisticated tool for my upcoming game. It's kinda sequencer made of 4 ASDR instruments played simultaneously. I might add this functionality to it, when I will come back to the sound part)