Re: [linux-audio-dev] gain curves, interpolation, etc.

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

Subject: Re: [linux-audio-dev] gain curves, interpolation, etc.
From: Steve Harris (S.W.Harris_AT_ecs.soton.ac.uk)
Date: Wed Nov 29 2000 - 13:35:17 EET


On Wed, Nov 29, 2000 at 10:13:08AM +0100, MOULET Xavier FTRD/DMR/ISS wrote:
> In fact to define your polynom, what do you need ? for a 1-order
> interpolation, a linear singnal, you need 2 points : the values of the
> signal on the borders.
>
> For second approximation, you need the curbs (parabols, y=ax^2+bx+c) to
> connect smoothly, so you need the first derivative evaluation on the
> borders.
>
> For the third order, you need it to be supersmooth and that the second order
> derivatives of segments are equals .. and so on.

This is good stuff, but I think it will be two slow to do in realtime for
n tracks.

Paul: the thing you need to calculate the polynomial given some control
points is the Lagrange function, see Numerical Recipies, Ch. 3
http://www.ulib.org/webRoot/Books/Numerical_Recipes/bookcpdf.html

I used this stuff to make interpolating delay lines, but it is quite CPU
intensive, I don't think you could get it work for 16+ tracks. 1st order
interpolation is too crappy for audio work, you can hear the control
points go past.

Can't you just use a sparse array structure? It will be data intesive for
exponential fades, but long, flat gain changes will be cheap. You could
linearly interpolate long shallow stretches if you wanted to, as long as
the 2nd derivative is continuous you usually OK.

> If you consider to EDIT the envelopes by hand, you really are _defining_ a
> few points. So you can EDIT the polynoms (each) by hand. (hopefully NOT by
> entering the coefficients ..). Consider that a third order interpolation is
> named a spline in 2-D and are sufficiently accurate for the fact that I
> haven't seen any drawing program tht goes beyond them.

I seem to remeber that you can't graphicly edit quartic splines (ie. fourth
order), isn't that why TeX fonts have to be designed via equations?

- Steve


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

This archive was generated by hypermail 2b28 : Wed Nov 29 2000 - 14:31:58 EET