Using MIDI OSC blocks to send MIDI to the Global Rackspace

Oct 25, 2021 | Gig Performer Blog, GP4, OSC

As of the time of writing, Gig Performer 4 does not support sending MIDI messages from a rackspace to the Global Rackspace or vice versa, you can only send audio data. Although a future version will most likely add this support (legal caveat – no guarantees), there are ways to accomplish this using MIDI OSC blocks instead.

What is OSC?

OSC (Open Sound Control) is a mechanism that allows real-time messages to be sent over a local network. A full explanation is beyond the scope of this article and readers interested in knowing more about it should visit the Open Sound Control website and become comfortable with concepts and terms such as OSC addresses and OSC arguments (integers, floats and strings). Gig Performer has included built-in support for OSC since its inception and more recent versions have added enhanced support through GPScript as well as through MIDI OSC blocks and Direct Addressable OSC for widgets.

The MIDI OSC blocks allow MIDI messages to be wrapped inside OSC packets – one important use case for this functionality is to be able to send MIDI messages to plugins inside Gig Performer from applications such as the Cycling 74’s MaxMSP visual programming environment. That allows you to use Gig Performer as an audio “server” driven by other applications.

Getting started

All blocks in Gig Performer can be assigned “handles”. These handles are used by both GP Script (the proprietary programming language included with Gig Performer) and by OSC. For the latter, the actual OSC addresses are derived from the handle. For example, you can set a plugin parameter value directly from OSC. How? Referring to the OSC message list in the documentation, you will find an OSC message with an address called /oscHandle/SetParam. The ‘oscHandle’ part of that address should be replaced by the actual handle you give to the plugin. So, suppose you have a plugin and you give it the handle abc. Then if you send the message /abc/SetParam   5   0.2 into Gig Performer from some other application, then parameter 5 of the plugin with the handle abc will be set to 0.2

Beyond messages like SetParam that will work with all plugins, some plugins have extra messages to which they can respond. Specifically, the MIDI In (OSC) block can respond to all sorts of extra messages (again, the entire list of such messages is described in that OSC message document.

In particular, if the MIDI In (OSC) block has a handle called “MidiFromLocal” then that block can respond to OSC messages of the form /MidiFromLocal/Midi a b c where a and optionally b and c represent the 1 to 3 bytes of a standard MIDI channel message. This is enough information to get started.

Set up your local rackspace

In the Wiring section of a regular rackspace, connect a MIDI In block (the automatically created MIDI In (OMNI) block will be fine for now to a MIDI Out (OSC) block.

Screenshot 5367

The MIDI In (OMNI) block works normally, receiving MIDI events from your controller as usual. Double-click on the MIDI Out (OSC) block to open its plugin editor.

Screenshot 5368

Set the OSC address as shown in the image above. The target IP should generally be set to 127.0.0.1 which means the computer on which Gig Performer is running. Set the port number to 54344 (the default listening port used by Gig Performer) unless you have explicitly changed the Gig Performer listening port in the OSC section of the options in which case you should set the port to that same number. In that OSC section of the options, also make sure that OSC is enabled. The other numbers you may see in this dialog are not relevant to this particular example.

Screenshot 5374

Now, any MIDI messages received by this MIDI Out (OSC) block will be wrapped in OSC messages and sent out (in this case to the same computer). Now all we need to do is to arrange for something to receive those messages.

Set up the global rackspace

Now go to the wiring view of the global rackspace and insert a MIDI In (OSC) block there. In my example here, I have connected a MIDI Monitor plugin so you can see what’s going on. Normally of course you would just connect your synth plugin.

Screenshot 5371

Next, right-click on the MIDI In (OSC) block and select Set Handle….

Screenshot 5372

That will bring up a dialog where you can enter the OSC handle.

Screenshot 5373

Make sure to Enable OSC and then press OK. Your wiring view should now look like this.

Screenshot 5370

You’re done. If you open the MIDI Monitor and send MIDI events from your keyboard or control surface, you’ll see them displayed in the Monitor window. That’s all there is to it!

If you have any questions or thoughts, please visit this Community thread.

.
Related topics
:
OSC messages in Gig Performer User Manual
How to control your guitar or keyboard effects from a Web browser
Use your mobile phone to control your guitar or keyboard effects
Gig Performer as an OSC controller