Reply by Frederick Umminger August 3, 20042004-08-03
"ho" <gints@att.net> wrote in message
news:6zKOc.358958$Gx4.81611@bgtnsc04-news.ops.worldnet.att.net...
> fumminger@umminger.com wrote: > > If you can generate pink noise easily, just filter it with a 6 > > dB/octave high pass filter (i.e. a differentiator) to get the blue > > noise. There is plenty of literature on differentiators available > > online, and you may be able to get by with just taking the difference > > of successive samples. > > Pink noise needs a -3dB/octave low pass filter. > White noise filtered by a -6dB/octave low pass filter will > then be red noise, which is 1/(f*f). >
You are supposed to filter the _pink_ noise by a _high_ pass filter. -Frederick
Reply by ho July 31, 20042004-07-31
fumminger@umminger.com wrote:
> If you can generate pink noise easily, just filter it with a 6 > dB/octave high pass filter (i.e. a differentiator) to get the blue > noise. There is plenty of literature on differentiators available > online, and you may be able to get by with just taking the difference > of successive samples. > > Btw, the Voss-McCartney algorithm is a very inefficient way to > generate pink noise. You will do much better by applying a simple IIR > filter to a white noise stream. You can find the necessary filter > coefficients at the music-dsp source code archive > (http://www.musicdsp.org/).
Pink noise needs a -3dB/octave low pass filter. White noise filtered by a -6dB/octave low pass filter will then be red noise, which is 1/(f*f).
Reply by Andor Bariska July 28, 20042004-07-28
Allan Herriman wrote:
> Andor Bariska wrote:
...
>>I would still be cautious with using pink noise to generate blue noise. >>It seems that the defintion of pink noise is one with a spectral density >>~ min(c, 1/f) (from http://www.ptpart.co.uk/colors.htm) for some >>constant c. This seems to contradict the defintion of 1/f noises I am >>familiar with, for example in [1]. > > > This changed definition avoids some of the problems with the > traditional definition. > Some integrals did not converge when the lower limit was 0Hz and there > were problems with non-stationary statistics, etc. (But isn't that > what chaos is all about?) > http://www.firstpr.com.au/dsp/pink-noise/#Allan
I was always assuming (why?) that we were talking about stationary processes. There are no problems with any integrals for processes with a psd ~ 1/f^beta, with beta in ]0,1[ (so called fractional noises). These are all stationary. But, pink noise is in a class of non-stationary processes (parametrized with beta in [1,2]). One of its properties is that it is "infinitely" correlated with its long-past! This quite clearly is a difficult simulation problem :-) (fractional noises already are non-trivial). Thanks for posting that link, I ended up at this fascinating paper (which might also be of interest to the OP): Kasdin, N.J: "Discrete simulation of colored noise and stochastic processes and 1/f^? power law noise generation" Proceedings of the IEEE ,Volume: 83 , Issue: 5 , May 1995 (freely available through IEEE Explore from my university computer) Regards, Andor
Reply by Allan Herriman July 28, 20042004-07-28
On Wed, 28 Jul 2004 12:33:26 +0200, Andor Bariska <an2or@nospam.net>
wrote:

>Frederick Umminger wrote: >> "Andor Bariska" <an2or@nospam.net> wrote in message >> news:41050c8a$1@pfaff2.ethz.ch... >> >> >>>Yes, that's the whole point - the OP asked what kind of filter to use. I >>>suggested the first difference. If that isn't close enough, you can >>>generate a higher order FIR approximation of the differential operator, >>>but that usually is overkill. >> >> >> Approximating the differential operator will give a psd of f^2, not f. You >> are thinking of amplitude, not power. > >Thanks for pointing that out. I was lucky, in that for the first >difference filter H, > >|H(w)|^2 = 2 (1 - Cos(w) ), > >which is approximately ~ w around Pi/2 and thus still gives a reasonable >approximation for noise with spectral density ~ w if the input is white. > >I would still be cautious with using pink noise to generate blue noise. >It seems that the defintion of pink noise is one with a spectral density >~ min(c, 1/f) (from http://www.ptpart.co.uk/colors.htm) for some >constant c. This seems to contradict the defintion of 1/f noises I am >familiar with, for example in [1].
This changed definition avoids some of the problems with the traditional definition. Some integrals did not converge when the lower limit was 0Hz and there were problems with non-stationary statistics, etc. (But isn't that what chaos is all about?) http://www.firstpr.com.au/dsp/pink-noise/#Allan
>[1] Mandelbrot, B: "Some noises with 1/f spectrum, a bridge between >direct current and white noise" >Information Theory, IEEE Transactions on ,Volume: 13 , Issue: 2 , Apr 1967
Regards, Allan.
Reply by Andor Bariska July 28, 20042004-07-28
Frederick Umminger wrote:
> "Andor Bariska" <an2or@nospam.net> wrote in message > news:41050c8a$1@pfaff2.ethz.ch... > > >>Yes, that's the whole point - the OP asked what kind of filter to use. I >>suggested the first difference. If that isn't close enough, you can >>generate a higher order FIR approximation of the differential operator, >>but that usually is overkill. > > > Approximating the differential operator will give a psd of f^2, not f. You > are thinking of amplitude, not power.
Thanks for pointing that out. I was lucky, in that for the first difference filter H, |H(w)|^2 = 2 (1 - Cos(w) ), which is approximately ~ w around Pi/2 and thus still gives a reasonable approximation for noise with spectral density ~ w if the input is white. I would still be cautious with using pink noise to generate blue noise. It seems that the defintion of pink noise is one with a spectral density ~ min(c, 1/f) (from http://www.ptpart.co.uk/colors.htm) for some constant c. This seems to contradict the defintion of 1/f noises I am familiar with, for example in [1]. Regards, Andor [1] Mandelbrot, B: "Some noises with 1/f spectrum, a bridge between direct current and white noise" Information Theory, IEEE Transactions on ,Volume: 13 , Issue: 2 , Apr 1967
> > -Frederick Umminger > > >
Reply by Andor July 28, 20042004-07-28
Randy Yates wrote:
> an2or@mailcircuit.com (Andor) writes: > > [...] > > If I had to create noise with psd ~ f, I would filter white noise with > > the differential operator, which has a frequency response of f. A > > computationally extremely efficient approximation would be to use the > > first difference operator with impulse response h = {1,-1}. > > Wasn't there a song written about this? "Don't it make your brownian motion > blue?" ...?
Haha, that's good - who's song is that?
Reply by Frederick Umminger July 28, 20042004-07-28
"Andor Bariska" <an2or@nospam.net> wrote in message
news:41050c8a$1@pfaff2.ethz.ch...

> Yes, that's the whole point - the OP asked what kind of filter to use. I > suggested the first difference. If that isn't close enough, you can > generate a higher order FIR approximation of the differential operator, > but that usually is overkill.
Approximating the differential operator will give a psd of f^2, not f. You are thinking of amplitude, not power. -Frederick Umminger
Reply by Tony July 28, 20042004-07-28
On Tue, 27 Jul 2004 22:45:33 -0400, Jerry Avins <jya@ieee.org> wrote:

>Ah! here it is! > >No Name wrote: > >> Original poster here: >> >> First of all let me thank everyone for the rapid and cogent replies, >> many of which I might have a prayer of understanding after several >> years of protracted study. :-) >> >> I'll better clarify my problem, which I should have done in the first >> place, and then attempt to address some of your replies with >> quasi-intelligent questions. >> >> I'm trying to produce a sample of "blue noise" of arbitrary length >> (say 1-10 minutes), in 16-bit signed 44.1KHz PCM. A generic monaural >> wave file, basically, the same format as CDDA. That's all. So of >> course I can't get true blue noise, since my chunk of the spectrum >> ends at ~22KHz. And I don't need the process to be particularly >> computationally efficient, as it's only going to happen once in order >> to make a sample. Finally, I don't need exacting conformance to an >> ideal "blue noise" spectrum. It should be close enough for government >> work, so to speak, sort of like the output of Voss-McCartney is close >> enough to pink noise for many. > >Good. So run pink noise through a differentiator. Differentiators are >easy to make.
Yes, this is the important crux of the matter (that may have been implied in other posts too, although I didn't see it) - run PINK noise (not WHITE noise) through a differentiator. Differentiated white noise is purple noise. Tony (remove the "_" to reply by email)
Reply by Allan Herriman July 28, 20042004-07-28
On 27 Jul 2004 10:30:13 -0700, fumminger@umminger.com wrote:

>the Voss-McCartney algorithm is a very inefficient way to >generate pink noise. You will do much better by applying a simple IIR >filter to a white noise stream. You can find the necessary filter >coefficients at the music-dsp source code archive >(http://www.musicdsp.org/).
Relative efficiency depends on a number of factors. The Voss generator uses two random numbers for each output sample. Filtering methods use only one random number for each output sample. The Voss generator uses the same amount of processing regardless of the bandwidth of the output. IIR Filtering methods use an amount of processing that is roughly proportional to the number of octaves required. If you want a really wide output bandwidth, the Voss generator may be more efficient. Regards, Allan.
Reply by Jerry Avins July 27, 20042004-07-27
Ah! here it is!

No Name wrote:

> Original poster here: > > First of all let me thank everyone for the rapid and cogent replies, > many of which I might have a prayer of understanding after several > years of protracted study. :-) > > I'll better clarify my problem, which I should have done in the first > place, and then attempt to address some of your replies with > quasi-intelligent questions. > > I'm trying to produce a sample of "blue noise" of arbitrary length > (say 1-10 minutes), in 16-bit signed 44.1KHz PCM. A generic monaural > wave file, basically, the same format as CDDA. That's all. So of > course I can't get true blue noise, since my chunk of the spectrum > ends at ~22KHz. And I don't need the process to be particularly > computationally efficient, as it's only going to happen once in order > to make a sample. Finally, I don't need exacting conformance to an > ideal "blue noise" spectrum. It should be close enough for government > work, so to speak, sort of like the output of Voss-McCartney is close > enough to pink noise for many.
Good. So run pink noise through a differentiator. Differentiators are easy to make. ...
> Andor replies: > >>Yes, that's the whole point - the OP asked what kind of filter to use. I >>suggested the first difference. If that isn't close enough, you can >>generate a higher order FIR approximation of the differential operator, >>but that usually is overkill.
Since the input will be noise, and the output needs only to be the derivative od SOME noise but not necessarily THAT noise stream, I'm sure that a simple difference will do. But if bandwidth is consideration, a more symmetric differentiator might be a more comfortable choice.
> Okay. I don't know what a differential operator is, nor the first > difference operator. In fact, I'm kind of afraid to venture a wild > guess, so I'll just ask, what is it? It sounds like Andor thinks this > would produce a reasonable facsimile of blue noise, which is what I > want. Can anyone suggest *holds breath* a free software package with > which I might be able to apply this sort of a filter to a pre-existing > (or generated) sample/stream of white noise?
Not exactly. First generate pink noise by some known means, then send out not the generated samples, but the difference between the current one and the last one. Then do it again. And again ...
> Bernhard Holzmayer writes: > >>High-pass filter with the 3db-point at the maximum frequency where >>your noise spectrum ends. The whole band is on the flange of the >>filter - you don't use the passband region.
>
> Wouldn't this make the entire spectrum into one octave?
No, but forget it. ...
>>If you can generate pink noise easily, just filter it with a 6 >>dB/octave high pass filter (i.e. a differentiator) to get the blue >>noise. There is plenty of literature on differentiators available >>online, and you may be able to get by with just taking the difference >>of successive samples.
That's the ticket!
> This sounds similar to the suggestions offered above about filtering > white noise. Now, based on an educated guess, wouldn't the result of > filtering pink noise in this manner have very low amplitude, as most > of the power in pink noise is at the low end, whereas most in blue > noise is at the high end?
Pink noise has many uses and ways to make from white it are well known. The blue noise you want can be made similarly, but You'd have to work out the details yourself. Using filters to go from white -> pink -> blue is more roundabout, but all the steps are well known.
>>Btw, the Voss-McCartney algorithm is a very inefficient way to >>generate pink noise. You will do much better by applying a simple IIR >>filter to a white noise stream. You can find the necessary filter >>coefficients at the music-dsp source code archive >>(http://www.musicdsp.org/). > > You're probably right. However, the Voss-McCartney algorithm is easy > to implement in assembly language for one's honors project. ;-) > Though skimming musicdsp.org, that does look even easier on the > surface. Oh well.
As you wish.
> Also, of course, I only need to generate the noise once, as I only > need samples of it (pink or blue).
You have to write the program once, no matter how many times you want to run it. It's a wash
> One erratum: pink noise is described more accurately (I believe) as > follows: "Since power is proportional to amplitude squared, the > energy per Hz will decline at higher frequencies at the rate of about > -3dB per octave. To be absolutely precise, the rolloff should be > -10dB/decade, which is about 3.0102999 dB/octave." Source: > http://www.firstpr.com.au/dsp/pink-noise/ > > I don't know what a decade is, but perhaps it makes a difference to > some of you to describe it like that.
An octave is a frequency ratio of two. A decade is a frequency ratio of ten. Pretty close, 10 octaves is three decades. 10 dB/10ade is 3 dB/8ve. (2^10=1024, 20^3=1000. Close enough for gummint work.) Jerry -- Engineering is the art of making what you want from things you can get. &#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;