[Fwd: Re: [sdiy] Simplest random source]

Magnus Danielson cfmd at swipnet.se
Mon Nov 18 16:50:22 CET 2002


From: René Schmitz <uzs159 at uni-bonn.de>
Subject: Re: [Fwd: Re: [sdiy] Simplest random source]
Date: Mon, 18 Nov 2002 12:00:13 +0100

> 
> Hi Seb, Magnus and List

Hi Seb, René and all of you others...

> There is no need to run this algorithm 16 times to get to a 16bit value. The 
> contents of the shift register change with every iteration. You can use the 2 
> lower/higher bytes directly as your random value. If it confuses you that the 
> value of the i-th bit is determined by what i-1 was in the iteration before, 
> well this whole thing is anything else but random, but purely deterministic.

After I posted last night I came to recall that you want the new bits to be
shifted in from the MSB end and not the LSB end in order to properly model the
exponential decay of a RC filter. If you just rob the bits from any of the
SHIFT bytes, they will shift in at LSB, which is equalent as to have a
highpass filter/derivator where we want a lowpass filter/integrator style
property. It is however not much magic behind performing that. You just
rotate right one (for a 8 bit value) or two (for a 16 bit value) to perform
the operation. Then you need to toss the value out, but that is a pure
MOVF/MOVWF operation per byte.

Also, the lowpass filter property you acheive by this is still with a very
high cutoff, and a lower cutoff in analog is still perferred.

Cheers,
Magnus



More information about the Synth-diy mailing list