Thu Mar 7 09:29:07 EST 2013


I'm running into some interesting problems with the audio synth stuff
I'm working on.  At some points in the program, (complex) exponentials
are necessary.  Some observations:

- exp / sin / cos from math.h, libm.so seem to be a bit slow.

- straight line curves in the form of complex exponentials, e.g. for
  parameter interpolation, can be generated incrementally using just
  multiply add.

- for "algorithm" parameter transformation such as initializing
  interpolating exponential curves, the accuracy is key.

- for "human" parameter transformation, i.e. things like mapping a
  control value to a frequency value, the accuracy of exp probably
  doesn't need to be so high, and approximation could be used.

- Some interesting comments on stackexchange[1].

- Maybe this can be split into 2 parts: linear evolution based on
  previous coefficient + computation of updated coefficient using some
  iteration step, based on some setpoint.

Conclusion seems to be that yes, exp and sin are expensive.

[1] http://math.stackexchange.com/questions/18445/fastest-way-to-calculate-ex-upto-arbitrary-number-of-decimals