Forums > MaxMSP

Gaussian Noise

September 8, 2010 | 1:29 pm

The Tutorial 17 (Data Structures And Probability) has a nice hands-on approach to creating random numbers in a gaussian distribution. I wonder if you can do the same with noise~-signals? I’ve tried (see the attached patcher), but it doesn’t seem to work.

I’m aware of that you can filter noise to make certain frequencies more prevailing than others. But I would really like to hear (and work with) what a truly gaussian noise-color might sound like!

All suggestions are very welcome!

– Pasted Max Patch, click to expand. –

September 8, 2010 | 2:17 pm

A couple of things:

1 – that’s not a very accurate transform to a gaussian distribution. To be honest, I not convinced it can really be described as gaussian in any strict sense – it’s just a rough approximation.

A much better method is:

http://en.wikipedia.org/wiki/Box–Muller_transform

2 – Although the *amplitude* distribution of Gaussian noise is by definition Gaussian, that doesn’t have any bearing on its correlation (which may be of different types). If you do not correlate the noise, then it will be white noise, and therefore uncoloured. In this regard it might not be worth your while investigating this, as perceptually the result is very similar to white noise with a flat amplitude distribution.

http://en.wikipedia.org/wiki/Gaussian_noise

HTH

Alex


September 8, 2010 | 6:08 pm

Peter Castine’s Litter Pro package has a gaussian generator.


September 8, 2010 | 9:24 pm

Thanx for the replies! :)

I guess I was a bit fast on that one – I’m just obsessed with distributions these days… a whole new territory to explore. I bet I have to research it further… But thanx again!


September 10, 2010 | 12:32 am

a-gaussnoise~ sounds good.



Jan
February 20, 2011 | 7:57 pm

Just in case someone is still folowing this, here is a little patch that I use as an abstraction to generate gaussian noise. It applies the Box Müller tranform and was orinally written by Andy Farnell in PureData (http://aspress.co.uk/sd/practical15.php)as part of his book Designing Sound.

– Pasted Max Patch, click to expand. –

February 21, 2011 | 9:54 am

Box-Muller is a relatively expensive way of generating Gaussian derivatives. I had a significant performance improvement in lp.gsss~ (the Gaussian noise generator from Litter Power) when I adapted the Kinderman-Ramage algorithm.

As to the original question: you could generate Gaussian noise by summing an infinite number of uniform noise sources. But that would cost a lot more CPU.-|

FWIW, one widely-used statistics package approximated a Gaussian distribution by summing a dozen uniform derivates. That’s about as costly as Box-Muller, just less accurate. It does, however, have the [possible] advantage that real "outliers" (extreme values) will never be generated. The extreme values that can occasionally be generated will play havoc with some MSP patches.

In general, you don’t really want to "listen" to Gaussian noise. Subjectively it can hardly be distinguished from flat white noise. Its primary raison d’être is for things like dithering.


Viewing 7 posts - 1 through 7 (of 7 total)