[sdiy] Non maximal-length LFSR

Richie Burnett rburnett at richieburnett.co.uk
Thu Mar 3 22:19:31 CET 2016

> You are still using bits from the same sequence (each LFSR, a bitslice of
> your 48 registers, has the same structure), so you need to carefully
> initialize the LFSR states to have a large enough distance.  You reduce 
> the
> correlation length by a factor of 16, which is inconsequential if you keep
> the sequences the maximum of 2^44 cycles apart, but could have unintended
> results if they are quite close together.

Hmmm, this is very true.  At present I've just been seeding the LFSRs using 
48 iterations of a 16-bit Linear Congruential Generator, without much 
thought being put into the initial states.  I just checked the spectrum of 
the white noise output from the algorithm and thought that any short-term 
correlation between the bits in each word would result in FIR filtering of 
the noise and therefore result in magnitude ripple in the spectrum.

> If you really want just 16 random
> bits per cycle, one of the pseudo-random generators that are used 
> elsewhere
> might actually be much less of a headache.  You don't need one that's
> cryptographically secure, so there are lots of existing examples around.

I can always fall back on something more well known.  I thought I'd 
uncovered a clever implementation, but now I'm not so sure that the 
advantages of saving a few CPU cycles outweigh the additional complications 
and setup concerns!


More information about the Synth-diy mailing list