[sdiy] Fun with LFSRs and such

ASSI Stromeko at nexgo.de
Tue Mar 27 20:43:25 CEST 2012


On Saturday 24 March 2012, 15:23:47, Colin Hinz wrote:
> A linear feedback shift register (LFSR) can be used as a pseudo-random
> noise source, as has been well documented here, there, everywhere.

Actually, it needs to be a maximum length LFSR to produce a pseudo-random 
bitstream.

> But it becomes more interesting when it's used as a LF gate, and gets
> even more interesting when the taps are chosen with "good" noise
> not in mind. Long sequences of '1' or '0' intermingled with bursts
> of more random behaviour = golden!

That'd be a non-maximum length LFSR.  While a maximum length LFSR has one 
(maximum length, duh) cycle and a degenerate one (usually a state of all 
zeroes), these have multiple cycles that may or may not be degenerate and 
may or may not cover all codes.  If all cycles together don't cover all 
codes, you usually have LFSR states that you can start from and end up in 
one of the cycles by traversing these codes just once.  It is therefore 
important to make sure you start your LFSR in the right cycle at reset and 
it can be quite useful to be able to switch between the different cycles.  
The run-in states into one of cycles can also be employed to produce 
something (more) random at the start of a clearly periodic signal.


Regards,
Achim.
-- 
+<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+

Waldorf MIDI Implementation & additional documentation:
http://Synth.Stromeko.net/Downloads.html#WaldorfDocs



More information about the Synth-diy mailing list