[sdiy] Long LFSRs (Was Psych Tone)

Bernard Arthur Hutchins, Jr bah13 at cornell.edu
Sun Jan 6 23:09:26 CET 2019

In response to the recent discussion of the classic “Psych Tone”, here I have added three items (from MEH, EN64, EN75A):


adding to the Electronotes 76 already posted on noise generators:


ELECTRONOTES 76 - Netfirms<http://electronotes.netfirms.com/EN76.pdf>
Star Instruments, PO Box 71, Stafford Springs, CT 06076 (c) 2100 Howell Branch Rd Apt 48-G, Maitland, FL 32751 24 Carr Dr., Moraga, CA 94556 PO Box 326, Rosamond, CA 93560

The MEH chapter 5h pages include the reference to the derivation of the feedback taps based on “primitive polynomials”.  Since EXOR feedback is anything but “linear”, I don’t understand the terminology “LFSR”, and continue to use “PRBS” (pseudo random binary sequence).

PRBS generators find applications in EM for noise generators and for generators of random sequences (typically of “notes” forming a trial tune or melody). The shift register cocking interval is the tempo.  The Psych Tone produced sequences of length 63, all notes of the same durations, (thereafter repeating) and was way too long for most composers to consider.  I modified mine for shorter sequences of say 5 to 10, and that was used at times.

When used as a noise generator we need both a much longer sequence length and much higher clocking rate (sampling frequency).  The length of the sequence is 2^N – 1.  Essentially 2^N, so (2^N)*tau, where tau is the reciprocal of the sampling frequency,  should be at least several seconds.  Why so long  - it  would seem we couldn’t possibly detect a repetition after hundreds of thousands!

Well we often can.   What we detect is the sub-audio repetition of a sequence of audible events “clink - - - hiss - - - clank - - - sssss - -  - buzz ;     clink - - - hiss - - - clank - - - sssss - -  - buzz, . . . . . “ repeating every second or two (whatever the sequence length is). In actual circuits (and indeed, in the monolithic MN5847 this was known, and termed a “heartbeat”).  See references above.   Why?

The actual (full 2^N-1) PBRS for a proper “maximum length” case includes every possible sequence of 1’s and 0’s (except all zeros), and the feedback structure means that the generator evolves slowly INTO special cases (like a near square wave) and once established, it evolves slowly OUT (a resulting “clink”).  It doesn’t help enough to find a set of taps with one nearly at the input end.  What does work is to have TWO (or more) PRBS generators of different lengths and multiplying (EXOR) the outputs.

In the suggested case (which I may be misunderstanding) on this thread (called “127 bits” – I assume this was meant to be length N = 127), we have the curious result that the “noise” output is a series of pitches, not white.  Why?   Well 2^N-1 is 1.7 * 10^38, which at a digital audio rate is some 10^26 years of time. Further most PRBS generators start in the “all 1” state to avoid a stall.   This would explain why it never (for practical purposes) even gets a start away from the initial square-wave like patterns.   Richie apparently suspected this.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://synth-diy.org/pipermail/synth-diy/attachments/20190106/775e20e4/attachment.htm>

More information about the Synth-diy mailing list