[music-dsp] Waveform Interpolation

robert bristow-johnson rbj at audioimagination.com
Sun Dec 12 00:38:01 EST 2010




On Dec 11, 2010, at 12:26 PM, Nigel Redmon wrote:

> Naw, actually, right after sending that I started to type up a  
> retraction and my girlfriend showed up, and she hates it when I'm  
> not ready to go to dinner on time. My bad, I started to make the  
> point that linear interpolation response is down 6dB at half-band,  
> same as a half-band sinc interpolation.

now i think i get it.  i dunno why i was swapping t and f.  my bad.   
sinc(t/2) interpolation is half-band.  dunno why i was missing that.

now that i think of it, anything times sinc(t/2) is half-band (because  
the main consequence i think of half-band filters is that every other  
sample of the impulse response is zero).  if you define

      h(t)  =  w(t)*sinc(t/(2T))

you'll have half-band symmetry.  i knew that as a property of using a  
windowed-sinc interpolation kernel for upsampling by a factor of 2.

when you upsample by an integer factor greater than 2 you don't get  
that half-band symmetry, but if it's an integer the one out of every N  
samples of h[n] are zero and you can skip calculating the output  
sample and just copy the input.

and if w(t) is a nice gaussian-looking pulse, so also will W(f) be a  
nice looking gaussian pulse that will be convolved with the half-band  
rect() function (that corresponds to the sinc() part).  i guess you  
can get an idea what

> I guess I was thinking about the notch being at half-sample-rate,  
> went of on a bogus tangent about half band (sorry, half been coding  
> for hours). (Zero-order hold is down 3 dB at half-band.) I sent it,  
> went back to coding for a couple of mins and it hit me that I'd just  
> sent a load of garbage. Thanks for not calling me an idiot (lol).

i appreciate the favor returned.  i know that you get half-band  
symmetry with w[n]*sinc(n/2) filters because every other sample (save  
one) is zero.  the same is true for hilbert transform filters, but  
they are v[n]*sin(pi*n/2).  but they can be switched if w[0] is zero,  
i think.

On Dec 11, 2010, at 7:32 PM, Nigel Redmon wrote:

> OK, fixed the Firefox/Opera issue.
>
> Lesson learned: javascript returns "-Infinity" for log(0), not  
> "NaN", which I was checking for. Some javascript implementations  
> don't mind doing math with -Infinity, some do.
>
>
> On Dec 11, 2010, at 3:42 PM, Nigel Redmon wrote:
>> ... and Firefox has issue with some things (linear interpolation  
>> and zero-order hold for some reason...


now i'm back to not understanding what you're saying again.

--

r b-j                  rbj at audioimagination.com

"Imagination is more important than knowledge."






More information about the music-dsp mailing list