Synth for UI Sound Effects

I don't know much about synths, but I'd like to use the synth features to generate UI sounds. From the Steven Frank YouTube demo, I got this bit of code to make some sound:

local snd = playdate.sound
local synth =

And of course I can tweak that to make other sounds, but I'm wondering if anyone has any tips/tools/tutorials or even pre-made values for nice sounds?

We built a basic utility function to help simplify it visually when creating a new synth:

function _newSynth(a, d, s, r, volume, sound)
	local synth =
	synth:setADSR(a, d, s, r)
	return synth

and a few random very basic placeholder/in-progress UI sounds I've been using:

boop = _newSynth(0.2, 0.02, 0, 0, 0.6, snd.kWavePOVosim)
beep = _newSynth(0, 0.04, 0, 0, 0.25, snd.kWaveSawtooth)
blop = _newSynth(0, 0.1, 0, 0.2, 0.4, snd.kWavePOVosim)



It's probably going to depend how deep you want to get into sound design. Do you know how envelopes work in general? Or if you're interested in learning, that would be a good place to start. If you don't, you may find that twiddling with ADSR can sometimes feel a little frustrating or unintuitive.

One tip to keep in mind is that the audio functions all use seconds as values, but that envelopes (for short UI sounds) can often have very small values, so you may want to think about it in ms, as many DAWs do.

Attack, Delay, and Release might land between 0.00s and 1.00s generally, but not limited to it. It's important to note that Sustain works differently, it's a volume value between 0 and 1 that the note sustains when it's being held, which is only particularly relevant if you're also using the [length] property of :playNote() to play your note.

There's tons of great info online about envelopes and sound design, so it really depends how crazy you want to go. :slight_smile: The infograph on this page is a pretty good explanation of ADSR.

Good luck!


Wow, couldn't have asked for a better answer, thank you! I will be digging in to all of this.

1 Like

Unrelated, but can I ask when you use underscore in front of a function name? I'm new to Lua and just really curious to learn more about techniques people use.

btw, the youtube video on the page you linked is excellent.

1 Like

absolutely no technical reason :laughing: - we're just slowing building a _utilities.lua file for ourselves to reuse general convenience functions we've made... but across future projects. So my personal way to keep those straight against other SDK functions or Lua functions is to add the underscore.

1 Like

Check out the tool I made. Might be very useful when working with synth

That's excellent, lovely UI for that too!