[sdiy] digital noise band generator?
Tom Wiltshire
tom at electricdruid.net
Thu Aug 25 12:06:21 CEST 2011
On 25 Aug 2011, at 04:41, Paul Perry wrote:
> I expect that there may be a simple (algorithm running on micro) way to generate a band of white noise.
> And maybe even a way to dial in a few parameters to tune it.
> I must confess that my immediate need is to aid a friend suffering from tinnitus, but doubtless it would be a handy thing to have in a modular rack!
>
> OK, I'll probably end up with a standard noise source and analog filters - but I am curious to hear what the algorithmists have to say.
>
> paul perry Melbourne Australia
"a band of white noise" - isn't that a contradiction in terms?! </pedant>
The noise source part of this is simple enough - like Matthew said, a LFSR does an admirable job. Choose the length to suit, but it's easy to make them so long that they'll never ever repeat.
Recently I've also used the following 'budget' linear congruential generator (LCG) algorithm, suggested to me at some point by Antti:
a = 20077
c = 12345
current = {some seed value}
next = (current * a + c) & 65535
On a 16-bit chip, this produces a new 'random' number for two instructions, which is one instruction away from unbeatable!
For the filtering, Olivier Gillet's Shruthi has a nice filter after the noise gen;
"The parameter controls the frequency of a simple 1-pole low-pass/high-pass filter in which is sent white noise. From 0 to 63, high-frequency content is progressively added. From 63 to 127, low-frequency content is progressively removed."
(http://mutable-instruments.net/shruthi1/manual)
You'd have to ask him or check his code to see how he did it.
Hope this helps,
T.
More information about the Synth-diy
mailing list