Actual result:
In VCV rack,
when a knob of 4ms Meta Module (VCV rack module) is assigned to a switch of another module,
if the target switch has three positions
then the mapping assigns position 1 to 0-25% knob range, position 2 to 25-75% range and position 3 to 75-100% range.
Expected result:
The mapping assigns position 1 to 0-33,33% knob range, position 2 to 33,34-66,66% range and position 3 to 66,67-100% range.
I see how this is not expected, because you might expect the ranges for each switch position to be equal. But in tracing the reason for this, it’s actually mimicking how VCV Rack works.
To set the value of mapped parameters when in VCV Rack the hub modules uses the built-in VCV function (paramQuantity->setScaledValue()) which linearly scales the knob position (0.0 to 1.0) to the switch’s range based on its min/max values (say, 0.0 to 2.0 for a 3-position switch where 0 is the first position, 1 is the second, and 2 is the third). So a value of 30% or 0.30 becomes 0.60 which rounds to 1 which is the second position (the rounding happens because switches in VCV Rack usually have snapEnabled turned on, and Rack uses rounding when that’s the case).
To make it consistent when playing the patch on the MM hardware, we mimic the same behavior.