[sdiy] 12 bit quantization noise, dithering, synths
Richie Burnett
rburnett at richieburnett.co.uk
Fri Feb 10 21:30:51 CET 2023
Up-sample (interpolate) to a higher sample rate, and also take a look at "noise shaping" to go along with the dither. When you combine these techniques you can arrange to push some of the quantisation noise above 20khz where you won't hear it.
All of this assumes you want to stick with the basic 12-bit DAC with zero-order hold. Personally I'd be tempted to just hook up a 24-bit DAC or CODEC if your micro has the relevent I2S or SAI peripheral and enjoy pristine digital audio with all of the clever stuff done for you by the CODEC :-)
Well done with the FM synth though. Sounds like a fun project.
-Richie,
Sent from my Xperia SP on O2
---- Chris McDowell via Synth-diy wrote ----
>Howdy list,
>
>I'm working on some FM synth code running on an STM32G431 (technically PM if you caught discussion a bit ago on this list)
>For the most part, this chip is well suited to "chill" digital synthesis. I've got a handful of voices running 2 operator FM with feedback and loads of envelopes, all pretty satisfying.
>I am using the built-in 12 bit DAC, and finally at the point where the quantization noise on the tails of long envelopes is bothering me. I have a very high-level understanding of what dithering is, and have played a little with naively adding a tiny bit of white noise to my output signal to mask the quantization noise. it DOES work, but the noise floor is really not that low, and I fear I'm misunderstanding some nuance of dithering here and kind of just caveman drowning it out with white noise.
>
>There's no issue besides on the tails of long envelopes. When we get close to silence, there is quite a bit of "hash" and digital goofiness that makes perfect sense given my implementation.
>
>To try to reduce the constant noise floor, I also tried adding the dithering to the envelopes instead of the output. this kind of works, but sounds a bit conspicuous. it's kind of just gating the quantization noise with the envelopes. I think it maybe sounds better than with no attention, but not really "better" than a constant bit of white noise underneath the signal.
>
>One question I have is: does my white noise sample rate need to be higher than my output signal's?
>
>But overall, my question to list is: what are some ways we can go about reducing quantization noise in 12 bit or lower outputs?
>
>Are there some subtle tricks or have I just never noticed 8 or 12 bit systems sounding, yknow, terrible... this could be a classic case of "yeah, listening hyper critically in a quiet room on nice headphones will reveal secrets sometimes", as the noise floor of my QSC PA speakers is actually quite a bit higher than this quantization noise, so I never realized it was there during less attentive testing.
>
>Cheers,
>Chris McDowell
>
>
>
>_______________________________________________
>Synth-diy mailing list
>Synth-diy at synth-diy.org
>http://synth-diy.org/mailman/listinfo/synth-diy
>Selling or trading? Use marketplace at synth-diy.org
More information about the Synth-diy
mailing list