Extremely distorted sound effects: Hardware Speaker frequency range?

I added 2 sounds to my game which have pretty low frequencies, and they sound quite distorted through the playdate's speakers*.

Other games seem to hold up at maximum system volume, but these two sounds sound terrible at 70+%. Especially the electronic_hum sound. Is it at the resonant frequency of the speaker maybe?
Simulator and headphones plugged into playdate sound fine.
sound_test.zip (86.5 KB)

Most noticeable when playing both sounds simultaneously

See attached demo project for the sounds.

*Note: I'm using a development preview unit pdu-01. Has there been any relevant revision to the speaker?

1 Like

i dont have a playdate, could u possibly share a video if you find time and this is still a problem?

as someone using pd.sound a lot in sim, curious what it is you're describing

On my consumer Playdate's internal speaker, each sound—alone—seems a little harsher than my Studio Display speakers. Even at max volume (which, for these sounds, is not very loud) I wouldn't call it distorted. Nothing that strikes me as speaker resonance.

The better test was with some old iPod earphones, plugged into my MacBook/Simulator and into the Playdate. With the same earphones:

  • Blower sounds the same on sim vs. hardware

  • Hum does NOT sound the same! Different DAC? It sounds like maybe slight clipping on hardware, vs. cleaner on the sim. I might call it distorted—slightly?—but this is with headhones, NOT the internal.

As for both sounds playing TOGETHER:

  • No distortion on the sim, with speakers or with earphones.

  • BAD distortion on Playdate hardware—INCLUDING with earphones, not just the internal speaker. Lots of crackling. Earphones vs. internal share the same kind of distortion.

So the two sounds seem to interact with each other on hardware in a way they don't in the sim. Clipping? Turning down the Playdate volume does remove the distortion.

It's interesting that you didn't hear distortion on PD hardware with headphones. I definitely do. Maybe your headphones were turned lower?

Thanks for testing! Now the question remains what the cause/ fix is.

How is audio mixed on playdate? Are both signals added? That would explain why the clipping occurs when playing simultaneously

The resolution then would be to limit the volume to 50% for each sound so that the total signal would never pass 100%.

fyi it looks like there's a problem in the driver code, audio is definitely clipping earlier than it should be: Two synths playing at once creates horrible buzzing noise! - #13 by dave

I'm checking this out now.