Simple tool for checking synth sounds on device

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)

23 Likes

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:setADSR or playdate.sound.synth:setSustain, but it does work through sound.envelope.new. I'll submit a bug report.

@NaOH
main.lua.zip (2.1 KB)
Here's the code, sorry it's not pretty ))

6 Likes

This is great! thanks!

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.

2 Likes

This rules, great work!

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 :slight_smile:

function playdate.gameWillPause()
  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) )
end

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.

3 Likes

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)

1 Like

Hey Gregory, congrats on the release (I'm assuming you were talking about oom, which is amazing!), and I'm also curious if you were planning to share this new sequencer thingy.

2 Likes

Curses, I'd love a random sound option. I'm only after retro coin-op beeps and explosion white noise options.

Any chance of sharing your changes? Or I guess I have the source code too :slight_smile:

1 Like

here it is SEQ - Sound tool / 4-track sequencer utilising built-in synth

3 Likes