[sdiy] Non maximal-length LFSR

Richie Burnett rburnett at richieburnett.co.uk
Fri Mar 4 12:34:30 CET 2016


> I still think there should be nothing stopping you from implementing 16
> 47-bit registers in your 48-word buffer.  Just don't look all the way back
> in the buffer when you generate the new bits.

You're right.  But that needs two instances of offset addressing into the 
buffer which I don't think I can do on my platform without adding another 
instruction.  I'll check though.

If I'm going to add more instructions I might as well break the dependency 
between the LFSR register length and the audio buffer length.  For instance 
I could use a 47-bit LFSR with a trusted maximum-length polynomial, but 
write the results into a separate 48-word audio buffer.  But i'm trying to 
get round doing this.

At the moment I'm most tempted to switch the circular buffer to 49 words of 
length, and use a trusted polynomial for maximum-length sequence with 49-bit 
shift-register.  Then I'm on well-trodden safe ground.  That way I can 
generate all of the 49 words of noise with just 49 iterations of two 
instructions (98 instructions.)  And when it comes to reading out the noise 
from the buffer I just read out the first 1ms worth (48 samples) and ignore 
every 49th sample.  Sure the resulting sequence will be a smidgen shorter, 
but 2^49-1 is quite long anyway.

-Richie, 




More information about the Synth-diy mailing list