Direct access to the Playdate's speaker

The desire: to be able to compose music or sound effects on my computer and have a minimal-friction workflow to hearing it played back directly on the Playdate's speaker.


One manifestation of this could be some straightforward UX, for example: to be able to have an option in Simulator next to the "Use Device as Controller" that did "Play audio through Device" or something. Enabling that would send any audio that normal came out of the computer via Simulator instead directly to the Playdate.

A more ideal solution would be direct access to the Playdate as an audio output device. For example, putting it into Disk mode (or some other Dev mode that I don't know about that probably exists), and then seeing the Playdate show up in the computer's available outputs. This would make things incredibly efficient for audio workflows. Doing this may already be possible by others, but I don't know how to access or interface directly with the Playdate hardware when it's connected, outside of what's provided in the Simulator.

I haven't tested this yet, but a way around this could be a workflow where I have Logic Pro (or whatever audio program) bounce exports to the SDK > Disk > Data folder for a project. Then preview that audio track by rebuilding the project and using Simulator's "Upload Game to Device," though this doesn't sound very frictionless, especially pending audio bounce times and project rebuild times...

If others have found more ideal workflows for this, let me know !

2 Likes

Interesting ideas. We'll give this some thought, thanks!

1 Like

Another option would be to generate an EQ curve of the response of the Playdate speaker and apply that.

Either to the Simulator directly, or sound output in general on your computer (on macOS I use SoundSource to apply custom EQ to my headphones).

Similarly, I requested if audio playback could have an EQ applied when playing over Speaker vs Headphones, again for the purposes of mastering. Requires a measuring microphone to be able to generate the required EQ profile.

1 Like

Great idea Matt. I wonder if anyone on the Panic team knows the specific hardware model of the built-in mono speaker? Or at least the speaker size, that info could be useful to find or craft an IR profile from a similarly-sized speaker and at least approximate a EQ profile for the Playdate.

Will this suffice?

Seltech-speaker-GR1813L025UN8 (GRAND) v6.pdf.zip (106.8 KB)

2 Likes

Having the Playdate appear as an audio device via USB would be ideal!

I made more roundabout solution for @ncarson9, which I recently put up on Github https://github.com/GamesRightMeow/micaudioplayback

Basically you use a TRRS aux cable + mic/headphone splitter (or a virtual cable) to connect your audio out from your computer to your mic jack on your Playdate.

The SDK doesn't support realtime playback, so you do still have to record the audio before you can play it, but its a lot faster than rebuilding and pushing to a device!

1 Like

Yes, this could help!

This is the exact direction I was thinking of going in potentially! Your repo looks great, I’ll use that if making a simulated IR/EQ profile doesn’t do the trick…

If the EQ profile works, can you report back here how you used it? I'm a bit of an audio newbie :grinning:

1 Like

@Dave also made an audio "monitor" example in C, I have the code somewhere.

Though I cannot remember the exact functionality if it was realtime or required recording and playback, speaker or headphone jack, etc.

Here's the version I have:
monitor.c.zip (1.5 KB)

Though I think the last time I gave it a run it wasn't working right. I'll give it try once the family's awake and I can make noise :slight_smile:

This is a work in progress so far, but it's a start:

Hz:
These are pulled directly from the PDF that @dwineman shared.

dB:
I just normalized these down to zero based on the highest LIMIT value on that PDF, so subtracting 92.5 from each of the values. I'm not positive about this approach honestly, especially because nothing in Audio is ever linear, but we'll go with it for now. Obviously keeping the gain on your EQ at 0 will make your signal incredibly quiet with these settings, YMMV with whichever program you're using but you'll need to adjust the output to hear it properly without adding incidental distortion. Also, the High-cut and Low-cut are somewhat opinionated, but obviously the speaker's audio range doesn't go below 300hz and probably not above 12000 (needs more testing yet though).

Q Value:
This value just describes the "steepness" of the slope of each frequency band. These values are highly opinionated, but my theory was to just mess around with them so each frequency band's slope ends at the mid point between its previous and next bands, as best as possible anyway given it is logarithmic. This probably needs some iteration.


Next up to work on will be the THD (total harmonic distortion). A lot of the flavor and personality of the Playdate speaker's comes from this, I think. I'm playing around with a few different ways in Logic to add manufactured distortion via fuzz/exciters, but it's not easy to do only by specific frequency bands. It's also not super clear to me what the PDFs THD graph is actually saying; what does LIMIT mean in this case? Is it a percentage of the signal as distortion, or just a straight dB value... I'm not sure. Not my expertise, so bumbling around to see if I can figure out how these graphs are typically used.

All-in-all we'll see, maybe I'll have a standard EQ profile for us by the end of it. :+1:t5:

3 Likes