<html><head></head><body><div class="ydp69e81c76yahoo-style-wrap" style="font-family:Helvetica Neue, Helvetica, Arial, sans-serif;font-size:16px;"><div id="ydp69e81c76yiv5509951727"><div><div style="font-family:Helvetica Neue, Helvetica, Arial, sans-serif;font-size:16px;" class="ydp69e81c76yiv5509951727ydpf09c84b4yahoo-style-wrap"><div><div dir="ltr">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.  <br clear="none"></div><div dir="ltr"><br clear="none"></div><div dir="ltr">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.<br clear="none"></div><div dir="ltr"><br clear="none"></div><div dir="ltr"><br clear="none"></div><div dir="ltr">To answer your other question "<span>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.</span></div><div dir="ltr"><span> </span><br clear="none"></div><div><br clear="none"></div><div class="ydp69e81c76yiv5509951727ydpf09c84b4signature"><div dir="ltr" style="font-family:Helvetica, Arial, sans-serif;font-size:16px;">Noah Vawter's futuristic electronic music instrument lab: <a shape="rect" href="https://youtube.com/diydsp" rel="nofollow" target="_blank">youtube.com/diydsp</a></div></div></div>
        <div><br clear="none"></div><div><br clear="none"></div>
        
        </div></div></div></div><div id="yiv5509951727yqt08022" class="yiv5509951727yqt5762325968"><div id="yiv5509951727yahoo_quoted_6312340758" class="yiv5509951727yahoo_quoted">
            <div style="font-family:'Helvetica Neue', Helvetica, Arial, sans-serif;font-size:13px;color:#26282a;">
                
                <div>
                    On Friday, February 10, 2023 at 03:14:26 PM EST, Chris McDowell via Synth-diy <synth-diy@synth-diy.org> wrote:
                </div>
                <div><br clear="none"></div>
                <div><br clear="none"></div>
                <div><div dir="ltr">Howdy list, <br clear="none"></div><div dir="ltr"><br clear="none"></div><div dir="ltr">I'm working on some FM synth code running on an STM32G431 (technically PM if you caught discussion a bit ago on this list) <br clear="none"></div><div dir="ltr">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. <br clear="none"></div><div dir="ltr">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. <br clear="none"></div><div dir="ltr"><br clear="none"></div><div dir="ltr">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. <br clear="none"></div><div dir="ltr"><br clear="none"></div><div dir="ltr">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. <br clear="none"></div><div dir="ltr"><br clear="none"></div><div dir="ltr">One question I have is: does my white noise sample rate need to be higher than my output signal's? <br clear="none"></div><div dir="ltr"><br clear="none"></div><div dir="ltr">But overall, my question to list is: what are some ways we can go about reducing quantization noise in 12 bit or lower outputs? <br clear="none"></div><div dir="ltr"><br clear="none"></div><div dir="ltr">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. <br clear="none"></div><div dir="ltr"><br clear="none"></div><div dir="ltr">Cheers,<br clear="none"></div><div dir="ltr">Chris McDowell <br clear="none"></div><div dir="ltr"><br clear="none"></div><div dir="ltr"><br clear="none"></div><div dir="ltr"><br clear="none"></div><div dir="ltr">_______________________________________________<br clear="none"></div><div dir="ltr">Synth-diy mailing list<br clear="none"></div><div dir="ltr"><a rel="nofollow noopener noreferrer" shape="rect" ymailto="mailto:Synth-diy@synth-diy.org" target="_blank" href="mailto:Synth-diy@synth-diy.org">Synth-diy@synth-diy.org</a><br clear="none"></div><div dir="ltr"><a rel="nofollow noopener noreferrer" shape="rect" target="_blank" href="http://synth-diy.org/mailman/listinfo/synth-diy">http://synth-diy.org/mailman/listinfo/synth-diy</a><br clear="none"></div><div dir="ltr">Selling or trading? Use <a rel="nofollow noopener noreferrer" shape="rect" ymailto="mailto:marketplace@synth-diy.org" target="_blank" href="mailto:marketplace@synth-diy.org">marketplace@synth-diy.org</a><br clear="none"></div></div>
            </div>
        </div></div></body></html>