Ok, I’m stumped. Can someone point out what I’m missing here?
I wrote a script to toggle the first 5 channels of a MIDI IN block on/off with a button. The toggle is behaving as expected. However, when I toggle them back on, it switches the output channel to 16. If I toggle them manually inside of the plugin window, they are mapped one-to-one like default.
Your insight is greatly appreciated, as always!
var analogV1, edrumin: PluginBlock
var label1,button1 : Widget
var i : Integer
on WidgetValueChanged(newvalue: double) from button1
SetWidgetLabel(label1, GetPluginCaption(analogV1))
if newvalue == 1.0 then
For i = 0; i < 6; i = i + 1 Do
SetParameter(edrumin, i, 0.0)
end
elsif newvalue == 0.0 then
For i = 0; i < 6; i = i + 1 Do
SetParameter(edrumin, i, 1.0)
end
end
end