Open Sound Control (OSC) is a way for music apps and devices to send each other messages over a network, or between apps on one PC. An OSC connection in Windows MIDI Patchbay turns MIDI into OSC messages and back, so an OSC app can play your synths, and your keyboards can play it.
This article walks through setting up common apps. The OSC connections section of the Windows MIDI Patchbay page explains every setting.
127.0.0.1. To reach another computer, phone, or tablet, use its name or its IP address, like 192.168.1.20, or pick it with Browse network when it announces itself. To find this PC’s address, open Settings, then Network & internet, then select your network and look for IPv4 address.REAPER can take MIDI over OSC into its virtual keyboard, which any track can record from. This sends from Windows MIDI Patchbay to REAPER. REAPER doesn’t send its virtual keyboard back out as OSC.
In REAPER:
8000 already. Leave Pattern config as Default.In Windows MIDI Patchbay:
127.0.0.1, port 8000, and doesn’t listen, because REAPER sends nothing back.Notes, controllers, program changes, channel pressure, poly pressure, and pitch bend all reach REAPER on the channel they were played on. REAPER counts channels from 0, and reads pitch bend as 0 to 16383 with 8192 in the middle, which is what this preset sends.
Notes, controllers, program changes, channel pressure, poly pressure, and pitch bend all reach REAPER on the channel they were played on. REAPER counts channels from 0, and reads pitch bend as 0 to 16383 with 8192 in the middle, which is what this preset sends. We checked this with REAPER on the same PC as Windows MIDI Patchbay.
To play REAPER on another PC or a Mac, send to that computer’s address instead of 127.0.0.1, and let REAPER through the firewall on that computer.
TouchOSC has no MIDI over OSC of its own. Each control sends an OSC message of its own, like /1/fader3 with a value from 0 to 1. There are two ways to use them: as they come, with the TouchOSC preset, or with addresses you give each control.
There are two versions of TouchOSC:
Windows MIDI Patchbay and TouchOSC can find each other, so you don’t have to type addresses:
9000: TouchOSC only announces itself when it does.Patchbay OSC (STUDIO-PC). Tap it, and TouchOSC fills in Host and Port (outgoing).(TouchOSC), like iPhone [iPhone] (TouchOSC). Pick it to fill in Send to and Port.The quickest way, with nothing to change in TouchOSC:
8000. In Send to, type your phone or tablet’s address, with port 9000, or pick it with Browse network. If its address changes from day to day, select the connection after you add it and check Reply to last sender instead.8000 and listens on port 9000. Or pick this PC from the list, as in Find each other on the network.The TouchOSC preset is a row of rules: faders /1/fader1 to /1/fader5 are controllers 71 to 75, toggles /1/toggle1 to /1/toggle4 are controllers 80 to 83, and push buttons /1/push1 and up play notes from middle C, all on channel 1. The rules work both ways, so a controller the patch sends moves the fader on your phone.
For finer control than MIDI 1.0’s 128 steps, select the OSC connection and check MIDI 2.0 messages on the row. A fader then sets its controller with 32-bit precision. Turn it on only when the synth or app it connects to takes MIDI 2.0.
For other controls, select the OSC connection and move them. Recently heard lists what arrives, and Add a rule for this adds a rule for each control, or for a whole set of them, like every fader on page 2. To change what a rule does, select the OSC connection and find the rule under Rows.
You can also give each control an address that matches a format Windows MIDI Patchbay reads. The Paths format is the easiest:
| To send | Address | Value |
|---|---|---|
| A note on channel 1 | /midi/1/note/60 |
The velocity. 0, or a button let go, is a note off. |
| A control change on channel 1 | /midi/1/cc/7 |
The value |
| Pitch bend on channel 1 | /midi/1/pitch |
The bend |
Set up the OSC connection as above, but choose Paths.
TouchOSC controls go from 0 to 1 unless you change them. Pick one of these, so the numbers come out right:
In TouchOSC, set up a connection that sends to this PC’s address on port 8000 and listens on port 9000, then give each control the address from the table above. In TouchOSC Mk1, the older version, you do this in the free TouchOSC Editor on your PC, from Hexler’s TouchOSC Mk1 page: clear the auto box under OSC, type the address, and set the Value Range. Then select Sync, and on the phone go to Layout, then Add, and pick your PC.
It works the other way too. Connect something to the OSC connection’s In, and a TouchOSC fader with the same address, such as /midi/1/cc/11, moves to follow it.
OSC has a type of its own for MIDI messages. Some apps, like TouchDesigner, can read it. TouchDesigner’s documentation lists it as a type its OSC In DAT reads. We haven’t checked it with TouchDesigner.
/midi, with one MIDI message in it./midi on this PC.Each message also carries a port number, which matches the row’s group: the row on group 1 uses port 0, the row on group 2 uses port 1, and so on.
Open Stage Control’s documentation names its MIDI messages /note, /control, /program, /pitch, and so on, with the channel first and the numbers after it. The Open Stage Control preset reads and writes those names, with channels 1 to 16. We haven’t checked it with Open Stage Control.
/control with the channel, the controller number, and the value.The OSC connections section of the Windows MIDI Patchbay page lists what each preset sends.
Almost every OSC app uses UDP, where each message travels on its own. Some apps can also use TCP, which never loses a message, so it suits big SysEx. With TCP, one side waits for the other to connect, and messages go both ways on that connection.
If the connection drops, Windows MIDI Patchbay connects again every 2 seconds. We checked both framings, both ways, with a separate OSC test program on this PC.
Your DAW can use an OSC connection like any MIDI device, so an OSC app can play a track, and its controls can follow the DAW, with no loopback in between:
The device is only there while the patch routes. We checked it with the MIDI Console, but not yet with a DAW.
Select the OSC connection on the canvas. The details panel shows:
If nothing shows up in Recently heard at all, the messages aren’t reaching this PC. Check the port and address in the other app, and check the Windows Firewall bar in the patch window. If two apps can’t find each other on the network, type the address and port instead. Some networks don’t pass along the announcements apps use to find each other.