lmms
lmms copied to clipboard
linearToLogScale and linearToLogScale in include/lmms_math.h do something completely unrelated to their function names
eˣ = exp(x) = pow(M_E, x) ≠ x^e = pow(x, M_E) = "logToLinearScale" log(x) ≠ pow(x, 1/M_E) = "linearToLogScale"
They seem to be used only in AutomatableModel.
Here are the functions:
https://github.com/LMMS/lmms/blob/a9e3e70ae3d28e7aa846904edae71863a9734a71/include/lmms_math.h#L197-L208
https://github.com/LMMS/lmms/blob/a9e3e70ae3d28e7aa846904edae71863a9734a71/include/lmms_math.h#L212-L225
static in a header function does make no sense
@JohannesLorenz Why do you marked this for 1.2? Shouldn't we take care of compatibility issues?
staticin a header function does make no sense
Not always, see this: https://gist.github.com/htfy96/50308afc11678d2e3766a36aa60d5f75
@PhysSong It's invalid and it's in stable-1.2. It might even generate wrong sounds.
Though... If we write a conversion function, that might break more than it might fix, and there are currently not many complaints from musicians. I think we can milestone it 1.3.
I think we may implement a 'power' scale(x^a) and upgrade the existing weird-and-fake logscale to it. In this way, we can support the old behavior while adding the correct behavior by converting the old 'logscale' to x^(1/e). However, it may confuse users.
So basically, the powf() parameters should be swapped but wasn't swapped due to a backward compat issue. How much impact will this make?
If there's a compat break, might as well re milestone it but let someone clarify.
Oops