[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Computing noise bands



DEAR AUDITORY LIST MEMBERS:

     SOME TIME AGO, I ASKED THE LIST ABOUT METHODS FOR COMPUTING
NARROW NOISEBANDS.  HERE IS THE INFORMATION I RECEIVED.  THERE IS
A QUICK WAY TO FIND THINGS BY SEARCHING FOR THE KEYWORDS LISTED
BELOW.

     (SECTIONS ON THE SAME TOPIC ARE SEPARATED BY A ROW OF #####.
DIFFERENT TOPICS ARE SEPARATED BY A DOUBLE ROW OF ####.)


     - AL BREGMAN


KEYWORD             DESCRIPTION
-------             -----------

$$DOSPROG           PROGRAM THAT COULD WORK IN DOS, SENT BY
                    STUART ROSEN (WRITTEN IN C).

$$SUNPROG           SAME AS ABOVE, BUT FOR SUN COMPUTER.

$$SOFT-FILT         SOFTWARE FILTERING OF RANDOM NOISE

$$FREQ-DOMAIN       METHODS INVOLVING SPECIFYING THE SIGNAL IN
                    THE FREQUENCY DOMAIN.

$$MATLAB            METHOD USING MATLAB

$$FORTAN            USES FORTAN CODE TO DO ADDITIVE SYNTHESIS OF
                    NOISE BANDS (ALSO FFT TO SUM THE SINUSOIDS

$$ADDITIVE          COMMENTS ON THE METHOD OF ADDITIVE SYNTHESIS
                    (USING INVERSE FFT)

$$LOWPASS           MULTIPLYING LOW-PASS NOISE BY A SINUSOID

$$REQUESTS          PEOPLE WHO WANT TO BE TOLD WHAT I FIND OUT


#################################################################
#################################################################


$$DOSPROG

Date: Mon, 10 May 93 08:31:38 BST
From: stuart@phonetics.ucl.ac.uk (Stuart Rosen)
To: in09@musicb.mcgill.ca
Re: Narrow bands of noise, III
Sender: stuart@phonetics.ucl.ac.uk

-----------------------------

Dear Al,

Over the weekend I came across a DOS-able version of that
program I sent you earlier. As I remember, it was the
initial version, so I cannot be completely sure about what it
does, and about how much the two versions differ. In essence,
I would think they vary little.

Anyway, here are the programs, with file names delimited by "????????".
I used Turbo-C in developing this. I think everything is here, except
the Numerical Recipes utilities. Give your programmer my address, and
he can "talk" to me directly. But only until Friday.

Good luck (again!).

Yours - Stuart

??????
fluc_nz.c
???????

/********************************************************/
/*  fluc_nz.c
/*  Generate noises that fluctuate on and off in any    */
/*  given band.                                                 */
/*  Stuart Rosen
/********************************************************/

#define PROGVERS        "1.0"
#define SAMP_FREQ       1000
#define RISE_TIME       0.0             /* These times in ms */
#define FALL_TIME       RISE_TIME

ETC.

[FOR THE FULL PROGRAM, WRITE TO STUART]


#################################################################
#################################################################

$$SUNPROG

Date: Fri, 7 May 93 16:53:12 BST
From: stuart@phonetics.ucl.ac.uk (Stuart Rosen)
Message-Id: <9305071553.AA05312@pitch.phon.ucl.ac.uk>
To: in09@musicb.mcgill.ca
Re: Narrow bands of noise
Sender: stuart@phonetics.ucl.ac.uk

-----------------------------
Dear Al,

Enclosed please find a C prgram to generate bands of noise. It actually
is set up to generate waveforms which consist of an arbitrary number
of noise bands, each of which can be modulated on and off. If you
don't want modulation, just give a modulation rate of 0 when it asks.

This version of the program was to run on a SUN or a MASSCOMP (labelled
PDP12 here) and will certainly need some modification (but not much)
for a PC. Certainly the clear_screen() command will need replacing with
something simple. Also, you will need a number of the Numerical Recipes in
C routines. If you don't have them, I can send the relevant ones.

Below I have enclosed the relevant files, separated by a line of ?????'s.

Good luck! Please let me know if you have any trouble, and I'll do what
I can to help. It shouldn't take me too long to modify this for the
PC, but I am in a bit of a rush for the ASA meeting in Ottawa. Still,
I could give it a go!

Yours - Stuart

P.S. My luck with job searches seems to have taken a turn up recently.
Have an offer from Iowa City, and the promise of one from Northwestern.

See you in Ottawa?

?????????????????????????????????????????????????????????????

/********************************************************/
/*  fluc_nz.c                                           */
/*  Generate noises that fluctuate on and off in any    */
/*  given band.                                         */
/*  Stuart Rosen                                        */
/*  This version appropriate for Sun & Masscomp         */
/********************************************************/

#define SUN 1

#define PROGVERS        "1.0"
#define SAMP_FREQ       1000
#define RISE_TIME       0.0             /* These times in ms */
#define FALL_TIME       RISE_TIME
ETC.

[FOR THE FULL PROGRAM, WRITE TO STUART]


#################################################################
#################################################################

$$LOWPASS

Date: Fri, 7 May 93 15:22 BST
From: BOB CARLYON <BOBC@EPVAX.SUSSEX.AC.UK>
To: IN09 <IN09@MUSICB.MCGILL.CA>
Subject: RE: Noise-band synthesis

al,
the easy way is to multiply a lowpass noise by a sinusoid. This will give
a NBN with skirts in dB/Hz equal to that of the LPN, but as the NBN has a higher
CF, this will be much steeper in dB/octave. The resulting noise will not
be truly random, but for most purposes this doesn't matter
bob



We already did it this way.  We'd like to be able to control the noise
band more exactly.
 - Al

#################################################################
#################################################################

$$FREQ-DOMAIN



Date: Sun, 9 May 1993 15:31:50 +0200
From: Steve Mcadams <Steve.McAdams@ircam.fr>
To: IN09@MUSICB.MCGILL.CA
Subject: Re:  Noise-band synthesis

Al,

Another way is to analyze a white noise signal with a phase vocoder
which does a series of very short-term FFTs. You can then resynthesize
the sound using inverse FFTs and set all off the frequency channels
you don't want to zero. The resolution you get depends on a combination
of the FFT window size and the sampling rate. E.g. if SR = 10240 Hz and
the window is 512 points, you get each frequency channel having a
width of 10 Hz. So your rolloff goes from maximum amplitude to zero
in 10 Hz.

There is a very fancy phase vocoder package here at IRCAM called SVP than
allows such things. I could check into problems of distribution if you are
interested. It runs in C primarily on DECStations, but they have made an
effort recently for it to be portable to any other machine that runs UNIX.

Steve


#################################################################
#################################################################

$$SOFT-FILT


Date: Fri, 7 May 93 00:07:55 -0700
From: Avery Wang <avery@gestalt.Stanford.EDU>
To: "Albert Bregman, Tel: 514-398-6103" <IN09@MUSICB.MCGILL.CA>
Subject: Re: Noise-band synthesis
Reply-To: avery@ccrma.Stanford.EDU

Hi Al-
Well, you could make low-pass-filtered noise by injecting white noise into a
tight elliptic filter
and then frequency-modulating it up to your required center frequency by
multiplying the resulting signal by cos(2 Pi i f0 t).

You can design an elliptic filter (or a filter of any kind) using Matlab.
How steep do the skirts need to be, how much ripple in the pass-band and stop
band will you tolerate? What are your required bandwidths?  What is your
sampling rate?  These are design parameters that a competent signal-processing
engineer could take and derive filter coefficients for in less than 15 minutes.

Would you know what to do if I gave you filter coefficients up to your design
specs?

In any case, the best way to get a band-pass filtered noise signal is to do the
nasty stuff at a 0-center-frequency and then remodulate up.
You could probably do this on a NeXT computer in real time on the DSP with
44.1 KHz output in stereo.  What kind of computer are you running?

Adding together sine waves bunched together with Schroeder phase is possible,
but very inelegant and very computationally expensive.

By the way, I'll still be around Stanford next year since I haven't been as
fast as I thought I'd be in finishing my PhD after getting back from Germany.
Since I'm sort of working on the cocktail party effect, it would be great to
have you around.  Do you know what kinds of things you'll be doing?

I've been mostly working on DSP algorithms to extract multiple partials from
mixtures of sounds, among other things.  I'm also starting up a collaboration
with Christoph Schreiner in auditory cortex physiology.

cheers,

        Avery Wang
        Rains Apt. #15a
        704 Campus Dr.
        Stanford, CA 94305
        Tel: +1 (415) 497-7213
        Fax: +1 (415) 723-8468
        email: avery@ccrma.stanford.edu

#################################################################




Date:        Fri, 07 May 93 13:35:42 EDT
From:        "Albert Bregman, Tel:  514-398-6103" <IN09@MUSICB.MCGILL.CA>
To:          <avery@ccrma.Stanford.EDU>
Subject: Re: Noise-band synthesis
In-Reply-To: In reply to your message of THU 06 MAY 1993 13:07:55 EDT

Avery,
  We tried designing an FIR filter because we have a program that will
convolve it with a waveform (e.g., random noise.  We used the
Park-McLelland algorithm to design the filter but couldn't get very
sharp skirts with a very narrow bandwidth, e.g., 30 Hz.
  I'm not sure how to filter using the coefficients for an elliptical
filter.  I do have some idea of how to transpose a band by AM.
  We need bandwidths from say 10 Hz up to a couple of hundred Hz
with fairly sharp cutoffs (say not more than the bandwidth).
  We are running an IBM compatible 486 under DOS.  It will be done
offline, so computational time is not critical.




#################################################################


Date: Thu, 6 May 1993 17:45:40 -0800
To: "Albert Bregman, Tel: 514-398-6103" <IN09@MUSICB.MCGILL.CA>
From: Steve Saunders <saunders@interval.com>
Subject: Re: Noise-band synthesis

It sounds like you are interested in off-line, software synthesis -- true?

Then another way to do what you ask is to make wideband noise (by any
method) and filter it using a high-quality FIR or IIR bandpass filter.

Some of the Macintosh sound-recording/modification programs can do this, I
believe, if you supply the filter as a separate module. Some may even have
very-sharp bandpass filters of high quality built in, but I can't attest to
this.

Try "Turbosynth", available in demo form in Internet ftp archives (I forget
where I found it most recently -- not sumex-aim.stanford.edu).

                Steve
-----
Steve Saunders                  Interval Research Corporation
saunders@interval.com           1801-C Page Mill Road
                                Palo Alto, CA 94304-1216



Thanks, Steve.
We have tried FIR filters (designed by Parks-
McLelland algorithm) but can't get the very narrow bands we need.
That's why we want to take the synthesis approach.
 - Al


#################################################################


To: IN09@musicb.mcgill.ca
Subject: Re: Noise-band synthesis
From: Les Niles <niles@parc.xerox.com>
Sender: Les Niles <niles@parc.xerox.com>
Date: Thu, 6 May 1993 13:30:39 PDT

Another way would be to use an FIR digital filter with the spectral
characteristics you want, and excite it with white noise (samples
from a Gaussian distribution).  I haven't tried this, but would
think it would be an easier way to get something that really looks
"noisy."

  -les  niles@parc.xerox.com

We've tried this method, but find it hard to control the shape of the
spectrum with any precision.  Also we have trouble getting sharp
skirts on narrow bands.  That's why I was looking for a synthesis
method.
 - Al

#################################################################
#################################################################

$$FORTRAN


Date: 06 May 1993 16:07:49 -0400 (EDT)
From: WSW@buenga.bu.edu
Subject: Re: Noise-band synthesis
To: IN09@MUSICB.MCGILL.CA
Message-id: <01GXV07Q4WKM8WWHT3@buenga.bu.edu>
X-VMS-To: IN%"IN09@MUSICB.MCGILL.CA"
MIME-version: 1.0
Content-transfer-encoding: 7BIT

Al,
  I have been making my noise bands using the method you mentioned, but
with FORTRAN, not C.  If you'd like the FORTRAN code I'll clean it up
a bit and send it your way.

Bill Woods

=================================================


Date: 06 May 1993 16:22:02 -0400 (EDT)
From: WSW@buenga.bu.edu
Subject: Re: Noise-band synthesis
To: IN09@MUSICB.MCGILL.CA


Al,
  Again on the noise bands - because I have used FORTRAN and some canned
FORTRAN inverse FFT routines, porting my code to what you need may be
more than work than one would like to take on.  I could, instead, e-mail the
algorithm, describing what my code does and what it produces.  The algorithm
is basically as you described, summing up sinusoids with random phases and
amplitudes, but uses the inverse FFT to do the summing up once the amplitudes
and phases are specified.  The skirts can be infinite, and one can do tricks
with the amplitudes and phases other than creating infinite skirts (for
example, make all the noise waveforms have exactly the same energy, or the
same spectral profile, put in a constant phase shift across frequency, etc.).
In these examples one does not necessarily obtain exactly Gaussian
noise (as you may know, for Gaussian noise the amplitudes have a Rayleigh
distribution, and the phases are uniformly distributed between pi and 2*pi),
but one may not wish to.  In any event, someone probably has the C code for
exactly what you need.  I just enjoy the convenience of this method, and
talking about it.


Bill Woods


#################################################################
#################################################################


$$ADDITIVE

To: "Albert Bregman, Tel: 514-398-6103" <IN09@MUSICB.MCGILL.CA>
Subject: Re: Noise-band synthesis
In-Reply-To: Your message of "Thu, 06 May 93 15:58:59 EDT."
             <9305062002.AA19877@media.mit.edu>
Date: Thu, 06 May 93 16:18:34 -0400
From: "Bill Gardner" <billg@media.mit.edu>
X-Mts: smtp

Al,

The method of using densly packed sine waves should work perfectly
well. Another more efficient method might be to use a large inverse
Fourier transform, initializing the spectrum to unit magnitude in the
band of interest (0 elsewhere), with random phases, and making sure
the spectrum is conjugate symmetric. The inverse Fourier transorm of
this will be equivalent to evenly spaced sinusoids with random phase.
You will probably want to use a pretty large transform size to keep
the spacing of the sinusoids small. I don't have any code that does
this particular synthesis method, but it is not difficult to write.

Sincerely,

Bill Gardner



#################################################################
#################################################################

$$MATLAB


Date: Thu, 6 May 93 18:48:03 EDT
From: jba@spectrum.research.att.com (Jont Allen)

To: IN09@MUSICB.MCGILL.CA
Subject: Re:  Noise-band synthesis


The best way, I think, is to use matlab, and load the bins
of an FFT, with the amp and phase of the tones, and then inverse
fft. You can then trim it with windows if you like.
Jont


===================================

Date: Fri, 7 May 93 14:08:22 EDT
From: jba@spectrum.research.att.com (Jont Allen)
Message-Id: <9305071808.AA26089@spectrum.research.att.com>
To: IN09@MUSICB.MCGILL.CA
Subject: Re: Noise-band synthesis

If you want to generate the noise in matlab, I can give you a program.
Depending on the platform, you can also listen to it directly from
matlab. This would make everything very simple.

Matlab is about as easy as any programing language that you are ever
going to learn.

It is much easier than C. It also has built in graphics, and a lot
of signal processing stuff, such as the fft, filter design, etc.

Jont


#################################################################
#################################################################


$$REQUESTS

Date: Mon, 10 May 1993 16:14:37 -0500
From: Lippold Haken <lippold@cerl.uiuc.edu>
Message-Id: <199305102114.AA25621@uinova.cerl.uiuc.edu>
To: IN09@musicb.mcgill.ca
Subject: Noise-band synthesis


Hi!  I would be interested in narrow-band noise algorithms, also!  I am
especially interested in table-driven algorithms, or other algorithms which
are well suited for real-time implementation.

Thanks!

-----------

I'll post a list of available programs to the list when I get them.
 - Al




#################################################################



Date: Fri, 7 May 93 08:52:46 -0500
From: arty@jetsam.psy.sunysb.edu (Arthur Samuel)
To: IN09@musicb.mcgill.ca
Subject: Me too

Al,

Hi.  If you get a good program for doing the noise-band synthesis,
I'd appreciate access to it too.  As you say, this is a lazy man's
way, but that makes a lot of sense -- why reinvent the wheel? I don't
have an immediate application for the noise algorithm, but I can
certainly envisage some (e.g., some restoration experiments with
selected frequencies for the noise).

Thanks,
Arty


You are welcome to have whatever I get.  So far only one ready-to-go
program has materialized, and I'm still exploring options.
 - Al




#################################################################