[sdiy] converting white noise to pink noise

Scott Gravenhorst music.maker at gte.net
Wed Mar 5 15:41:40 CET 2008


Eric Brombaugh <ebrombaugh at earthlink.net> wrote:
>Andre Majorel wrote:
>> On 2008-03-04 16:38 -0700, Eric Brombaugh wrote:
>>> Andre Majorel wrote:
>>>> But note that long period does not imply good sound. For example,
>>>> http://www.maxim-ic.com/appnotes.cfm?appnote_number=1743&CMP=WP-9
>>>> is a 32-bit LFSR with a 2**32 period that does not sound very
>>>> white.
>>> I've been using LFSRs for years now and haven't come across any
>>> information on some polynomials providing better quality than
>>> others (aside from longer ones being more desirable in some
>>> situations).
>> 
>> Can't provide any, sorry. I was just playing with a C
>> implementation of this LFSR. Using a highly sophisticated tool
>> named a Hex-And-ASCII Dump Program, I noticed that its output was
>> strangely repetitive, with a pseudo-period of 15.5 bytes. No
>> wonder the spectrum sounds so peaky.
>
>Wow! There must have been something wrong with the implementation. A 
>period of 15.5 bytes is only 124 bits - nowhere near 2**31 
>(2,147,483,648) as it should have been. One thing that comes to mind is 
>that the appnote you reference has a block diagram of a 5-bit LFSR which 
>is unrelated to the 31-bit LFSR they constructed in the assembly code, 
>but that wouldn't have given the repeat length you saw.
>
>Note also that it's very easy when creating an LFSR to come up with a 
>degenerate case - if you pick off the wrong taps in the shift register 
>for the feedback term then you won't get a maximal-length sequence. I've 
>done this before myself and it can be frustrating.

I will add that sometimes the bit labeling is a bit weird.  I'm very much used to a
zero based numbering system for anything with "N bits" where N > 0, but some LFSR bit
taps I've seen, including the Xilinx link I posted, use a 1 based system.  From this
confusion an error can easily arise.

-- ScottG

-----------------------------------------------------------------

-- Scott Gravenhorst
-- GateMan-III - FPGA Based Monophonic MIDI Synthesizer with SVF
-- PolyDaWG/8 - FPGA Based 8 Voice Polyphonic MIDI Synthesizer
-- phLUTe - FPGA Based Monophonic Physical Model MIDI Synthesizer
-- FatMan: home1.gte.net/res0658s/fatman/
-- NonFatMan: home1.gte.net/res0658s/electronics/
-- When the going gets tough, the tough use the command line.




More information about the Synth-diy mailing list