The Virtual Patch Change script allows you to trigger a patch change by playing any note on your keyboard. Because the script works on a separate, alias-able channel strip, each patch can have a different trigger note. Unlike assigning a foot switch to a note on the keyboard, the script still allows the trigger note to play. Click here for instructions on how to install this script.
If MainStage is not properly configured, your computer can very easily end up in an infinite loop of MIDI messages, and MainStage and/or your computer will freeze. Be very careful to set these settings correctly, and save your concert before starting.
Open MIDI Studio
Open the IAC Driver Properties
Double-click IAC Driver to open the IAC Driver Properties window.
Add port
Make sure Device is online is enabled. Add a port and rename it to “Virtual Patch Change”. Click “Apply” and quit the Audio MIDI Setup app.
Disable sending unused program changes
Choose File > Concert Settings
or click on the concert item in the Patch List to select it. In the MIDI tab of the Concert Settings, disable the option to send unused program changes to channel strips.
Then, switch to the Assignments & Mappings tab.
Add new assignment
Add a new assignment at the concert level. Click the assignment in the list to open the popover and set the following values:
Setting | Value |
---|---|
Device | Virtual Patch Change IAC Driver |
Channel | Channel 1 |
Type | Single Value |
Number | 85 (Ctrl 85) |
MIDI Thru | Do not pass through |
Send Value to | None |
Name | Virtual Patch Change |
Of the 128 MIDI control change numbers, most are associated with specific functions (for example, 64 is used for the sustain pedal). A handful of numbers, such as 85, are left undefined for exactly this sort of purpose. You can set this to another number as long as it matches the number specified in the Scripter window.
Set mapping
With the new assignment selected, change the mapping from None to Actions > Next Patch.
Add external instrument channel strip
Select the patch where you want to use the script. Add an external instrument channel strip and name it “VPC”.
Set the channel strip's output
Set the MIDI Output of the VPC channel strip to None. (We’ll change this again in Step 11. Setting it temporarily to None helps to avoid accidental infinite MIDI loops.)
Set the channel strip’s audio output to “No Output”.
Set the channel strip's range
Using the Layer Editor, set the range of note(s) that you want to use to trigger the patch change.
Add the Scripter plug-in
Click the MIDI FX button on the channel strip and choose the Scripter plug-in. The Scripter window will open. Click the drop-down menu (“Factory Default”) and select “MFT Virtual Patch Change NC”.
The MIDI control number must match the number you set in Step 5.
Set the channel strip's MIDI output
Change the MIDI Output of the VPC channel from None to Virtual Patch Change IAC Driver and set the Channel to 1.
Congratulations! If you followed all of the steps above, MainStage should advance patches when you play a key within the range you set in Step 9.
To additionally prevent infinite MIDI loops, make sure to assign all other screen controls (e.g., keyboards, pedals, foot switches, buttons, etc.) to a specific MIDI device.
You can alias this channel strip and use it in different patches and with a different note range.
Send After
Specifies whether the patch change should happen after the note is pressed or released.
MIDI Control Number
The control change number that should be sent when the script is activated.
Change Delay
The delay in milliseconds before the control change is sent.