[sdiy] Uniformly distributed noise generator?

rburnett at richieburnett.co.uk rburnett at richieburnett.co.uk
Mon Jun 10 15:46:08 CEST 2013

> ...An unconnected ADC input can be used as a source of randomness to 
> periodically re-seed the generator...

You have to be very careful doing this.  An unconnected ADC input will 
not yield random values at all, but will pick up deterministic signals 
from nearby pins or electric fields like 50/60Hz mains hum via 
capacitive coupling to any conductors nearby.  A multi-channel ADC will 
also most likely hold the voltage level of the last channel sampled if 
there is nothing connected to the currently selected input pin.  This is 
very common for floating inputs to multi-channel ADCs on PICs etc.

Also, whilst randomly re-seeing a pseudo random generator initially 
sounds like a resonable thing to do, it can sound very bad in practice.  
The problem is that periodically re-seeding a PRBS generator can cause 
it to repeat short sub-sequences that it has *JUST* recently clocked 
out!  The human ear is very sensitive to any repetition, particularly 
over short periods of time, and the result is a very noticeable glitch.  
So it's far better to let the PRBS run through it's entire maximal 
length sequence than trying to do some clever reseeding at frequent 
intervals.  As Scott and Tom have said large LFSR lengths are easy to 
implement on FPGA or microcontroller, so if the sequence length is too 
short then you need to choose a larger shift register and a higher order 
generator polynomial.


More information about the Synth-diy mailing list