[sdiy] 12 bit quantization noise, dithering, synths

DIY DSP diydsp at yahoo.com
Fri Feb 10 21:30:43 CET 2023


IMO biggest bang for buck is to update the DAC faster.   E.g. if it's driving at 40 kHz, then drive it at 320 kHz, with a routine that dithers.   e.g. where b = 2^-12, your smallest bit, when you need to drive b/2, then it will alternately drive 0 and b at a period of 160 kHz, which will be inaudible.  

btw there is a universe of additional techniques in this area.  For your example, you may also consider mixing with TPDF: Triangular Probability Distribution Frequency noise.  It sounds fancy, but IIRC, it's really just summing two random numbers with an even distribution.  You can even combine the TPDF noise synthesis with the DAC oversampling.  It's all tradeoffs between research, the sound quality and aesthetics you're going for, and CPU cycles.


To answer your other question "white noise sample rate need to be higher than my output signal's?"  It's generally to move the artifacts out of the audible spectrum. 

Noah Vawter's futuristic electronic music instrument lab: youtube.com/diydsp 

    On Friday, February 10, 2023 at 03:14:26 PM EST, Chris McDowell via Synth-diy <synth-diy at synth-diy.org> 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
  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://synth-diy.org/pipermail/synth-diy/attachments/20230210/d4639759/attachment.htm>


More information about the Synth-diy mailing list