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.

Configuration

1

Open MIDI Studio

  1. Open your computer’s Audio MIDI Setup app (found in Applications/Utilities, or by clicking the “Setup” button in the MIDI tab of MainStage’s preferences window). (If the MIDI Studio window doesn’t immediately appear, choose Show MIDI Studio in the Audio MIDI Setup’s Window menu.)
2

Open the IAC Driver Properties

Double-click IAC Driver to open the IAC Driver Properties window.

Macos Midi Iac Driver Properties Pn
3

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.

4

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.

Main Stage Concert Settings Midi Tab Pn

Then, switch to the Assignments & Mappings tab.

Main Stage Select Concert Assignments Mappings Tab Pn
5

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:

SettingValue
DeviceVirtual Patch Change IAC Driver
ChannelChannel 1
TypeSingle Value
Number85 (Ctrl 85)
MIDI ThruDo not pass through
Send Value toNone
NameVirtual Patch Change
Main Stage Hardware Input Assignment Popover Pn

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.

6

Set mapping

With the new assignment selected, change the mapping from None to Actions > Next Patch.

Main Stage Control Inspector Mapping Next Patch Pn
7

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”.

8

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”.

9

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.

Main Stage Channel Strip Editor Layer Editor Range Pn
10

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”.

Magic Fox Virtual Patch Change Script Pn

The MIDI control number must match the number you set in Step 5.

11

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.

Main Stage Channel Strip Midi Output Channel Pn

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.

Parameters

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.