News:

SMF for DIYStompboxes.com!

Main Menu

Whitey

Started by Kipper4, November 19, 2019, 03:07:32 PM

Previous topic - Next topic

anotherjim

LFSR tutorials often only go as far as the shift register. I would say that even if you have understood how the randomness is generated, there are several unanswered questions on the way to getting a useful audio output.

How do you tap the noise off from the shift register?
How fast do you need to clock it?
How do you get a fixed amplitude datastream to reach wide-ranging amplitude such as the 0-10v in an analogue synth?

I can "suppose" most of this, or just copy a published solution, but I really don't know enough to teach anyone.

ElectricDruid

Quote from: anotherjim on November 22, 2019, 04:18:23 AM
LFSR tutorials often only go as far as the shift register.
This is often because the details of the implementation vary - could be hardware, firmware, XOR,XNOR, Galois, Fibonacci, etcetera

Quote
How do you tap the noise off from the shift register?
Just connect a cap to one of the outputs to AC-couple the signal out. That gives you digital noise (e.g. the level is either high or low, but nothing in between). Adding a little RC lowpass turns it back into analogue white noise, much more useful if you want to feed a sample-and-hold, for example. The RC rolloff should be set for your highest audio frequency.

Quote
How fast do you need to clock it?
The noise spectrum is only flat out to about 0.4 of the sample rate or so, so you can reckon on needing x2.5 of whatever you regard as your highest audio frequency. For 20KHz, you'd need at least 50KHz. For 25KHz, you'd need at least 60-65KHz. Higher is better, basically. My noise chips run at about 90KHz.

Quote
How do you get a fixed amplitude datastream to reach wide-ranging amplitude such as the 0-10v in an analogue synth?
If you're outputting 0-5V pulses, and then averaging the result (that's what the lowpass does), you know that the output can only be from 0-5V. In practice, it will mostly hover around the middle since it is averaging. So if I wanted 0-10V, I'd add gain of a x2 to x3 or x4, depending on how much/how often I could tolerate a little clipping.

Hope that helps.

anotherjim

Diolch yn fawr Tom.

By "one of the outputs", I think you refer to shift register bit taps or the carry/borrow ends? The same bit sequence always visits one of them sooner or later

I would have picked x2.5 clocking purely to suit Nyquist, I didn't know about the spectrum thing.


ElectricDruid

Quote from: anotherjim on November 22, 2019, 03:25:39 PM
Diolch yn fawr Tom.

By "one of the outputs", I think you refer to shift register bit taps or the carry/borrow ends? The same bit sequence always visits one of them sooner or later
Yes, the bit taps. As you say, since it's a shift register, the sequence appears at all of them sooner or later. It's just shifted a few places is all. Consequently, which tap you use doesn't really matter.

Quote
I would have picked x2.5 clocking purely to suit Nyquist, I didn't know about the spectrum thing.

There's a null at x0.5 (nyquist) where the response nosedives down to zero. How far back from that edge you have to come to regard the output as "flat" is a question of taste. You could decide -3dB is close enough, or -6dB, or whatever. The response looks like this:



That first null is x0.5 of the sample rate. You want to make sure that's high enough above the part you're interested in that the curve down into the null isn't affecting anything important. Since the null is at x2, going to x2.5 is a good option, and x3 is still more conservative. It just depends on the application. For music, I don't think we really need to build test equipment, so I don't fuss too much - lots of the best gear is loved for its faults or limitations as much as its abilities. It's more about sound, not technical performance.



Kipper4

If you like you noise white or pink Toms Noise2 chip is great.
Thanks for the prompt delivery. I think this chip should definitely be the background of a quick and easy circuit build.
I'll update when I've had a bit more of a play.
Cheers Mate
Ma throats as dry as an overcooked kipper.


Smoke me a Kipper. I'll be back for breakfast.

Grey Paper.
http://www.aronnelson.com/DIYFiles/up/

Kipper4

Ma throats as dry as an overcooked kipper.


Smoke me a Kipper. I'll be back for breakfast.

Grey Paper.
http://www.aronnelson.com/DIYFiles/up/

MrStab

helpful information:

in Scotland, and i think parts of England, "whitey" means either feeling ill or throwing up. it refers to the paleness seen upon such actions, and i assume it emerged from teenagers smoking too much dope.

(ha! "emerged")
Recovered guitar player.
Electronics manufacturer.

Kipper4

Ma throats as dry as an overcooked kipper.


Smoke me a Kipper. I'll be back for breakfast.

Grey Paper.
http://www.aronnelson.com/DIYFiles/up/