Well, a sinc filter is something like

   h(t) = w(t/W) sinc(t/T)

where W is the window width and T is (often) the sampling period.

If you do that, like Hermite or Lagrange polynomial interpolation, then

   h(nT) = 0 for every integer n except n=0.

Now, suppose you're just making a simple 2x upsampler (as a processing block), 
a synchronous sample-rate coverter.  Then you have to evaluate h(t) for h(0T) 
and  H(T/2).  For every even sample (at the 2x rate), the output y[2n] = x[n]  
but for the odd-numbered samples

   y[2n+1] = SUM  x[n] h((2n+1)T/2) 

So it profits you to have a windowed sinc for a 2x upsampler because half of 
the output samples are simply coped from the input.  But if this is a 64x 
upsampler, saving this computations for 1 of the phases out of 64, then this 
computational savings is not significant.

So you can sacrifice a little of the top end and lower the cutoff frequency of 
the brickwall sinc() filter, and then there are no copying of input samples.  
Even if the interpolator lands directly on an original sample instant, the 
output is still a filtered version of the input.

Then most of us here probably would use an icky Remez designed brickwall 
filter.  As opposed to the windowed sinc.  But with a Kaiser window I can make 
a windowed-since perform as well as the Remez-designed interpolation kernel.

It turns out that you can take any polynomial interpolator and represent it as 
convolving with an impulse response that is a piecewise-polynomial function.  
The simplest would be linear interpolation.  If you use an even number of 
points in your interpolation, the Hermite or Lagrange will be an odd 
polynomial.  You will hear of cubic spline interpolation often, sorta one notch 
above linear interpolation.  But each polynomial interpolation family has a 
characteristic frequency response derived from the piecewise-polynomial impulse 
response.

Olli's paper came after a paper that Duane Wise and I did in 199x something.  
Maybe 1997.  Anyway, we found out that if you're gonna go hardcore with the 
polynomial interpolation, probably what you get when you convolve a rectangular 
pulse with itself N times (which is an Nth-order polynomial), that this would 
give you the deepest notches at a integer times the sampling rate.  Because it 
was a pure sinc^(N+1) uncontaminated with any lower powers of sinc().  Nice 
deep notches to whack them images with.  (Music and most of what we hear 
occupies the lower frequencies so these images are skinny spikes that are meant 
for a comb filter to whack.)

I've done cubic interpolation for audio once.  I didn't like it, it was sorta 
hardware and I didn't have the luxury of a big look-up table.

But if it is in C (or some regular DSP), I would just have a lookup table for 
256 or 512 fractional-sample phases and linearly interpolate between that for 
whatever resolution of interpolation time you need.  And if it's lookup, it's 
likely gonna be a windowed sinc brickwall with the cutoff frequency a little 
lower than Nyquist.


> On 02/09/2022 4:26 PM Sound of L.A. Music and Audio <[email protected]> wrote:
> 
>  
> For audio, also Blackman-Harris II.
> My question: WHICH kind of sinc Filter is to be used here?
> 
> 
> Am 09.02.2022 um 20:23 schrieb Nigel Redmon:
> > Agreed, with Robert—for audio, Kaiser (aka Kaiser-Bessel) is the go-to, I 
> > haven’t used any other since I figured that out in the ‘80s. It has the 
> > right properties, with the stop band attenuation being easily adjustable, 
> > something that will likely vary for you, depending on requirements (trading 
> > off attenuation for filter length).
> >
> >
> >> On Feb 9, 2022, at 2:23 AM, robert bristow-johnson 
> >> <[email protected]> wrote:
> >>
> >> Kaiser.  with beta approximately 5 or 6.
> >>
> >>> On 02/09/2022 2:22 AM [email protected] 
> >>> wrote:
> >>>
> >>>
> >>> I am considering implementing a windowed sinc interpolator. Does anyone 
> >>> have any thoughts on what a good window function is? This could be for an 
> >>> audio application but not necessarily so.
> >>>
> >>> Jerry Bauck
> >>
> >> --
> >>
> >> r b-j . _ . _ . _ . _ [email protected]
> >>
> >> "Imagination is more important than knowledge."
> >>
> >> .
> >> .
> >> .
> >>

--

r b-j . _ . _ . _ . _ [email protected]

"Imagination is more important than knowledge."

.
.
.

Reply via email to