Performance of tables slower than built in?

NaN divide at by.zero
Sat May 25 12:51:20 UTC 2019


On Saturday, 25 May 2019 at 09:52:22 UTC, Ola Fosheim Grøstad 
wrote:
> On Saturday, 25 May 2019 at 09:04:31 UTC, NaN wrote:
>> Its pretty common technique in audio synthesis.
>
> Indeed. CSound does this.
>
>> What i've done in the past is store a table of polynomial 
>> segments that were optimised with curve fitting.
>
> That's an interesting solution, how do you avoid higher order 
> discontinuities between segments? Crossfading? Or maybe it 
> wasn't audible.

I used an evolutionary optimisation algorithm on the table all at 
once. So you do a weighted sum of max deviation, and 1st and 2nd 
order discontinuity at the joins. And minimise that across the 
table as a whole. It seemed you could massively overweight the 
discontinuities without really affecting the curve fitting that 
much. So perfect joins only cost a little extra deviation in the 
fit of the polynomial.




More information about the Digitalmars-d-learn mailing list