Sign in

username:

password:



Not a member?

Search compdsp



Search tips

comp.dsp by Keywords

Adaptive Filter | ADPCM | ADSP | ADSP-2181 | Aliasing | AMR | Anti-Aliasing | ARMA | Autocorrelation | AutoCovariance | Beamforming | Bessel | Blackfin | Butterworth | C6713 | CCS | Chebyshev | CIC Filter | Circular Convolution | Code Composer Studio | Comb Filter | Compression | Convolution | Cross Correlation | DCT | Decimation | Deconvolution | Demodulation | DM642 | DSP Boards | DSP/BIOS | DTMF | Echo Cancellation | Equalization | Equalizer | ETSI | EZLITE (Ez-kit Lite) | FFT | FFTW | FIR Filter | Fixed Point | FSK | G.711 | G.723 | G.729 | Gaussian Noise | Goertzel | GPIO | Hilbert Transform | IFFT | IIR Filter | Interpolation | Invariance | JTAG | Kalman | Laplace Transform | Levinson | LPC | McBSP | MIPS | Modulation | MPEG | Multirate | Notch Filter | Nyquist | OFDM | Oversampling | Pink Noise | Pitch | PLL | Polyphase | QAM | QDMA | Quantization | Quantizer | Radar | Random Noise | Reed Solomon | Remez | Resampling | RTDX | Sampling | Sharc | TI C6711 | Undersampling | Viterbi | Wavelets | White Noise | Wiener Filter | Windowing | XDS510PP | Z Transform

Sponsor

Industry's highest performing at the lowest power DSPs now as low as $5.00*
Start development today!
*volume pricing for 10ku

Discussion Groups

Free Online Books

See Also

Embedded SystemsFPGAElectronics

Discussion Groups | Comp.DSP | Blue Noise creation via filtering?

There are 25 messages in this thread.

You are currently looking at messages 0 to 10.


Blue Noise creation via filtering? - No Name - 2004-07-25 21:31:00

Hello all, I trust I'm not intruding.  I'm interested in creating
"blue noise", as referred to in the following "Colors of Noise FAQ"
posted in comp.dsp, and other sources:

http://tinyurl.com/45h2k

A quick synopsis:  "blue noise" is so named because the power is
concentrated at the high end of the spectrum.  It has a power
distribution of P = f, vs. P = 1/f for pink noise.

Pink noise, or a reasonable facsimile thereof, is easy to generate
using streams of random numbers.  I've written a program to do it
using the Voss-McCartney algorithm and it works well.

However, I don't see any way to algorithmically generate blue noise,
which seems to me to sort of be the inverse of pink noise.  So I
presume the only way to do so would be to filter white noise with a
high-pass filter that rolls off at 3.02dB/octave .. and here is where
I get out of my depth.  I have no musical knowledge, have only the
vaguest sense of what an octave is, and I don't know of any software
that can effect such a high-pass filter.  There is plenty of software
that can do, for example, a filter that will pass everything above
3KHz with a 500Hz transition band, but that isn't what I need.

I'd be grateful for any suggestions on software that I could use to
make blue noise in this manner.  :-)

______________________________
New DSP Code Snippets Section now Live.   Learn more about the reward program for contributors here.

Re: Blue Noise creation via filtering? - Mark Borgerding - 2004-07-25 22:31:00



No Name wrote:
> Hello all, I trust I'm not intruding.  I'm interested in creating
> "blue noise", as referred to in the following "Colors of Noise FAQ"
> posted in comp.dsp, and other sources:

> A quick synopsis:  "blue noise" is so named because the power is
> concentrated at the high end of the spectrum.  It has a power
> distribution of P = f, vs. P = 1/f for pink noise.
> 
> Pink noise, or a reasonable facsimile thereof, is easy to generate
> using streams of random numbers.  I've written a program to do it
> using the Voss-McCartney algorithm and it works well.

How about inverting the spectrum of pink noise?

In other words, mix the folding frequency (pi) to DC.

-- Mark
______________________________
New DSP Code Snippets Section now Live.   Learn more about the reward program for contributors here.

Re: Blue Noise creation via filtering? - Bernhard Holzmayer - 2004-07-26 01:15:00

No Name wrote:

> Hello all, I trust I'm not intruding.  I'm interested in creating
> "blue noise", as referred to in the following "Colors of Noise
> FAQ" posted in comp.dsp, and other sources:
> 
> http://tinyurl.com/45h2k
> 
> A quick synopsis:  "blue noise" is so named because the power is
> concentrated at the high end of the spectrum.  It has a power
> distribution of P = f, vs. P = 1/f for pink noise.
> 
> Pink noise, or a reasonable facsimile thereof, is easy to generate
> using streams of random numbers.  I've written a program to do it
> using the Voss-McCartney algorithm and it works well.
> 
> However, I don't see any way to algorithmically generate blue
> noise,
> which seems to me to sort of be the inverse of pink noise.  So I
> presume the only way to do so would be to filter white noise with
> a high-pass filter that rolls off at 3.02dB/octave .. and here is
> where
> I get out of my depth.  I have no musical knowledge, have only the
> vaguest sense of what an octave is, and I don't know of any
> software
> that can effect such a high-pass filter.  There is plenty of
> software that can do, for example, a filter that will pass
> everything above 3KHz with a 500Hz transition band, but that isn't
> what I need.
> 
> I'd be grateful for any suggestions on software that I could use
> to
> make blue noise in this manner.  :-)

Just my 2 ct:

Idea no 1 (1ct)

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.

Idea no 2 (1ct) 

In the frequency domain, define your spectrum, then do an inverse 
FFT, which will give you the desired noise.

Note:
if you consider a digital system ( a sampled signal), you'll have an 
upper frequency limit, which is half your sampling frequency.
Your blue noise spectrum ends on that maximum frequency, therefore 
isn't really blue...
Even an analog system will not be able to produce real blue noise, 
because this would require infinite power at highest frequencies.


Bernhard
______________________________
New DSP Code Snippets Section now Live.   Learn more about the reward program for contributors here.

Re: Blue Noise creation via filtering? - Andor - 2004-07-26 03:28:00

Mark Borgerding wrote:
...
> > A quick synopsis:  "blue noise" is so named because the power is
> > concentrated at the high end of the spectrum.  It has a power
> > distribution of P = f, vs. P = 1/f for pink noise.
...
> How about inverting the spectrum of pink noise?
> 
> In other words, mix the folding frequency (pi) to DC.

That's a good idea to create noise with a spectral density ~ 1/(pi-f)
(*), which does not seem the OP wants.

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}.

Regards,
Andor

(*) So called pink noise or 1/f noise really has a psd ~ 1/f^beta,
with the parameter beta somewhere in the range of ]0,1[. Note that the
psd has to be integrable for the autocorrelation function (and hence
the time series) to exist. alpha = 1 - beta is called the long-range
correlation or Hurst parameter.

> 
> -- Mark
______________________________
New DSP Code Snippets Section now Live.   Learn more about the reward program for contributors here.

Re: Blue Noise creation via filtering? - Mark Borgerding - 2004-07-26 08:53:00

Andor wrote:
> Mark Borgerding wrote:
> ...
> 
>>>A quick synopsis:  "blue noise" is so named because the power is
>>>concentrated at the high end of the spectrum.  It has a power
>>>distribution of P = f, vs. P = 1/f for pink noise.
> 
> ...
> 
>>How about inverting the spectrum of pink noise?
>>
>>In other words, mix the folding frequency (pi) to DC.
> 
> 
> That's a good idea to create noise with a spectral density ~ 1/(pi-f)
> (*), which does not seem the OP wants.

Good point. I looked at the document link provided by OP.
It describes pink noise as "power density decreases 3dB per octave"
It describes blue noise as "power density increases 3dB per octave"

Without thinking too hard, it sounded like spectral inversion.  I don't 
usually think in terms of octaves.

> 
> 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}.

That's a bit closer, but not quite right either.  The mag2 frequency 
response of h=[1,-1] is pretty curvy. |H(theta) |^2 is not ~theta.

H(Z) = 1 - Z^-1 = 1 - exp(-j theta )

A quick plot:
	theta=linspace(0,pi);
	plot( abs( 1 - exp( -j * theta ) ).^2 )

Interestingly, you can alias the curved parts together by decimating by 
two without LPFing.  This makes the power curve nice and linear. 
Unfortunately, that line is considerably offset from zero at DC due to 
the aliased power. So even though the power curve is straight, no 
scaling can make it proportional to f.

*shrug*

I'd probably go with filtering white noise as OP suggested.



<PLUG> Come attend my sessions at the comp.dsp conference this week.
"Fast Convolution Filtering: From Basics to Filter Banks"
</PLUG>

Mark
______________________________
New DSP Code Snippets Section now Live.   Learn more about the reward program for contributors here.

Re: Blue Noise creation via filtering? - Andor Bariska - 2004-07-26 09:52:00

Mark Borgerding wrote:
> Andor wrote:
> 
>> Mark Borgerding wrote:
>> ...
>>
>>>> A quick synopsis:  "blue noise" is so named because the power is
>>>> concentrated at the high end of the spectrum.  It has a power
>>>> distribution of P = f, vs. P = 1/f for pink noise.
>>
>>
>> ...
>>
>>> How about inverting the spectrum of pink noise?
>>>
>>> In other words, mix the folding frequency (pi) to DC.
>>
>>
>>
>> That's a good idea to create noise with a spectral density ~ 1/(pi-f)
>> (*), which does not seem the OP wants.
> 
> 
> Good point. I looked at the document link provided by OP.
> It describes pink noise as "power density decreases 3dB per octave"
> It describes blue noise as "power density increases 3dB per octave"
> 
> Without thinking too hard, it sounded like spectral inversion.  I don't 
> usually think in terms of octaves.
> 
>>
>> 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}.
> 
> 
> That's a bit closer, but not quite right either.  The mag2 frequency 
> response of h=[1,-1] is pretty curvy. |H(theta) |^2 is not ~theta.
> 
> H(Z) = 1 - Z^-1 = 1 - exp(-j theta )

I guess by theta you mean the frequency parameter. The magnitude 
response of the first difference filter is strictly monotonic 
increasing, rising from 0 to 2. It has magnitude response

|H(w)| = |1 - Exp(-j w)| = 2 Sin(w),

resp. magnitude squared response

|H(w)|^2 = 2 (1 - Cos(w) )

for 0<= w <= Pi.

For w around Pi/2, |H(w)|^2 is ~ w, and deviates accordingly for w 
around 0 and Pi. As I wrote, it is an approximation of the differential 
operator. For a noise generator, it might be close enough (and it's main 
advantage is computational efficiency).


> I'd probably go with filtering white noise as OP suggested.

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.

> <PLUG> Come attend my sessions at the comp.dsp conference this week.
> "Fast Convolution Filtering: From Basics to Filter Banks"
> </PLUG>

Have you written a proceeding on that? Sounds interesting.

Regards,
Andor

______________________________
New DSP Code Snippets Section now Live.   Learn more about the reward program for contributors here.

Re: Blue Noise creation via filtering? - Andor Bariska - 2004-07-26 10:01:00

Andor Bariska wrote:

> |H(w)| = |1 - Exp(-j w)| = 2 Sin(w)
                               ^^^^^
Correction:
|H(w)| = |1 - Exp(-j w)| = 2 Sin(w/2)

______________________________
New DSP Code Snippets Section now Live.   Learn more about the reward program for contributors here.

Re: Blue Noise creation via filtering? - Randy Yates - 2004-07-26 17:31:00

Mark Borgerding <m...@borgerding.net> writes:
> [...]
> <PLUG> Come attend my sessions at the comp.dsp conference this week.
> "Fast Convolution Filtering: From Basics to Filter Banks"
> </PLUG>

I look forward to hearing you talk on this interesting topic, Mark.
-- 
%  Randy Yates                  % "Ticket to the moon, flight leaves here today 
%% Fuquay-Varina, NC            %  from Satellite 2"
%%% 919-577-9882                % 'Ticket To The Moon' 
%%%% <y...@ieee.org>           % *Time*, Electric Light Orchestra
http://home.earthlink.net/~yatescr
______________________________
New DSP Code Snippets Section now Live.   Learn more about the reward program for contributors here.

Re: Blue Noise creation via filtering? - Stephan M. Bernsee - 2004-07-27 05:14:00

On 2004-07-26 07:15:57 +0200, Bernhard Holzmayer 
<h...@deadspam.com> said:
> 
> Idea no 2 (1ct)
> In the frequency domain, define your spectrum, then do an inverse FFT, 
> which will give you the desired noise.

Just an addition: you need to make sure that you're using random phases 
for the reconstruction to actually get a noise sequence from your 
transform. You also need to make sure your transform length is 
sufficiently large - if you use that recipe in a STFT way overlapping 
will introduce artifacts if you don't calculate your phases carefully.

As an easy alternative, you could use the resulting impulse response as 
a FIR filter on white noise.
-- 
Stephan M. Bernsee
http://www.dspdimension.com

______________________________
New DSP Code Snippets Section now Live.   Learn more about the reward program for contributors here.

Re: Blue Noise creation via filtering? - 2004-07-27 13:30:00

No Name <n...@spizam.com> wrote in message news:<m...@4ax.com>...
> A quick synopsis:  "blue noise" is so named because the power is
> concentrated at the high end of the spectrum.  It has a power
> distribution of P = f, vs. P = 1/f for pink noise.
> 
> Pink noise, or a reasonable facsimile thereof, is easy to generate
> using streams of random numbers.  I've written a program to do it
> using the Voss-McCartney algorithm and it works well.
> 
> However, I don't see any way to algorithmically generate blue noise,
> which seems to me to sort of be the inverse of pink noise.  So I
> presume the only way to do so would be to filter white noise with a
> high-pass filter that rolls off at 3.02dB/octave .. and here is where

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/).

Sincerely,
    Frederick Umminger
______________________________
New DSP Code Snippets Section now Live.   Learn more about the reward program for contributors here.

| 1 | 2 | 3 | next