If you set a plugin block’s status to bypassed, then immediately set it unbypassed as a response to a control (for instance, a button push), it behaves like a toggle, flipping on and off with each press of the button. Surely, this is not intended behavior. Code follows. Gif included.
Rackspace attached.
Var
MidiInput : MidiInBlock
Impulse : MidiInBlock
On ControlChangeEvent (c: ControlChangeMessage) From Impulse
Select
// Inst Set 1
GetCCNumber(c) == 51 Do
SetPluginBypassed(MidiInput, True)
SetPluginBypassed(MidiInput, False)
Print("Is plugin bypassed NOW? " + IsPluginBypassed(MidiInput))
End
End
I can reproduce on Mac, but my question would rather be: what are you trying to achieve?
Having commands to bypass then immediately unbypass would serve no practical purpose, from what I can see.
The real reason for this has nothing to do with GPScript, but rather with the way things work in the MIDIIn block.
For any other block/plugin this will work properly and you will not even see the plugin being bypassed/unbypassed but for the MIDI In/Out blocks we have to take some special considerations when bypassing which produce this kind of behaviour if you, for some reason, do the above and bypass and unbypass the plugin in within a few milliseconds.
I have arrays of MidiInBlocks that I am considering “instrument sets”. I use a loop to bypass or unbypass every “instrument” (MidiInBlock) in the set. If two different sets contain the same “instrument” and I deactivate one set and activate the other, the “instrument” (MidiInBlock) is effectively cycled, as discussed. The expected output is a net zero change in state for the shared “instrument”. Instead, it toggles.
If I can’t do this then I guess I have to either target a different block type such as the plugin itself (easy enough),
or rework my bypassing function into something more complex that tries to account for whatever instrument is being turned on,
or scour the GP documentation for a recabling command?
Yeah, that’s an option. But not my favorite. I’d like to keep one rackspace per song, instead of having several rackspaces I need to switch through per song. This way I can use one program change that both cues up a song in ableton, and gets all the instruments for the song loaded. Then the same 3 or 4 buttons on my midi controller can switch between the appropriate sounds for that song. Less to fool with on stage. Cue song, change between correct instruments.
The reason is you’re a new user and the discourse platform that we use limits what new users can do until it determines that the user is legitimate and not a spammer.
Used to be more active. I understand the forum backend was changed at some point, at which time I was reset to a new user. Anyway, at what threshold can I edit my posts again? Used to be able to.