### Gaussian Noise

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!

**all**of the following text. Then, in Max, select

*New From Clipboard*.

----------begin_max5_patcher---------- 467.3oc2V1saBBCEG+Z3ono2NmiRo7wtaOGKKKHzocQZIzZlSi9rOZqL0MMh Jik3MsoGNbN+O+NEZW55.GIlSkPvifmANNKccbLlzFb1r1AVjNOaZpz3FTVR yTUBYlnjtFNv5AeVAiOkpLt3u0nXlpwJZiUqI0mkTaVgPvKadDK2jAwn2uOo IxkoprIL93WqpSq8MR7F5M.fhMSXO6J8z2ARJ3hcyYQ85rIUhBSN8zFW45pG FzxplS+nVVMhRQmazB7g0.7vFquI3JIagIGHzPRBAEG0A.RxFySmdPLEFtax 4o1BD9TEq9ENNAQDCyBLSXrdz2vutiL2s9+DKjqAKnHCV7GRt0vRvEgE+PMO hi+6nBWvjzymLntiL3KhLXyNERhdz9wzsGY7uh8L3vaXxPhtlexP5.xPWjml cNmA686pH9jREG5sUq5wKRqiSY7yQp9mniL..Yb0AaLQml916N3au5PvO4uI nvoL9OuYjIfZ66WnRwrprF80brLX60QxoREimpXB9NNEsmOSX44T9tMoBVdo ntF2ngiP8NURI8qjBZgjzGkCP8mlvsQSA8ql7aql5udGIps8tdb+DoMZJrW0 TavTbutapsJ5RYT8hUteA768JcB -----------end_max5_patcher-----------

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

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

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!

a-gaussnoise~ sounds good.

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.

**all**of the following text. Then, in Max, select

*New From Clipboard*.

----------begin_max5_patcher---------- 805.3ocyYF0aaCBDG+4To9c.Ysm5Zi3.iMdZZR6ywT0jaBMkoXbWLQKaUKe1 GFhaS6pan1oPengjyf8e9cGGGt2c5ISRtpdinIA8Iz2PSlbmwxDqsVKS5LLI opbyrkkM1NlnD+p9pejb9tqoEazV62VpmciXU4pEMH7zz66fZcU8Z8Rg1NbR m4qqUZUYkvN1utRVt79Q35t922JbJKI4byenK6ttbtcPFUbAMY+6Wi7O1g.j o3N6VYIUK99JwLs69QI4lqiH31OKR699CO.ijkpNECVi+8zSZaMMm6Mobyid .A9YlMjjWP0PtU0TWCg08Yexty5r5pJgx4iRF7boOut7ZzGtF9LFouQnPXjX Yin0ROyZXPt+m00ywCw2SxosfK2hOfRdyb9uLv9B3.FDPfkyFAvXj2ZfYuGG hB9NUSSN7Txs9+fKjvgYgzYaOlQ.MxEJy0eV3vFTb.jmYS+jZyWZhCXuXb.4 nCHUsrQDNHQFzhkcqOJrrJMK3YWlU2DNDACCQTW.jc0GM7Hp4mqzgiQ3wrVy 1MDkGbFc1VzEjogBRzw.IhqdnT7AfzwOgzx5EaQjo4.mvgPwJBLFVQKZa34A mUeLXq3fhw.H.hztaWDN.kMnz1tyLYh0aaxBOfLSosHHX4jfgUrLwFFALVj1 +2Ro9O88wGSzQblB.aSGwnQX+sfAHxHRGAYrHkNJf4qGyFZ.gGI.0VgT.yFM rJjJbugqhHUfj4lKqVW0lPJTfhOBN4Bo3QfSkaBMmxGDmv1pibEbyoAmSg8M ..i.Qthkd06+65VxRo5+do71mU6EdB3ZpWuZV2zoqvEzdOv4hFsTUpk0p86U 1i60Mx4yEpG85tpjyusVpz6TB5x98mdKNlWhiDEs8TjzC3LGu.AgWbDuEWDH G3k3hjaE6k3fn3Vy8VauJvA.tsfH.RcmYic+uNJpl6kpwwwc6i13CDnYtisX JnZ2OBmjyiCMK7JeMDEwQ7Bbz3DGR8JsCKNhi40tIr33VY9QNVbDG3s3hvtI dUcEONwbs+KY8HMWbbqz2wZCndWPO7dUbjnHNtek9QGsas0fo4e.sMsLUA -----------end_max5_patcher-----------

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.

Has anyone found a relatively inexpensive way to get a Gaussian distribution in gen~?

Forums > MaxMSP