Subject: Re: [linux-audio-dev] Re: EVO-Linux Physical Modeling HD Sampler
From: David Olofson (david_AT_gardena.net)
Date: Tue Jul 18 2000 - 05:20:24 EEST
On Tue, 18 Jul 2000, Juhana Sadeharju wrote:
> >From: Benno Senoner <sbenno_AT_gardena.net>
> >
> >The envelopes have to be very efficient and using math does not make sense
> >to me ( are you really thinking about calculating y=exp(x) at every iteration
> >??)
>
> exp(x) can be approximated but floating processor may already do fast job,
> I have not tested. And yes, because memory access is quite slow, it would
> be more efficient to compute the approximations -- but I'm not expert in
> optimization. Somebody should verify.
How about the simple method 3D games use for various approximations;
splines?
The inner loop can be as simple as:
for(t)
{
y += Dy;
Dy += DDy;
}
which gives the same result as
y = ystart + t*Dy + t*t*DDy;
(unless I did some silly mistake, that is :-)
That is, second degree curves at the cost of an extra addition in
the inner loop. Add another degree for cubic splines, which allow
matching the slope of both the start and end of a section to the
slopes of the previous and next sections, respectively.
Slightly more calculations involved when starting a new section, but
you need only a fraction of the sections you need with linear
functions.
//David
.- M u C o S --------------------------------. .- David Olofson ------.
| A Free/Open Multimedia | | Audio Hacker |
| Plugin and Integration Standard | | Linux Advocate |
`------------> http://www.linuxdj.com/mucos -' | Open Source Advocate |
.- A u d i a l i t y ------------------------. | Singer |
| Rock Solid Low Latency Signal Processing | | Songwriter |
`---> http://www.angelfire.com/or/audiality -' `-> david_AT_linuxdj.com -'
This archive was generated by hypermail 2b28 : Tue Jul 18 2000 - 06:05:11 EEST