Hey there,
I’ve been trying to set up a button to act as the bypass on a plugin, but have it mapped to 0 and 1 of the same CC Number as a knob that controls one of the plugin’s parameters, so that when the knob is all the way off, the plugin is bypassed, but as soon as it’s value is 1, the plugin kicks on. So I learned the button to the desired CC Number, and set it’s range from 0 to 1m. I’m using the LED Button widget, and the light on the button responds (and the “now” value jumps to 100) as expected, however, the plugin bypass doesn’t release until I’ve turned the knob halfway.
Thinking about it, I guess this may be because it’s scaling the incoming CC so that 127 in = 1 (or .8) out, although even that doesn’t quite explain the behavior. It seems like the default behavior for the min/max settings is scaling.
Anyway, just thinking it would be cool if there were some way to do this.
Widgets do not send MIDI events, they send host automation parameter values which are always in the range 0.0 to 1.0 and they send those values to whatever parameter of the plugin is associated with the widget. The incoming CC value that controls the widget does not get passed on to the plugin. That is by design. The Bypass parameter enabled or disabled when the incoming value from the widget crosses above or below respectively 0.5
Note that when a plugin is bypassed, it wont respond to any incoming MIDI events from anywhere either.
Hey David,
Thanks for the speedy response as always.
I realize widgets don’t send MIDI, apologies if I was unclear. What I was saying is that, as bypass is a binary state, I’d really like to be able to map 0 to 1 (of 127), to 0 to 1 (of 1), that way, when incoming CC exceeds 0, the plugin is un-bypassed (as I am inverting the range). I’m sure it’d be trivial to script this, but I already do tons of scripting outside of GP and was hoping to avoid adding more scripting to the complexity of my world.
You’d have to use a script for this. For example, if you have a widget with a GPScript name of “Bypass” then the following would work
Var
SomePlugin : PluginBlock
Bypass : Widget
// Called when a widget value has changed
On WidgetValueChanged(newValue : double) from Bypass
if newValue > 0
then SetPluginBypassed(SomePlugin, false) // Turn off bypass if value greater than 0
else SetPluginBypassed(SomePlugin, true)
end
End
You could associate that widget with a physical CC.
Hey David,
Thanks so much for the code snippet. I’ll give it a try.
I appreciate your help, as always.
Also, just thought of another way to do it:
set the min/max 0 to 0.5, then invert the values. According to what we discussed, this should work, no? Like the previous example the LED on the widget responds appropriately. The bypass state on the plugin does not though, and I think this may be a bug. The bypass still switches at half-way through the knob turn, despite the fact that the “Now” box reads 100 when the knob is just above zero. In fact, it seems no matter what I do, the bypass always kicks at (presumably) 64 (from the knob), even though the widget suggests it should be otherwise.
If it bypasses at a value of .5, and I set min/max to 0/.5 respectively, shouldn’t it bypass at 127? Or, if the incoming values are inverted, at 0? As I mentioned, the “Now” fields behave just like that, while the bypass state does not.
Am I fundamentally misinterpreting the way min/max works?
Also, an oddity with grouped buttons that is semi-related, only in the fact that the ‘LED’ on the widget updates differently than the actual parameter: If you group some buttons, but check the “invert value” box for some of them, the connected parameter updates correctly, inverting some and not others. The LED on the button does not reflect the inversion however, nor does the value in the “Now” box. Perhaps this is by design, but it is rather confusing when you have two states you want to switch between, like muting one group of tracks while un-muting another.