DSPRelated.com
Forums

Resampling questions - from 44.1kHz to 48kHz

Started by Newbie January 28, 2004
"Bob Cain" <arcane@arcanemethods.com> wrote in message
news:4018A3B2.F354DA8C@arcanemethods.com...
> > > Jerry Avins wrote: > > > > Fred Marshall wrote: > > > > > The more gradual the window, the sharper the frequency response and
the
> > > lower the stopband ripples - as a very general statement. > > > > Sharper frequency response? I think you mean lower stopband ripple > > (smaller side lobes) and more gradual transition to cutoff. No? > > I just tried it going between a straight truncated and a > Hahn window, the cutoff is _much_ sharper. The test was a > 65536 point sinc with 100 samples between zero crossings. >
Bob, I decided I was wrong. So now I'm curious about this. How did you define cutoff? Did you mean von Hann / hanning? or really mean Hahn? Here's a nice little program that demonstrates various windows and transition width: http://web.mit.edu/6.555/www/fir.html Fred

Fred Marshall wrote:
> > > > I just tried it going between a straight truncated and a > > Hahn window, the cutoff is _much_ sharper. The test was a > > 65536 point sinc with 100 samples between zero crossings. > > > > Bob, > > I decided I was wrong. So now I'm curious about this. How did you define > cutoff?
Fs/100
> Did you mean von Hann / hanning? or really mean Hahn?
No, I actually meant von Hann (didn't know about the von though) but I just realized that my little test was meaningless because the FFT I used (that in the Adobe Audition audio editor) applies a window on top of the one I generated over the data and that there is no option to specify no window (or rectangular window as some would have it) so that I was comparing a Hann window with a Hann window applied twice. Sorry for the noise. Bob -- "Things should be described as simply as possible, but no simpler." A. Einstein
Bob Cain wrote:

   ...

> No, I actually meant von Hann (didn't know about the von > though) but I just realized that my little test was > meaningless because the FFT I used (that in the Adobe > Audition audio editor) applies a window on top of the one I > generated over the data and that there is no option to > specify no window (or rectangular window as some would have > it) so that I was comparing a Hann window with a Hann window > applied twice. Sorry for the noise.
Aw chucks! And here I thought a Huhn window was for watching the sky fall. Jerry -- Engineering is the art of making what you want from things you can get. &#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;
Fred Marshall wrote:

   ...

> For general filter design there's a tradeoff between sidelobe level and > transition width. The higher the sidelobes, the narrower the transition can > be - largely because the definition of width in that case is dependent on > the sidelob levels!! But, a given length filter should be limited to a > minimum transition width as you say - as long as we don't get too picky > about how to define the width to -80dB.....
With analog bandpass filters, skirt selectivity is a good measure, and I tend to look at all filters in terms of edge slope after a hard-to-pin- down knee is rounded. On a log plot, the angle tells all. Jerry -- Engineering is the art of making what you want from things you can get. &#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;
Bob Cain <arcane@arcanemethods.com> wrote in
news:40193D36.77A68501@arcanemethods.com: 

> > > Fred Marshall wrote: >> > >> > I just tried it going between a straight truncated and a >> > Hahn window, the cutoff is _much_ sharper. The test was a >> > 65536 point sinc with 100 samples between zero crossings. >> > >> >> Bob, >> >> I decided I was wrong. So now I'm curious about this. How did you >> define cutoff? > > Fs/100 > >> Did you mean von Hann / hanning? or really mean Hahn? > > No, I actually meant von Hann (didn't know about the von > though) but I just realized that my little test was > meaningless because the FFT I used (that in the Adobe > Audition audio editor) applies a window on top of the one I > generated over the data and that there is no option to > specify no window (or rectangular window as some would have > it) so that I was comparing a Hann window with a Hann window > applied twice. Sorry for the noise. > > > Bob
Poor von Hann! His window is commonly called a Hanning Window only because there is also a Hamming Window. Of course, very few of us come up with something important that is also tied to our name. I guess that I would be happy if there was a "Clarking Window" ;-) -- Al Clark Danville Signal Processing, Inc. -------------------------------------------------------------------- Purveyors of Fine DSP Hardware and other Cool Stuff Available at http://www.danvillesignal.com
After looking over some windowed sinc implementations, I am a little concerned 
about the passband performance. Isn't this one of the tradeoffs in going 
with this approach? Since my signals are audio, I'd like to keep the passband 
as flat as possible. 

Does anyone know how the pro audio guys design their 44.1kHz<->48kHz SRCs? I'm 
referring to using a series of cascaded filters (for the interpolation 
w/decimation) or is a windowed sinc design more common? 

Right now I'm looking towards a cascaded set of filters.

Thanks for all of the responses to my post.


Jerry Avins wrote:
...
> Aw chucks! And here I thought a Huhn window was for watching the sky > fall.
Now Jerry, I would guess a Huhn window would be something you would find on a chicken shack :). Andor
Andor wrote:
> Jerry Avins wrote: > ... > >>Aw chucks! And here I thought a Huhn window was for watching the sky >>fall. > > > Now Jerry, I would guess a Huhn window would be something you would > find on a chicken shack :). > > Andor
Yes. And it was Chicken Little who cried, "The sky is falling! The sky is falling!" Jerry -- Engineering is the art of making what you want from things you can get. &#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;
>Another approach would be for you to interpolate to 160 in several >smaller steps. 160=(2^5)*5, so you could interpolate by 2 five times, >and then by 5 once. In each stage, set the cutoff frequency to 20KHz. >The first stage will require a good (that is, long) filter. I think 32 >taps would prolly be OK. After interpolating by 2 (and filtering) in >the first stage, you'll have a spectrum something like this: > >______ ________ > \______|______/ > fs/4 fs/2 > >fs/4 is roughly 20KHz. > >The next stage can get by with a much smaller filter, because the >spectrum between 20K and 60K has already been supressed by a decent >amount. The later stages should still roll off starting at 20KHz, but >you don't have to worry about stopband attenuation until you get into >the 60KHz neighborhood. That's a pretty relaxed filter. You could >prolly get away with interpolating in fewer stages - say in four stages >(2,4,4,5). >
Jim, I'm working on this as issue as well. Given your example of (2^5)*5 with a 20kHz signal, after interpolating your signal in the first stage by 2 and filtering, how do you approach the second stage of the filter in terms of the sampling freq.? In other words, when designing the filter for this 2nd stage to preserve the 20kHz content, would I be basing the sampling freq. for this stage off of: fs = 80 x 2 = 160kHz with fs/2 = 80kHz or would it be fs = 40 x 2 = 80kHz with fs/2 = 40kHz (again, like stage 1?) I assume that the fs is increasing with each stage. Is this correct? This concept is what isn't sinking in to my thick skull. -Rick S.
On Thu, 29 Jan 2004 23:13:54 GMT, Al Clark <dsp@danvillesignal.com>
wrote:

   (snipped)
> >Poor von Hann! His window is commonly called a Hanning Window only >because there is also a Hamming Window. > >Of course, very few of us come up with something important that is also >tied to our name. I guess that I would be happy if there was a "Clarking >Window" ;-)
Hi Al, don't worry, at least you have a candy bar named after you. That's better than the rest of us here. [-Rick-]