Newbie question

I just got OSC working with cubase 12. I’d like to create buttons and have them control key commands in Cubase. Can anyone point me in the right direction in creating shortcuts? I’m totally lost and have no scripting knowledge.

Hi and welcome!

Open Stage Control can comunicate with Cubase only via MIDI, so you need to set up a virtual MIDI port. If on Windows, use loopMIDI to create such a port. If on MacOS, use the Audio MIDI Setup app (native app).

Once you have the MIDI port set, I'll tell you the rest.

1 Like

Thanks for the reply. I’m running osc on a slave computer and running rtpmidi on both PC’s. The Vi control template I downloaded seems to work with functions like play, stop, etc. Do I need to setup another virtual midi port?

Why do you run the O-S-C server on a separate computer? I would advise you not to do it. While there's no good reason to run the server elsewhere than on the computer running Cubase, it should work either way...

Would've been nice if you also posted a link to that template (so that I know exactly what you're talking about).

If you already use a port for a template you downloaded, I would advise you to create a different port for buttons that you'll be creating. This way, you can keep track of what MIDI messages (addresses) you used to link O-S-C widgets (buttons, faders, switches, etc) to different commands in Cubase.

There's no way to see if a MIDI message has been used or not, so it's better to use a second/fresh MIDI port (and stick with it).

I’m using a slave pc because that has the touchscreen connected to it.

Would I create another midi port on the master computer using loopmidi? When I get home
Today I’ll post a link to the template in using from VI Control. Thanks again for helping out.

As long all devices are connected through LAN, all of them can access the O-S-C GUI.

  1. Quit using rtpMIDI. Things get simpler without it.
  2. Run O-S-C from the computer that runs Cubase and set the no-gui property to true.
O-S-C (configuration form)

  1. Set a static ip address on the PC that runs Cubase (and O-S-C). Tutorial here.
    From now on, this computer will be "the server" and all the other devices (including your phone) will be "the clients".
  2. On client devices you will be using a browser (preferably Google Chrome) to access the O-S-C GUI. In other words, you will be using the static ip address (from step 3) concatenated with the port that O-S-C is set to work on (usually this port is 8080). The IP address that you need to use shows up in the O-S-C console, as soon as you start the server.
    On my computer, the console looks like this:
    The second ip address is the one you need to use to connect to the O-S-C GUI from a client device. First address works only on the server computer.
    On every client you have around, create a shortcut/bookmark so that you can access the GUI easier/faster.

Now when you start Cubase, you need to remember to also start the O-S-C server.

Stop using rtpMIDI and use loopMIDI to recreate the port that was created in rtpMIDI, then create a secondary/fresh port.

On forums it's better to speak about the requested file when you actually have it (and when you have uploaded it). Mentioning that you'll post the file "when you get home", is not very useful to me (or others).

@theodor_the_1st is back :grin:
Although he seems to be a bit "direct", he is very kind and precious for OSC community :wink:

Thank you for the appreciation.
I am deeply flattered, but if I'm any good, it's because @jean-emmanuel took the time to answer my questions without discouraging me. He's the precious one.

Our precious...! :shushing_face:


Ahaha damned I thought this picture of me had been removed, internet never forgets !

1 Like

Thank you very much for the help. I got rid of rtpmidi and now I’m only using loopmidi and OsC server is running on the same machine as Cubase. I have attached the file that I'm using as my starting template. I've named the loopmidi port according to the target name of the template "oscTraCtrlOut" I assigned that in the generic remote for both input and output. Some functions work while others do not.

TemplateControl 0.4.5.json (438.6 KB)

Ok, so you know about Generic Remote. Good. The next step would be to create a secondary Generic Remote, and set the input and output to that specific/fresh port that you've just created using loopMIDI. Now, what button would you like to create? What would you want it to do?

Can you please give an example?

For now I’d like to create a button to hide all tracks which I have set to option+Control+H according to my metagrid setup.

I’d also like to create track visibility to show hide specific instrument groups in my template and have it to toggle view so I can see when I selected violins and say the flute folder.

Long post.

Adding a push button

  1. Add a button in O-S-C (right click / + Add widget / Basics / button).
    With the button selected, in the inspector, go to button/mode. Choose push.
  2. Depending on the complexity of what you want the button to do, you will use either the scripting property, or the osc property (located in the inspector).

    Both properties allow you to send midi/osc messages.

Configuring the button to send a MIDI message (ch. 1, note 1, velocity 127)

Using the osc property

Set the properties as in the following screenshot.
Note: you need to replace "MIDIRemote" with the name of your port. Also, you need to make sure that O-S-C knows about the port. In the configuration form of O-S-C, in the midi field/box you need to enter:
(if your port is named "MIDIRemote")

Using the scripting property

With the button selected, in the inspector, go to scripting. Then, inside the onValue box, paste the following code. Don't forget to replace "MIDIRemote" with your port name.

if (value === 1) {
  send("midi:MIDIRemote", "/note", 1, 1, 127)

When you press the button, its value changes to 1, and when you release it, to 0. If I wouldn't have included the if statement in the script, the MIDI message would've been sent twice (at button press and at button release).

The onValue box should look like this:


So this is the first step (to create the buttons in O-S-C).
The second step is telling Cubase to which MIDI messages should it respond (continue to read).

I couldn't find the "Hide All Tracks" command, so I've created a PLE (Project Logical Editor) preset (to use in the instructions below). I named it hAllTracksPLE.

Here I go with the instructions:

There are two ways in which you can link a command in Cubase to a button that you created in O-S-C: (A) through Generic Remote or (B) through MIDI Remote.

A. Linking commands to MIDI messages through Generic Remote

(A.1) Make sure no other entries are present in the Generic Remote.

Button to repeatedly press in order to delete all entries.


(A.2) Set the input port of the Generic Remote to the port you created with loopMIDI (the port that you'll be using for custom made O-S-C buttons).
Note: I don't recommend that you also set the output port. Leave that to "Not Connected".
If though, you're a fan of headaches, you can ignore me. Who am I to stop you from having headaches?


(A.3) Notice that there are two "Add" buttons (in Generic Remote). Press the first one in order to create an entry. Create as many entries as need. If you have 5 buttons in O-S-C, create 5 entries.

The rules to keep in mind when linking MIDI messages (top list) to Cubase commands (bottom list) are as follows:
∆ Make sure that you don't name several entries the same. Each entry should have its own name. Doing otherwise, would make you lose the entries you created upon Cubase restart.
∆ Keep track of what MIDI messages you've used. This will take you further away from the headache neighborhood (assuming you don't want to live there).

Table example. To keep track of what MIDI messages you've used.

When you edit the buttons/widgets in O-S-C, you can consult this table and know right off the bat what MIDI messages you can use. This would be rule no. 3:
∆ Always create the buttons in O-S-C first!


(A.4) Do the following:
◊ Select the first entry in the top area/box/section
◊ Activate the "Learn" option
◊ Press the buttons in O-S-C one by one (notice how each entry gets automatically configured with each press)
◊ Deactivate the "Learn" option (very important! you're not a fan of headaches, are you?)
◊ Name the entries (if you haven't already done so)


(A.5) In the second entry list you need to navigate to the commands that you need them assigned to O-S-C buttons. Notice that, similar to the first entry list, the second entry list also has multiple columns. You use these columns to navigate to different things that you need to control in Cubase.
The columns are named:
[Control Name] __ [Device] __ [Channel/Category] __ [Value/Action] __ [Flags]

Where to click

Starting with "Not Assigned"...



That's it..

B. Linking commands to MIDI messages through MIDI Remote
(B.1) Open the lower zone.


(B.2) Click on MIDI Remote

(B.3) Add a new surface.

(B.4) In the screen that opened fill the properties according to the following, then press "Create MIDI Controller Surface":

Vendor > + Add Vendor > Batman Industry (or whataver...)
Model > Batmobile (or whatever...)
Script Creator > Bruce (or your nickname...)

Input port > a port you created (with loopMIDI) for MIDI Remote
Output port > same port as above


(B.5) Select "button", then press the O-S-C button (or buttons).



(B.6) Open the mapping assistant.

(B.7) When the mapping assistant is open, press the O-S-C button that you'd like assign to a Cubase command. Pressing the O-S-C button wil select the corresponding button in the Cubase surface.

(B.8) Now search for the wanted command/function in the right zone of the window. If the right zone is not open, click the button situated in the top right corner of the window. When you find it, double click it.

That's it.

You need to create PLE presets and map them to different O-S-C buttons. If you have a specific question, I'm willing to help.

Thank you so much for the detailed response. I got it working thanks to your help.

Much appreciated

If you have any other questions, I am here to help. Good luck!

1 Like

This thread or post should be a sticky! I've lost count of the number of times I've been asked "how do I get a button to control Cubase?"... I don't mind of course answering but would be quicker to post a link to these instructions!

1 Like

I can only imagine. Now I gotta find a thread that clearly explains how to add picture to buttons. Amazing what OSC can do. But seems like I’ve done no music creation lately either

Put your images in a sub folder with your session file and then stick this in the CSS box of the button widget and that should work for you:

background-size: cover;

Really? The base 64 nonsense is gone?