I’m trying Gig Performer as a possibly more stable alternative to MainStage for a specific project. It’s coming along quite good but one feature from MS I seem to miss is the ability to fine scale the in/out of a controller mapping. See the attached screenshot for one curve example that I would like to reproduce in GP. Is this possible? Scripting involved? Thanks!
Everything is possible with a few scripting. So, basically you want to control a GP widget with a MIDI controller ranging from value 0 to 127 and the output is intended to remap this range following your curve to transpose from -24 to +24 ?
//$<AutoDeclare>
// DO NOT EDIT THIS SECTION MANUALLY
Var
PITCH_KNOB : Widget
RESCALED_KNOB : Widget
//$</AutoDeclare>
function rescale(value : double) Returns double
Var
rescaled_value : double;
rescaled_value = 0;
//originally a widget value ranges from 0.0 to 1.1 but the curve definition ranges from 0 to 127
value = value * 127.0;
Select
value < 47 Do rescaled_value = Scale(value, 0, 47, -24, 0);
value > 83 Do rescaled_value = Scale(value, 83, 127, 0, 24);
End
// The MIDI in block plugin transpose ranges from -48 to 48 but its value ranges from 0 to 1
rescaled_value = Scale(rescaled_value, -48, 48, 0, 1);
result = rescaled_value;
End
// Called when a widget value has changed
On WidgetValueChanged(newValue : double) from PITCH_KNOB
RESCALED_KNOB.SetWidgetValue(rescale(newValue));
End
Such that you can check what happens, the first knob is controlled by your MIDI controller, the second one is modified by your rescale curve and controls the transpose parameter of an assigned MIDI in block plugin. This one way of doing it, there are other possibilities…
Oh, sorry, it is not clear why, but as you found a workaround, that’s fine. By the way I tried to make the script easy to understand with several rescale steps, but of course you can use only one if you prefer. It is also possible to address diectly the tranpose parameter of the MIDI in plugin within the script, without using a second widget. But one thing at a time
I like it! I think it has good potential, and if it proves as stable and CPU friendly as it seems to be, it will be a winner I like the idea that if you’re missing a feature, you might very well be able to script it, I have to dig into that some more!