Help with Parameter Expression

Official support for: meldaproduction.com
RELATED
PRODUCTS

Post

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!!
Yesterday I asked Vojtech about these mapping formulas, and he said he would check if he finds the time.
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.

Post

Antisha wrote: Fri Aug 15, 2025 8:43 am
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!!
Yesterday I asked Vojtech about these mapping formulas, and he said he would check if he finds the time.
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.
Thank you my friend! I´ll take a look at it!

Post

With the help of ChatGPT I found the simplest formula to convert a 0–1 range into a frequency range:

A*(B/A)^x

where A and B are the minimum and maximum of the frequency range.

For 20–20000 Hz it becomes:
20 * (20000/20)^x
i.e.
20 * 1000^x

This formula works for other ranges as well.
However, in most cases we don’t need to write it out manually. The expression system already provides functions for these conversions, covering all typical use-cases:

f01
ffrom01
f01range(x, a, b)
ffrom01range(x, a, b)
etc.

For example:
f01(ffrom01(x) * 0.5)
will make a multiparameter control the frequency one octave lower.

Post

I'll provide some examples in the docs in the next version!
Vojtech
MeldaProduction MSoundFactory MDrummer MCompleteBundle The best plugins in the world :D

Post

Hi again guys!
I am having a big trouble again while mapping some controls. Could I ask for your help again? 🙏

So I am trying to apply a Hilbert filter, and I want to compensate the latency automatically. The latency reported should be half the length of the filter length.

The problem: the filter goes from [1, 10000] and the latency report module goes from [0 to 10000].
I can´t figure it out how to sync both by my self.
I have tried a lot using to01(from01), scaling, etc, but I just can solve it.
I would really appreciate if someone could take a look at it and help me!

Thank you very much!

MXXX Preset:

Code: Select all

$eNrdVk1rJEUYfgeDioKgLl5tiOAlSXdnE5P1MqnMTCeD03GYTmIJrlg7-c5MszVdvVXVszM5BL8QFlHYn6CHBUFEEWFP-oD1orLgLeBB8aR7EITVg9R098wk2SioIOwchqrnqXq-6u2nCvxNSn1KqUKto7irgATIsa0xbPK0G8WgnAUXyDy4JbKPUkUihhV48HEgfr1ab0rRlaxf6bG4i7WYXeIILpBjcIVp7AoZHaA0XC2MtJBBdIA1pkagLqy6C+ed87MEKHd11V14bv0CkEoqJca6KVGhrldBVdkgCg+bPabwcDvil1BqqyU00yYy4qdcR00mWR81SlURnLNEYWg8+2zY8F7c5KJ9eezFtUijFSQ80hrHfl0IwfxuXt84wSznDNwpk6IupmpAs5kqBkCocfWy+dthfQRVEfFA8DQLz0s5PwVbLtBNFl92wM6tBJPDGNd9-gWUMXJfhOiA8iKuUQKZzwZLu6PEwHktpngD467uORDeffMp7-uDt8sTxpN4JcW4PXIgfP3o2dtz3-xaJvMhJro3k+c-PN-TVaZZ+A6QgPUTjktexDGrwrTbavEAuUiMeToZk9rOfrNVC2q74D5iT-BG8yxm+zgDtp07d-8f57UrDtBERLE2jRGuNR54V378e5lkpRx3pR4lCKohrgY95B2wZ5b-9sov1p1KaWNm+Sz97ZMX-7jx2dxZ9Ce3bn138emHN2axa2+sf37uvUfP2oLrN97-6u5jG6fj2466vTxAk5V7X2a1fP9lZdunhKmUC1ODaaMBs6KUQy1MhNR-L0tV5GwE4c9PfPDQ2qfX-0PFMGGfUHI4ATiFvhZ3AB-LHRCjkqB2hOwzDmSf8RQzaHNkdSKptJUUNoAECWJYaB4AqWKHpVyPd43ho07jZpls7dWz28lYWp5a39qrB6yPLXHV5LG1V68ILiSoleqat+J4HpBJvC2TuJqeFW1Oo5gM73E1WIvWLkssYmXabS1ajTzRaZBZ7D4bFtCH6e6Xz98uk7HTmbk56Qxz5+y-iOBEH1iLVnbUhU-60fa5H9-5ojzjs9d65qe3KkcTn-7aNfLaD18f9zn1UxsmEpV5TUxKUroXC2povWo5S6umlylp62iA2VsgezCYbVUcRG30T174BZGJvJDHqGJStCIqcEs0n43qGvv1uCPAnkCBZhqBNlOZCIVg03qstEz7GGuwqbmDzeIek6xtKmpTj7OuMrqSv2CKfoV-b9KmpJkXwYxlAtRnWkbDKZhVYxnoS1Goez7QQKSyjeZDxM64k6K4axTFtg--BLgKUxA=

Post

This probably isn’t the most elegant solution, but it works — the parameters are in sync. The occasional 1ms difference is, I believe, the result of the system’s internal rounding, not an error. The only thing left is to limit the range to 1000 ms, which can be done with an additional multiparameter so the formula doesn’t get overly complicated.

Code: Select all

$eNrdVs9rJEUUfoNBREEQvVuQg7sySXdPErLxkqnMj2TYmdhMJ7EEd7F2+mWm2Zqu3qrq2cwegh6D6Mm-wMPiQQTx7tHD6kFlwZs3z+5hQVAPUtPd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TcH72spIfmEp2hP+vUuHUT8vgl2rBFiHGxWdzMCsGhVgb0WhGXSABTJVPbTfHR5P+imK+1ZAHOf0T5AqQVk=
The complication is that, besides one MP having a range of 1–10⁴ and the other 0–10⁴, the first one uses an x² curve while the second uses an x⁴ curve, so multiple range and curve conversions are needed.

Post

Antisha wrote: Mon Dec 01, 2025 9:23 pm This probably isn’t the most elegant solution, but it works — the parameters are in sync. The occasional 1ms difference is, I believe, the result of the system’s internal rounding, not an error. The only thing left is to limit the range to 1000 ms, which can be done with an additional multiparameter so the formula doesn’t get overly complicated.

Code: Select all

$eNrdVs9rJEUUfoNBREEQvVuQg7sySXdPErLxkqnMj2TYmdhMJ7EEd7F2+mWm2Zqu3qrq2cwegh6D6Mm-wMPiQQTx7tHD6kFlwZs3z+5hQVAPUtPdM5PJRkEFYecwVH2v+33vvXr9vYLODmMdxphGY6K4r4EGKLBnMPRF2o9i0G7ZA7oMXokeodKRjGEdnn0JaKdVb-lK9hUf1gY87mMj5rcEggf0HFzjBvtSRfdQWVsjjIxUQXQPG1yPQW9teOU1d23eANrbcrfKnre2DrSWKoWx8RVqNK066DofReGpP+AaT-cicQuVIV1puLGh0U4qTORzxYdoUOmaFIInGkNL3eEn7eabO0L2bk9oPELb3SARkTE4IfYgBPv79uPqgqWSW+DRNi0KY8sGLNvpYgGUWaq37d8+HyLomoxHUqRZeM1UiAsw8YDt8Pi2C07uJZiexqTwy9dRxSg6MkQXdDMSBhXQ5WyxejBOLJzXYoa3Me6bgQvhp19f3zwrLVWnlqbCOynGvbEL4Xs-vfZw6fvH23Q5xMQM5vL8hwd8scosC98FGvBhInC1GQnMqjBrt0Y8QiET655N17Sxf+R3G0HjALznnSne9i+z7J23gOPk5N7-Q9644wJLZBQb2xjhZvuZD9Rnv2-TrJSTrjTjBEG35d1ggOIYnLnHf33nF-KoVqrOPT5v-uHlG3-c-2LpMvPnDx78eOPV56rz2Nn717585cMXLnsFr93-6JvfXqxejG8v6g-yAG1W3lOZVeXpy8pxLghTKRemNjdWA+ZFKYe6mEhl-l6W6ij4uNCXx-+hYtiwF5QcFgC30NdiBoiJ3AG1Kgl6X6ohF0CPuEgxg3bG5DhS2pCk8AE0SBDDQvMA6O5hK5tD9pXKzM3uYSvgQ+zKuzbg3cNWTQqpQK-XN5vrbrMJdBpY12aoZ4fC-BnddPmEGUBWyAFPCCWZSJMV0s4zmuQwF+SEAUL4JD346o2H25PzyzBvyfkLuoXTJSskO8DLCDqbZ-Tdn787TzBz2jhJFGp7I5gmW3qSFbSRrkeukGMlh6535eRmpeyVPdd13avkdeKubpSJWyYTgFwlN4m7Wtmwrctoz0QjzEZ-dkGwFHUcRT3sLM73wpBpulTnTMWm6DzU4JVYvhu3DA5b8bEEZwoFhhsE5qcqkRrBYa1YG5UOMTbgMDty7cMDrnjPltphTcH72spIfmEp2hP+vUuHUT8vgl2rBFiHGxWdzMCsGhVgb0WhGXSABTJVPbTfHR5P+imK+1ZAHOf0T5AqQVk=
The complication is that, besides one MP having a range of 1–10⁴ and the other 0–10⁴, the first one uses an x² curve while the second uses an x⁴ curve, so multiple range and curve conversions are needed.
Wow! It seems pretty clean to me! And it works perfectly fine! Thank youuu very much Antisha!!!!!! :) :) :)

Post

So just in case someone finds this thread, I think I found an easier/alternative way:

With: Value = 0 | Max = 50

Code: Select all

(0.5/50 + 49.5/50*x) ^ 0.25
or:

Code: Select all

to01(0.5 + x*49.5, 0, 50) ^ 0.25
or with: Value = 0 | Max = 100 so it calcs the half automatically (easier to understand):

Code: Select all

((1 + 99*x) / 100 / 2) ^ 0.25
or

Code: Select all

(to01(1 + 99*x, 0, 100) / 2) ^ 0.25
Note: in these codes I use x instead of x^2 because I converted 1-100 to linear to avoid overcomplicating the examples.

Code: Select all

$eNrdVk1oJEUUfsGgorAg60lEG3JwV5N092xiEi+Tyvwkg9OxmU5iCe6ylemXmWZrunqrqmcziwT15LLo1ZMXD3sSQTx50ZuH9WJkQbzoyZuwexAE9SDV3fOTZLOCCsLOYXj1ve7389Xr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DWYFNzVpuHu0yytmHapnXOOsroT3HTGc41-PuQNiV+QYKxZQLUY1pG+2MwZ6ME9PUo1F0PaCBS2UbzweJeNmFR3DHKY9sHfwH9qFYo

Just posting so we can have more options and references!
I find that using this method creates a 1 sample difference in delay for same values, so I imagine that this is due to some float precision limitation.
If someone finds it wrong, let me know!
Thank you!

Post Reply

Return to “MeldaProduction”