Wrap modulation value
-
@Christoph-Hart What would be the way to wrap a mod value once it's hitting the max or min of a parameter, if any?
I've made an infinite parameter that makes its associated to wrap the value once reaching max, and it's working nicely in the DSP.
But what about the modulation matrix in this context? -
My answer might just live in the Modulation range, but I can't seem to make it doing anything different than the default behaviour.
First question -> is this even possible with a standard parameter? (aka not a Matrix Modulator one)
I'm trying to set the properties below to limit the mod range with
MM.setMatrixModulationProperties(properties);
const var properties = { SelectableSources: true, DefaultInitValues: { SET1: { Intensity: 1.5, Mode: "Bipolar", IsNormalized: false } }, RangeProperties: { SET1: { InputRange: { min: 0.0, max: 3.0, middlePosition: 1.5, stepSize: 0.0, Inverted: false }, OutputRange: { min: 0.3333, // shouldn't this restrict the range? max: 0.6667, middlePosition: 0.5, stepSize: 0.0, Inverted: false }, mode: "Linear", UseMidPositionAsZero: true } } };
The UI knob properties are matching the above ones.
Also, the doc object example looks a bit different
(mode
&UseMidPositionAsZero
are not at the same place compared toMM.getMatrixModulationProperties()
)mod.setMatrixProperties({ InputRange: // defines the range of the UI knob { min: 0.0, max: 1.0, middlePosition: 0.5, mode: "NormalizedPercentage", stepSize: 0.0, }, OutputRange: // defines the range of the scaled modulation output signal { min: 0.0, max: 1.0, middlePosition: 0.5, stepSize: 0.0, UseMidPositionAsZero: false } });
-
@ustk I don't fully understand what you're after but there is no defined consistent out of bounds range behaviour for the modulators, as it depends on the target parameter (eg. panning get's truncated, but gain & pitch can be extended to the max values of the engine).
-
@Christoph-Hart Thanks.
Since I understand I cannot wrap the modulation, nor exceed the bounds, my idea is:
- for an end value of 0-1, set a 0-3 knob without mapping but from 1 to 2 (so the 0-1 is just offset to 1-2 inside the 0-3 knob)
- modulate the 0-3 knob, with the
OutputRange
set to0.333
-0.667
so no matter where you push the modulation, it will (should) never exceed the 0-3 range (because the value will always be between 1 and 2) - Then in the DSP, it will be easy to map this 0-3 value+mod back to 0-1, with wrapping as a cherry on the top
But the properties to limit the
OutputRange
aren't working for simple parameters...How does it sound? Feasible?
0 1 2 3 |--------------|--------------|--------------| <- knob range |--------------| <- useful value inside knob, will be converted in DSP to 0-1 |--------------------------------------------| <- total modulation range, <-------------2-------------> will be wrapped in the <-------------1-------------> 0-1 domain in DSP
-
@Christoph-Hart said in Wrap modulation value:
@ustk I don't fully understand what you're after but there is no defined consistent out of bounds range behaviour for the modulators, as it depends on the target parameter (eg. panning get's truncated, but gain & pitch can be extended to the max values of the engine).
So in the end, do you mean a
0-1
UI knob could theoretically modulate a-1
to2
DSP knob?
I tried but failed...Here the UI knob is 0-1, mod intensity to full
-
@Christoph-Hart Since
InputRange
andOutputRange
only work with Matrix Modulators, I'm just stuck on how to set the modulation range of a ScriptFX parameter...
In fact, just being able to limit theIntensity
would fix my problem