New Tool (3.4 (or adjust API version)): Fix legacy instrument cutoff envelope behavior

com.vincentvoois.CutoffEnvelope301Fix.xrnx (4.8 KB)

For those struggling with importing <=3.01 old songs, this tool an attempt to restore envelop point values to the original legacy cutoff instrument filter behavior.
I thought Renoise applied some kind of runtime logarithmic scaling on the old formats instead of linear value application but it seems to be some kind of 1.7 exponent (comparing Khz values to percentage applications which were quite off)….

local function convert_value(v)
return clamp01(v ^ 1.7)
end
It really bothered me to have to alter these point values manually when loading old stuff and dreadfully also have to “approach” the exact value.

Because the points inside the legacy envelopes are not accessible in the Lua API and even the sample modulation sets (xrno) will not load with legacy values i was forced to apply stuff directly on the XML file of saved instruments, so this tool wil do a lot of writing actions on your harddrive.

If the v^1.7 would be applied at runtime inside Renoise itself, nobody would need to correct the compatibility values, but at least this way you don’t have to manually adjust all the points yourself by approach.

For as far as i could see, the runtime adjustment is globally applied to all cutoff filter types.
If you notice something different, please let me know. (specially Linux and MacOs regarding unzipping)

If you need this for older versions of Renoise, just adjust the API version accordingly, no intensive API code is used.