Yesterday I asked Vojtech about these mapping formulas, and he said he would check if he finds the time.vanerio wrote: Wed Aug 13, 2025 5:11 pm Hi again Antisha!
I was trying to convert rate values to linear, so I need to find the original mapping functions used and while I found some equations that match perfectly, I suposse that some cleaner alternatives were used insted.
So would it be possible to know the formulas Melda plugins map the Rate knob values with? I mean rate like in MTremolo, MVibrato, etc.
I am interested in both 100 Hz and 20 Hz versions:
Right now this is what I have (my dirty versions, that still match though):
100 HZ: 10^(4x-4)
20 Hz: 2000^(x-1)
Thank you!!
I’m not a mathematician, but it seems that the frequency scale can be expressed as a power of 10 over a logarithmic range. In practice, this means converting the 0–1 parameter range into the corresponding a–b range in log10 space (using something like from01(x, a, b)), and then applying the power of 10.
Here are three common ranges expressed that way:
20–20000 Hz → 10^(from01(x, log10(20), log10(20000)))
0.01–100 Hz → 10^(from01(x, -2, 2))
0.1–20 Hz → 10^(from01(x, -1, log10(20)))
I’m not sure if this is exactly the method used internally, but it produces results that match the expected scaling.
