DSPRelated.com
Forums

"Comb notch" filters missing a tooth

Started by Rune Allnor November 23, 2003
Hi all. 

I have just "made" some recordings of birds nearby (which is to say that 
I ripped them off a CD released by the local ornithology society, but don't 
tell anyone) and want to play with these sounds to make an audio DSP demo.

Among the birds are the "Eagle Owl" (Bubo Bubo) and a woodpecker. Now, 
the owl makes a very distinctive sound that shows up qiute well in a 
spectrogram (SG). By fine-tuning the specs of the spectrogram I think 
listening to the sound on the CD while viewing the SG may actually... 
well, if not teach so at least make some nice colours on the screen.

Interestingly, the overharmonics of the sound is very clear in the SG. 
So I wonder: Is it possible to make some sort of comb notch filter that 
kills off all (or a specified set of) the overharmonics but leaves the 
fundamental?

Rune
Rune Allnor wrote:

> Hi all. > > I have just "made" some recordings of birds nearby (which is to say that > I ripped them off a CD released by the local ornithology society, but don't > tell anyone) and want to play with these sounds to make an audio DSP demo. > > Among the birds are the "Eagle Owl" (Bubo Bubo) and a woodpecker. Now, > the owl makes a very distinctive sound that shows up qiute well in a > spectrogram (SG). By fine-tuning the specs of the spectrogram I think > listening to the sound on the CD while viewing the SG may actually... > well, if not teach so at least make some nice colours on the screen. > > Interestingly, the overharmonics of the sound is very clear in the SG. > So I wonder: Is it possible to make some sort of comb notch filter that > kills off all (or a specified set of) the overharmonics but leaves the > fundamental? > > Rune
The "all" part is simple, no? A bandpass filter that passes the fundamental and cuts off lower than the first overtone. What am I missing? Jerry -- Engineering is the art of making what you want from things you can get. �����������������������������������������������������������������������
In article f56893ae.0311231001.3cc8a505@posting.google.com, Rune Allnor at
allnor@tele.ntnu.no wrote on 11/23/2003 13:01:

> I have just "made" some recordings of birds nearby (which is to say that > I ripped them off a CD released by the local ornithology society, but don't > tell anyone) and want to play with these sounds to make an audio DSP demo. > > Among the birds are the "Eagle Owl" (Bubo Bubo) and a woodpecker. Now, > the owl makes a very distinctive sound that shows up qiute well in a > spectrogram (SG). By fine-tuning the specs of the spectrogram I think > listening to the sound on the CD while viewing the SG may actually... > well, if not teach so at least make some nice colours on the screen. > > Interestingly, the overharmonics of the sound is very clear in the SG. > So I wonder: Is it possible to make some sort of comb notch filter that > kills off all (or a specified set of) the overharmonics but leaves the > fundamental?
so you want to extract a single sinusoidal component. is that correct? it doesn't matter to me whether it's the fundamental or not, as long as you know what frequency you want to extract (that might be a pitch detection problem which is something i can talk about more now than i could have 1.2 years ago). a notch filter, properly tuned can take out the fundamental and leave everything else. as you get farther away from the notch, the magnitude and phase of the other sinusoidal components are increasingly left unchanged. then subtract the notch filter output from a "wire" (a copy of the input). does that do it for you, Rune? what might you implement this with? MATLAB? do you need to deal with the pitch tracking issues? might i peek at a copy of this sound file? lot'sa questions. r b-j
robert bristow-johnson <rbj@surfglobal.net> wrote in message news:<BBE6BB74.618F%rbj@surfglobal.net>...
> In article f56893ae.0311231001.3cc8a505@posting.google.com, Rune Allnor at > allnor@tele.ntnu.no wrote on 11/23/2003 13:01: > > > I have just "made" some recordings of birds nearby (which is to say that > > I ripped them off a CD released by the local ornithology society, but don't > > tell anyone) and want to play with these sounds to make an audio DSP demo. > > > > Among the birds are the "Eagle Owl" (Bubo Bubo) and a woodpecker. Now, > > the owl makes a very distinctive sound that shows up qiute well in a > > spectrogram (SG). By fine-tuning the specs of the spectrogram I think > > listening to the sound on the CD while viewing the SG may actually... > > well, if not teach so at least make some nice colours on the screen. > > > > Interestingly, the overharmonics of the sound is very clear in the SG. > > So I wonder: Is it possible to make some sort of comb notch filter that > > kills off all (or a specified set of) the overharmonics but leaves the > > fundamental? > > so you want to extract a single sinusoidal component. is that correct? it > doesn't matter to me whether it's the fundamental or not, as long as you > know what frequency you want to extract (that might be a pitch detection > problem which is something i can talk about more now than i could have 1.2 > years ago). > > a notch filter, properly tuned can take out the fundamental and leave > everything else. as you get farther away from the notch, the magnitude and > phase of the other sinusoidal components are increasingly left unchanged. > then subtract the notch filter output from a "wire" (a copy of the input).
I think the pitch detection might be something to look into. What I want, is basically to make a spectrogram of the sound and then try to show that the fundamental follows the "tune" of the percieved sound (which shouldn't be too difficult with people who are used to read music notes). After that I'd like to kill off one or more of the overharmonics (leaving the fundamental) and see if the percieved "flavour" of the sound (the audio people probably have a name for this...) changes. Like sort of a "why does a violin and a trombone soiund different even if they play the same tone" kind of thing.
> does that do it for you, Rune? what might you implement this with? MATLAB? > do you need to deal with the pitch tracking issues?
I'll be doing this with matlab, although all the talk here about DSP eval boards makes a DSP real-time sort of thing more and more interesting. Pitch tracking sounds interesting, and after I have been peeking into some of the audio/speech techniques recently, I get the impression there is lots of neat stuff there that can be used for other types of processing.
> might i peek at a copy > of this sound file?
I'll see what I can do. I'm posting through a low-capacity net link. The .mat file is just too large to send by mail, but the .wav file (5 MB) might just be small enough to get through without too much ado, if it's OK with you? Is your email address above valid? If not, please post a scrambled address here, as I won't read my NTNU email until January.
> lot'sa questions. > > r b-j
Rune
Jerry Avins <jya@ieee.org> wrote in message news:<bprd1u$id2$3@bob.news.rcn.net>...
> Rune Allnor wrote: > > > Hi all. > > > > I have just "made" some recordings of birds nearby (which is to say that > > I ripped them off a CD released by the local ornithology society, but don't > > tell anyone) and want to play with these sounds to make an audio DSP demo. > > > > Among the birds are the "Eagle Owl" (Bubo Bubo) and a woodpecker. Now, > > the owl makes a very distinctive sound that shows up qiute well in a > > spectrogram (SG). By fine-tuning the specs of the spectrogram I think > > listening to the sound on the CD while viewing the SG may actually... > > well, if not teach so at least make some nice colours on the screen. > > > > Interestingly, the overharmonics of the sound is very clear in the SG. > > So I wonder: Is it possible to make some sort of comb notch filter that > > kills off all (or a specified set of) the overharmonics but leaves the > > fundamental? > > > > Rune > > The "all" part is simple, no? A bandpass filter that passes the > fundamental and cuts off lower than the first overtone.
Yes, you are right. The problem is that the bird sings a tune where the fundamental varies on the order of half an octave or so, such that it is difficult to design a filter that removes the overharmonics in the low-pitch parts and preserves the fundamentals in the high-pitch parts. I elaborated somewhat on this in my reply to RBJ.
> What am I > missing?
Only the parts I did not mention in my first post... heh, and I'm the one who ask everybody else to explain their applications and purposes with what they do...
> Jerry
Rune
"Rune Allnor" <allnor@tele.ntnu.no> wrote in message
news:f56893ae.0311240413.74092f90@posting.google.com...
> robert bristow-johnson <rbj@surfglobal.net> wrote in message
news:<BBE6BB74.618F%rbj@surfglobal.net>...
> > In article f56893ae.0311231001.3cc8a505@posting.google.com, Rune Allnor
at
> > allnor@tele.ntnu.no wrote on 11/23/2003 13:01: > > > > > I have just "made" some recordings of birds nearby (which is to say
that
> > > I ripped them off a CD released by the local ornithology society, but
don't
> > > tell anyone) and want to play with these sounds to make an audio DSP
demo.
> > > > > > Among the birds are the "Eagle Owl" (Bubo Bubo) and a woodpecker. Now, > > > the owl makes a very distinctive sound that shows up qiute well in a > > > spectrogram (SG). By fine-tuning the specs of the spectrogram I think > > > listening to the sound on the CD while viewing the SG may actually... > > > well, if not teach so at least make some nice colours on the screen. > > > > > > Interestingly, the overharmonics of the sound is very clear in the SG. > > > So I wonder: Is it possible to make some sort of comb notch filter
that
> > > kills off all (or a specified set of) the overharmonics but leaves the > > > fundamental? > > > > so you want to extract a single sinusoidal component. is that correct?
it
> > doesn't matter to me whether it's the fundamental or not, as long as you > > know what frequency you want to extract (that might be a pitch detection > > problem which is something i can talk about more now than i could have
1.2
> > years ago). > > > > a notch filter, properly tuned can take out the fundamental and leave > > everything else. as you get farther away from the notch, the magnitude
and
> > phase of the other sinusoidal components are increasingly left
unchanged.
> > then subtract the notch filter output from a "wire" (a copy of the
input).
> > I think the pitch detection might be something to look into. What I want, > is basically to make a spectrogram of the sound and then try to show that > the fundamental follows the "tune" of the percieved sound (which shouldn't > be too difficult with people who are used to read music notes).
You can make an adaptive IIR notch filter that will remove the strongest frequency component. If the fundamental is the strongest component (which it is in most but not all real-world audio samples) this might do the trick.
"Rune Allnor" <allnor@tele.ntnu.no> wrote in message
news:f56893ae.0311231001.3cc8a505@posting.google.com...
> Hi all. > > I have just "made" some recordings of birds nearby (which is to say that > I ripped them off a CD released by the local ornithology society, but
don't
> tell anyone) and want to play with these sounds to make an audio DSP demo. > > Among the birds are the "Eagle Owl" (Bubo Bubo) and a woodpecker. Now, > the owl makes a very distinctive sound that shows up qiute well in a > spectrogram (SG). By fine-tuning the specs of the spectrogram I think > listening to the sound on the CD while viewing the SG may actually... > well, if not teach so at least make some nice colours on the screen. > > Interestingly, the overharmonics of the sound is very clear in the SG. > So I wonder: Is it possible to make some sort of comb notch filter that > kills off all (or a specified set of) the overharmonics but leaves the > fundamental?
Rune, Here is simply a walk-through of things that may help: A comb filter starts out as a series of periodic unit samples in frequency (mirrored around zero). The inverse Fourier Transform is similarly a series of periodic unit samples (perhaps scaled). The distance between the frequency samples is f1. The distance between the time samples is 1/f1. It's just the same as a periodic sampling spectrum shape. Presumably one can change f1 by changing the temporal spacing of samples. To get rid of one of the frequency samples requires a notch filter as you've asked about. To get rid of more than one of the frequency samples requires more notch filters. Is there a way to modify the comb filter such that the notches are simply a missing tooth in the comb? I think that's what you're asking. Note that a mirrored pair of unit samples in frequency is a cosine in time. So, if you start with a FIR filter structure that is unit-sample-periodic at 1/f1, to remove a pair of mirrored unit samples in frequency, you subtract the corresponding cosine in time. This yields a new FIR filter with the properties you want. You can subtract as many cosine terms as necessary to remove the comb teeth you want to remove. If the comb is too narrow, presumably you can convolve the frequency response with a narrow gate - which would be the same as to multiply the FIR filter coefficients with the impulse response of that LPF. The impulse response of a narrow LPF will look something like a broad sinc. So, a "window" of this shape if you will. I've not tried it. These are just transform pair truisms. Fred