Re: [linux-audio-dev] EVO 0.0.5 released , resampling (interpolation) support added

New Message Reply About this list Date view Thread view Subject view Author view Other groups

Subject: Re: [linux-audio-dev] EVO 0.0.5 released , resampling (interpolation) support added
From: Miller Puckette (mpuckett_AT_man104-1.ucsd.edu)
Date: Tue Sep 19 2000 - 23:31:50 EEST


Hi Benno,

The technique was first written down by Robert Hoeldrich, in the 1995 ICMC
proceedings (Banff), but was folk knowledge much earlier.

In the Pd oscillator, look for osc_perform(). It's ugly all right; the
second version of the inner loop is an unwrapped version of the first one
(hand unwrapping sped the thing up some.)

The heart of the thing is the "union tabfudge" which is accesses as a
double (64 bits) and as a pair of "longs" (32 bits each.) YOu accumulate
into the "double" and then pull bits out of the "longs". To get the
fractional part back into floating point, bash the upper 32 bits to
a known value and subtract a constant.

I can be more verbose if needed but perhaps I should do so privately...

cheers
Miller

On Tue, Sep 19, 2000 at 11:48:40PM +0200, Benno Senoner wrote:
> Hi Miller,
>
> On Tue, 19 Sep 2000, Miller Puckette wrote:
> > Hi all,
> >
> > You can do the trick in double precision and get at least 40 bits of
> > real precision. I usually use the bottom 32 bits for the fractional
> > part and some of the top 20 bits for the integer part; this would have
> > to be adjusted for huge "wavetables" though.
>
> Since I stream from disk, (thus from buffers), I have to adjust the pos (double)
> ponter when it gets bigger than the buffersize.
> So in theory 20bits would be enough.
>
> I've looked at d_osc.c but the code is quite hard to read.
> Can you explain briefly, where you do the splitting/assembling of the double in
> integer and fractional part.
>
> Benno.


New Message Reply About this list Date view Thread view Subject view Author view Other groups

This archive was generated by hypermail 2b28 : Wed Sep 20 2000 - 00:27:09 EEST