Wait. I've made a vice-versa mistake due to not testing it for real. I still believe the cubic approximation is a pretty good one against the IEC/logarithmic one. My mistake was that I inverted the conversion. Where a cubic power was due (cubef(x)) I've made it a cube root (cbrtf(x)). I'll revert this gross mistake and you'll see that things will work better and faster :)
nb. the optimized cbrtf(x) is 4 times faster than IEC_Scale(log10f2(x)) and the result difference is negligible under the problem at hand IMO.
[UPDATE:] qtractor-0.4.1.1328 (cvs) has it fixed; still not tested tho.
Wait. I've made a vice-versa mistake due to not testing it for real. I still believe the cubic approximation is a pretty good one against the IEC/logarithmic one. My mistake was that I inverted the conversion. Where a cubic power was due (
cubef(x)
) I've made it a cube root (cbrtf(x)
). I'll revert this gross mistake and you'll see that things will work better and faster :)nb. the optimized
cbrtf(x)
is 4 times faster thanIEC_Scale(log10f2(x))
and the result difference is negligible under the problem at hand IMO.[UPDATE:] qtractor-0.4.1.1328 (cvs) has it fixed; still not tested tho.
Seeya