[sdiy] LFSR digital noise source

Ben Bradley ben.pi.bradley at gmail.com
Mon Nov 11 03:28:26 CET 2019

There are more and more microcontrollers (I'm thinking specifically of
many of the STM32 ARM series, but I recall other ARM makers have
similar peripherals) that have their own "True" Random Number
Generator, that uses some internal analog signal to make
cryptographically secure random numbers. I wrote a little code to read
the RNG for a STM32F4 Discovery board, and got around a million 32-bit
random numbers per second (this is just a loop watching for the ready
bit and reading the register, doing no further processing). With a
processor you get your choice of repeatable LFSR type noise with say,
a one-second loop that always has a consistent maximum peak within
that second, or a "true" random noise source that you can
add-and-stack for different density functions and such. Also, as
mentioned or implied, analog noise sources can vary a good bit from
component to component, but a TRNG gives consistent (as consistent as
a "true" noise source can be) signal level and type.

On Sun, Nov 10, 2019 at 7:45 PM <rsdio at audiobanshee.com> wrote:
> One advantage of a CPU-based noise source is that it can be combined with a DAC for CV modulation.
> Digital noise chips typically use the single-bit output for audio. Thus, it’s like a square wave with random period but basically constant amplitude. The conversion to analog can vary the amplitude if there is a PWM effect (via capacitance).
> With a CPU and a long enough register, it’s possible to gather 8 or more bits into a word to feed a DAC. Just be sure to shift in 8 new bits for each 8-bit conversion, otherwise the values aren’t entirely independent of each other. You can easily extend this to 16-bit or even a 24-bit DAC, although using a 24-bit DAC for CV is quite dubious. LFSR hardware should be able to run at 8x, 16x, or 24x the sample rate with no problems.
> Of course, with counter logic and a stand-alone DAC chip, it’s possible to do this in pure hardware. So, I guess the CPU doesn’t really have a unique advantage here.
> Brian
> On Nov 10, 2019, at 4:32 PM, bbob <fluxmonk at gmail.com> wrote:
> > sometimes for the sound directly (crunchy/brittle), but more often slowing the clock and then using it as a modulation source
> >
> > On Sun, Nov 10, 2019 at 7:11 PM ColinMuirDorward <colindorward at gmail.com> wrote:
> >> Hope this isn't too off topic, but I've often wondered when/why you'd choose a digital noise source over an analog one. It is simply for the acoustic flavour?
> >
> _______________________________________________
> Synth-diy mailing list
> Synth-diy at synth-diy.org
> http://synth-diy.org/mailman/listinfo/synth-diy

More information about the Synth-diy mailing list