[sdiy] Pseudo randoms in software
Grant Richter
grichter at asapnet.net
Wed Nov 20 17:42:05 CET 2002
>
> Magnus Danielson wrote:
>
>>> Grant Richter wrote:
>>>
>>>> Another method is to send a high frequency clock into a counter with
>>>> rollover. i.e. spin a counter like slot machine wheels. Then use a slow
>>>> process to sample to counter like freezing the slot machine wheels. If the
>>>> two clocks are unsynchronized (like a RC oscillator feeding a pin) the
>>>> difference in speed should produce random results.
>>>
>>> This is actually a very nice idea, requiring minimum external components.
>>> With a nice fast external oscillator this should be really quite random.
>>> Just as I thought I was set on an idea .. now more options! ;)
>>
>> Well, it is not random enought. I even think it sound very repetitious. It
>> "looks" random at first thought.
>>
That is the process used to select stages for the "random" setting of the
ARP 1613 sequencer.
>
> Remember I'm trying to get a source for a random LFO, not digital noise.
>
Welcome to the land of Information Entropy. Random sources can be
characterized Claude Shannon's measure of "Entropy".
The calculation involves summing the "bins" of the histogram multiplied by a
weighing factor. If the log base 2 is used then the output is in "bits".
Maximal entropy is when every possible value is used once and only once.
This is typical of pseudo random shift registers which are simply counters
that count in an unknown order. Because they use each possible value only
once (per repetition) they represent maximal entropy for the shift register
length. But they will repeat the exact same sequence each time unless the
initial shift register value is changed each time.
Music has relatively low entropy because it is repetitious and self similar
over short time periods.
For more information on analog sources with variable entropy you can see:
http://www.musicsynthesizer.com/WoggleBug/WoggleBug.html
http://www.wiard.com/1200/Noise_Ring.html
and Mike Murphy's motherlode of designs at:
http://www.musicsynthesizer.com/MIC/mic.html
all of which are designed to produce "non-optimal" random sequences with
entropy numbers closer to music rather than noise.
More information about the Synth-diy
mailing list