[PD] better tabread4~

Charles Henry czhenry at gmail.com
Tue Jun 24 01:49:51 CEST 2008


On Mon, Jun 23, 2008 at 8:23 AM, cyrille henry
<cyrille.henry at la-kitchen.fr> wrote:
> well, tabread4c~ is far from perfect, it has the same aliasing problem than tabread4~ and
> it create more distortion than tabread4~. (but in lower frequency).

Strictly speaking, these interpolations don't create distortion in as
much as they have a non-flat frequency response.  No matter which
method you use, the interpolation function can be re-written as a
convolution, which is linear.

In my prior analysis of the tabread4~ impulse response, I obtained the
following function for the impulse response.

g(t)=I[-2,2](t)(-1/6*|t|^3 - 2*t^2 - 11/6*|t| + 1) +
I[-1,1](t)(2/3*|t|^3 - 2*t^2 + 4/3*|t|)

And it's fourier transform, where w=pi represents the Nyquist
frequency.  (by the way, the angular frequency notation greatly
simplifies the calculus involved)

G(w)=(1/w^2)*[1/3*cos(2w) - 4/3*cos(w) + 1]    +   (1/w^4)*[2*cos(2w)
- 8*cos(w) + 6]

This function falls off at a rate of at most -6 dB/octave  (according
to the 1/w^2 term).  What you are referring to as distortion is not
actually distortion, but aliasing and a non-flat frequency response.
The spectrum of this function is pretty nice, but everything above pi
rad/sec is aliased, which causes some additional frequencies, mostly
high frequencies.

I'm reluctant to do the same for tabread4c~ because it takes several
hours to do.  If you come up with a good set of coefficients that seem
to be pretty solid, I'll spare some time for the frequency response.

> one told me that modern commercial audio software can use 32 points shannon interpolation.
> http://en.wikipedia.org/wiki/Whittaker–Shannon_interpolation_formula
>
> i'd like to try that...
> it will be more expensive, but this is negligible on recent hardware, and sound quality worth it.

I doubt that it would be negligible.  I do agree that it would find
many applications, but not as a replacement for a fast, good-enough
tabread.

32-point windowed sinc interpolation borders on anal retentive.
Instead of that, it might be better to probe out what degree of fast
polynomial interpolation will have a good-enough spectrum.

Chuck

>
> so, for now, i'll try different interpolation schematic, and we will see latter what to use...
>
> cyrille
>
> Roman Haefeli a écrit :
>> On Mon, 2008-06-23 at 06:52 +0100, Andy Farnell wrote:
>>> Yes that'right, hmm I guess I knew that but said it in a woolly way
>>>
>>> Amend that to
>>>
>>> [tabread~] - "play back at exactly" the original rate
>>> [tabread4~] - "play back at close to the orginal rate"
>>> [tabread4c~] - "play back with wider transposition"
>>
>>
>> i don't see any justification to keep [tabread4~] in this list. cyrille
>> once mentioned that his new class isn't computationally more expensive.
>> if there is a difference between [tabread4~] and [tabread4c~], then it
>> is, that [tabread4c~] is _better_ than [tabread4~] (according to some
>> previous posts regarding this subject).
>> the only good reason to keep [tabread4~] in pd is to keep backwards
>> compatibility with patches that exploit [tabread4~]'s wierd behaviour,
>> imo.
>>
>> roman
>>
>>
>>
>>
>>
>> ___________________________________________________________
>> Telefonate ohne weitere Kosten vom PC zum PC: http://messenger.yahoo.de
>>
>>
>> _______________________________________________
>> Pd-list at iem.at mailing list
>> UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
>>
>>
>
> _______________________________________________
> Pd-list at iem.at mailing list
> UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
>




More information about the Pd-list mailing list