Exactly. I'm using mine in applications where you can set the beat detune of an oscillator in Hz or BPM, so two oscillators beat exactly in time. I also use this for circuit simulation, where for example in an MS20 mk1 filter the signal is passing through the exp of a transistor for tuning and non-linearities.Z1202 wrote: Wed Feb 26, 2020 1:07 pmThe potentially sensitive areas would be detuned oscillator beating and converting audio-rate modulation signals, where subtle spectral differences can become audible. I'm not sure what's the required precision range for that off the top of my head.mystran wrote: Wed Feb 26, 2020 10:24 amThat said, I would argue you probably don't need anywhere NEAR that good accuracy for typical tuning purposes. I used to have a table based approximation with about 0.02 cents and never noticed any issues (even before I eventually added lerps to the thing).
I've found that computing a 7th order poly works great in f32, but I actually use f64 for the main part of the filter. The trick is to keep precision at f64 until you've subtracted the "dc" part and gotten your input to the poly in the range -1/2 to 1/2 (or 0 to 1), and then convert to f32, computed the poly and power parts and promote back to f64. This means you can do twice as many parallel exp/pow, and still have enough precision for what I need.
I'll double check the 7th order vs 5th order against the standard pow2 math results and let you know the differences at f32 precision.
