Csound Csound-dev Csound-tekno Search About

Re: Pink Noise?

Date1998-12-28 23:41
FromJosep M Comajuncosas
SubjectRe: Pink Noise?
Hi,
there was a short talk about this topic at music.dsp some weeks ago. Here
you have two -3dB/oct filter (approximations!) posted to that list. You can
port them to csound with rand, biquad and kfilter2, or coding them directly
of course.
Hope this helps,

Josep M Comajuncosas


How to make pink noise
----------------------

This is an approximation to a -3dB/oct filter using a weighted sum
of 6 first order low-pass filters. The weighting coefficients (the
second number on each line) need to be scaled to suit your
application (ie. the amplitude of your white noise input and what
peak or rms output level you want).

   ...

  white = (double)(rand() - HALF_RAND_MAX);

  buf0 = 0.997 * buf0 + 0.029591 * white;
  buf1 = 0.985 * buf1 + 0.032534 * white;
  buf2 = 0.950 * buf2 + 0.048056 * white;
  buf3 = 0.850 * buf3 + 0.090579 * white;
  buf4 = 0.620 * buf4 + 0.108990 * white;
  buf5 = 0.250 * buf5 + 0.255784 * white;

  pink = buf0 + buf1 + buf2 + buf3 + buf4 + buf5;

an equiripple approximation to the ideal pinking filter can be realized by
alternating real poles with real zeros.  a simple 3rd order solution that i
obtained is:

        pole            zero
        ----            ----
        0.99572754      0.98443604
        0.94790649      0.83392334
        0.53567505      0.07568359

the response follows the ideal -3 dB/octave curve to within + or - 0.3 dB
over a 10 octave range from 0.0009*nyquist to 0.9*nyquist.  probably if i
were to do it over again, i'd make it 5 poles and 4 zeros.


> At 02:58 PM 12/27/98 -0500, Brandon Nelson wrote:
> >Can anyone tell me how to create pink noise? I've designed an instrument
> >that uses Butterworth filtered noise to create a pipe-like sound, and it
> >took me forever to realize why the low notes had no energy.


Date1999-01-04 10:34
FromAndreas Schoter
SubjectEmacs mode?
Hi,

Does anyone know of any Emacs mode code for editing CSound orc and sco files?

Many Thanks

Andreas

________________________________________________________________________
                                     Dr Andreas Schöter, Intertrader Ltd
                                              http://www.intertrader.com

Date1999-01-04 14:43
FromAndreas Schoter
SubjectRe: Emacs mode?
Hi,

Sorry about that :-)  Just to follow up on my own previous request I
tracked down some emacs code at:

ftp.maths.bath.ac.uk/pub/dream/utilities/Emacs-macros

Andreas

________________________________________________________________________
                                     Dr Andreas Schöter, Intertrader Ltd
                                              http://www.intertrader.com