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 - 16:15:47 EET


On Wed, Nov 29, 2000 at 08:35:41AM -0500, Paul Barton-Davis wrote:
> >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.
>
> yes, that was another obvious option. the question is really whether
> common usage will see a non-unity gain for most of a session or
> not. if we have lots of changes, i expect them to be exponential by
> default, with the result that we effectively double the storage
> requirements for most of the audio stream. OTOH, if such sections are
> rare, then a sparse array will work very well.

This is just an quick idea, I havn't thought through the consequences,
but you might be better off if you store the linear component of the
fade, and then convert in into exponential form on the fly. Would
probably need a table lookup, but if you store the gain as ints it would
be cheap. You would be storing something like fader height, so you could
probably store it as linear segments, and do 1st order interpolation
(with smoothing). Would let you directly manipulate gain too, though
not sure if the maths saving there is important.

Definate downside, would need one table per gain exponent. Don't know how
many you need.

> as a related question, i am consider gain structures to "belong" to
> specific audio data, so that if you delete a section of audio, you
> also deleted its gain structure. i trust that this seems right to
> others as well - i thought about it for a while, and it seemed fairly
> clear to me that this was the right thing to do.

Sounds right to me. You might want to be able to save or copy the gain
curves to another track, but I can't see thier much use after the track
has gone.

- 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 - 18:05:19 EET