Switch Midi Channels via Variations & Patch Persist

Hi everyone,

I’m new to GP and about to rebuild my actual KRONOS setup via vst. Love the freedom and creativity capabilities GP offers, really a great product! I already found a solution to my question on my own (and by reading/searching this forum) but want to know from experts if the same could be achieved in an even more simple way.

I find that the lowest overall setup-complexity is achieved by having one dedicated rackspace per song and realize all the adaptions needed throughout a song via variations. Since I play with one 88 key controller, what I need is “perfect patch persist” and the possibility to exchange the complete sound setup between rackspace variations including sounds, layers and splits if necessary. With “perfect patch persist” I mean no stuck notes or glitches and hold via key or sustain pedal.

My solution offering all of the above is to change midi channel mappings via a simple knob widget cross variations and the usage of midi channel constrainers. But doing so is only half the solution: By enabling “Reset after change” in the MIDI In blocks, I’m done but don’t have patch persist when switching midi channels. Disabling “Reset after change” - for sure - leads to stuck notes. So, my solution is to midi-filter sustain/noteOff and bypass the midi channel constrainer. With this solution “patch persist” works like a charm across midi channel switches.

Here an example for the Song “Jump” that needs 3 different allocations/midi channels/sound setups:

So, my question: Is there an easier solution to achieve this, or in general, would you solve this differently and how?

Thank you :slight_smile:

1 Like

Hi @Basty85, welcome to the GP community forum. I am not sure I fully understand your solution. Could your please post your gig file? (I changed you user status such that you can do that even as a new community forum member)

Would this be of interest for you?

1 Like

Wow, how could I’ve missed this one :slight_smile:

Thx for your answer @David-san. I literally built the exact same thing/solution but without using GPScript and instead using different midi channels per switchable sound.

This solution is even more elegant & streamlined than mine. I’m gonna switch to this efficient approach using the Sciplet, thx and have a nice day!

1 Like

My method for this without scriptlets or even without variations is:

Let’s say you want to switch two sounds A and B within a song or rackspace, by pressing a button on your controller, or by variations, with holding notes while switching and avoiding hanging notes:

  • Use two MIDI in ports, here called A and B, and route them to the sounds A and B, either by different MIDI output channels to one VST or different connections to two different VST. Don’t mind the number of MIDI in blocks, I have usually dozends, one for each sound split or layer.

  • Generate a panel with two button widgets A and B. Learn them to the same button on your controller, but with inverted polarity. Pressing the button on the controller now should activate one button and deactivate the other, and vice versa. Depending on your controller, toggle mode could be required.

  • Then map widget A to the parameter “BlockNoteOn” of MIDI in A, same for B. Inverting the values of the buttons helps, otherwise an activated button menas an deactivated sound. Be sure not to block note off messages as this is prone for hanging notes.

Done. Now you can switch sounds A and B with a button on your controller, with persistance within one song, without varations or scriptlets.
Of course, now you can create variations with different states of the buttons, sound A only, sound B only, or both, and switch variations from your controller.
Muting of the sound VST is mostly unnecessary IMHO, as most instrument VST consume very low CPU resources as long as they don’t have to generate sounds, and unless you have dozends in parallel and run out of CPU otherwise. Then the beauty of the scriptlets of David-san come into play.

See also attached example, without sound plugins, and without controller mappings.

SoundSwitchDemo.gig (44.4 KB)



Unbelievable how many different solutions exist for that same “switch sounds by variation change w/ patch persist” functionality but with different magnitudes of complexity. This is also a clever approach for achieving this. Thx for your explanation, think I already got it how you do it and will definitely try out your gig example.

CPU load is another good point. I already realized that the solution of @David-san with dynamically bypassing the not needed plug-ins actually leads to a decreased CPU load compared to my “midi channel switch” approach where all plug-ins are active resp. not bypassed all of the time. Not too much but realizable.

Thank you!


For completeness, attached find an example of my original “switch sounds by varation w/ patch persist” approach without using Scriplets, just by switching midi channel. This also works

SwitchSoundsByVariationPatchPersist.gig (37.6 KB)


Thx @Angel

Just blocking NoteOn is for sure the obvious solution to this with lowest complexity (without using Scriplets) and even without the need to switch midi channels!

SwitchSoundsByVariationPatchPersistBlockNoteOnExample.gig (58.1 KB)

Thanks to everyone for the help in understanding things! :slight_smile: