I have wished for my STREAM DECk device to be able to insert a VSTi track in Cubase for a long time now and i have finally found a solution to this challenge.
I have written a script in STREAM DECK that inserts a VSTi Instrument track in Cubase and tought I might share it here.
Downloads can be found at bottom of document
Below is a step-by-step description of how to create a new VSTi track with the instrument of your choice (at the bottom of all existing tracks) in Cubase 13.0.10 (or earlier versions of Cubase) for Microsoft Windows 11 (or 10) with one press of a button on a STREAM DECK device. The newly created track will be record enabled, so that you can play with the instrument immediately.
(Downloads available at bottom of document)
In Cubase you can assign a key to command to many functions of the program. However, there are still many input fields and menus that require the use of the mouse. The navigation buttons (arrow keys or tab key) also do not work there.
This means that certain (compound) commands cannot be “scripted” with just key commands.
Scripting “Mouse Clicks” has the disadvantage that it demands that the desired functionality (when Clicking with the mouse) must be available at the location where the mouse pointer is located (otherwise nothing happens).
To reduce the risk of a misplaced mouse click, we have limited the number of mouse movements and clicks to just 1!
NOTE: If in Cubase, the “Edit instrument” input field in the inspector of aVSTi track can be linked to a key command, the procedure below will no longer be necessary.
This is however not yet the case up to and including Cubase version 13.0.10, so the “Edit Instrument” field in the inspector (Cubase 13), which we will use below, can only be evoked by clicking on it with the mouse. However, this prevents us from being able to write a “Multi Action” script in STREAM DECK, because STREAM DECK does not support mouse event scripting.
Since STREAM DECK does not support mouse event scripting, we will have to use another program to do that for us.
In the following solution we will be using the Open Source (free) external program called AUTOHOTKEY (autohotkey. com) that will execute the mouse click at the right spot in Cubase.
In AUTOHOTKEY this mouse click action is made into an external program.
In AUTOHOTKEY we will create a script that will be converted (compiled) into an EXE file (which is the external program).
That external program will be executed as one of the steps of a Multi Action script in STREAM DECK.
NOTE: If you do NOT have a STREAM DECK device, you could also write scripts (1 per VSTi instrument) in AUTOHOTKEY that do the same as the scripts in STREAM DECK. Because memorizing many different shortcuts (1 for eachVSTi) without visual feedback (as exists with STREAM DECK) is not easy, I think this last (cheap) option (without a STREAM DECK device) might only be suitable for highly gifted people.
- First you will have to customize the layout of the Cubase User Interface (UI) to your own taste and create your own WORKSPACE.
Link a key command to your workspace (e.g. ALT+NUM1)
In any case, make sure that the layout is such that the Inspector is the leftmost part of the UI.
To do this, turn on the “LEFT ZONE” in the “Setup Windows Layout” (gear symbol on the far right in the top corner)
NOTE: Although recalling a Workspace ensures that the scaling (especially width) of the various windows is reset to that of the workspace setting, Cubase also saves some layout settings separately in every project file (including in a template file).
This means that when you load a project (whether new from a template, someone else’s or an old project of yours), many changes to the layout are also loaded back into the project.
Loading a project can therefor change your current layout.
In order for this method to work in STREAM DECK, it is important that you re-create the layout of any freshly opened project, in the exact same way as the project that you used when determining the mouse coordinates (see below) of the “Edit Instrument” field in de inspector.
Creating only a workspace is therefore a good start, but not sufficient to guarantee that a layout is completely identical.
When starting a project from scratch however, the ideal solution that tackles it all, is to (once) create a template with all the layouts correctly set up and start every new project from there.
When you open someone else’s project on the other hand and want to use STREAM DECK to add some new VSTi tracks to that project, you will have to manually set or unset some checkboxes in the “Setup Windows Layout” section, in order to re-create the intended layout.
This concerns in particular items such as:
- Status line
- Info line
that are not included in a workspace (but are included in a project) and can change the coordinates of the “Edit Instrument” field, when loading a project.
TIP / SUMMARY: In addition to a WORKSPACE, also create a TEMPLATE of an empty project (with the desired layout), so that you always have a good starting point for new projects in which STREAM DECK can trigger the creation of new VSTi instruments tracks.
Add a VST instrument track and select as VSTi “No VST Instrument”
NB. Also set the desired MIDI input (e.g. All MIDI inputs).
=> From now on, when you add an instrument track (with the assigned key command - e.g. “V”), you will get an empty VSTi track with the desired MIDI inputs connected to “No VST instrument”, by pressing V Enter.
Right-click on an empty part of the inspector and check “Expand Section Exclusively” (Only works if there is a track that is selected).
This ensures that only 1 Section is unfolded at a time. This is necessary because there is no explicit command to force a section to unfold. There is only a “toggle” (open / close) of the sections. By toggling an other section, that section will be opened or closed. If we then toggle the desired Routing Section , it is guaranteed to be opened, thanks to the “Expand Section Exclusively” setting.
When this section is opened, we can click (with the mouse) on the “Edit Instrument” field in this section, upon which the “Find instrument” dialog box is automatically opened and a VSTi instrument can be selected.
Now we will create 8 key commands in Cubase:
- In Inspector → “Open / Close Track version Section” ((e.g. CTRL+Shift+ALT+V)
- In Inspector → “Open / Close Routing Section” ((e.g. CTRL+Shift+ALT+R)
NOTE: Now you have ensured that you can always open the routing section of the Inspector in the same place on your screen AND that you are sure that it is OPEN. => By pressing Shift+CTRL+ALT+V followed by CTRL+Shift+R on the keyboard, the Routing section is always the ONLY opened (thanks to step 3).
- In Inspector → “Open / Close Routing Section” ((e.g. CTRL+Shift+ALT+R)
- Close All Plugin Windows ((e.g. CTRL+Shift+ALT+C)
- Select Track: Next((e.g. CTRL+Shift+ALT+N)
- Disable Record Of All Tracks (e.g. CTRL+Shift+ALT+U)
- Add Track: Instrument (e.g. “V”)
- Workspace 1 (ALT+NUM1) (or 2 or 3 etc…)
- Record Enable (e.g. R)
Download and install the free Open Source program AUTOHOTKEY (autohotkey. com => This supports MouseEvent Scripting .
Find out the coordinate of the “Edit Instrument” field in the Routing section of the inspector (the field that says “No VST Instrument”) and write it down somewhere (see notes below).
Included in AUTOHOTKEY, there is a utility program called “WindowsSPY”, with which you can read the mouse coordinate! This app can be started from the AUTOHOTKEY Dashboard.
IMPORTANT NOTE 1:
We will be using the WINDOW mouse coordinates and not the SCREEN coordinates! So write down the mouse coordinates that appear behind the word WINDOW whilst hovering over the field saying “No VST instrument” in Cubase.
IMPORTANT NOTE 2.
Choose a coordinate that is on the far right of the “No VST instrument” field.
This is necessary to allow the CHANNEL WINDOW to be expanded while still having the selected mouse coordinate fall INSIDE the “No VST instrument” field.
- In AUTOHOTKEY we will write a script that always moves the mouse towards this coordinate.
TIP: You can download the free editor “SciTE4AutoHotKey” which even supports code highlighting for AUTOHOTKEY scripts. From this editor you can compile directly to an EXE file with CTRL+F7. However, you can also compile an EXE file from the AUTOHOTKEY Dashboard.
You can also type the code in Notepad and save it as an .ahk file (e.g. insertVSTi.ahk).
The AUTOHOTKEY script consists (only) of the following 4 lines:
CoordMode “Mouse”, “Window”
MouseClick “Left”, 185, 345, 1, 0
You will have to replace the coordinate (the numbers 185, 345) with the coordinate you wrote down in step 6.
Run (= double-click on “insertVSTi.exe” in the explorer) the “insertVSTi.exe” program, while Cubase is open (does not have to be full-screen) to check whether the mouse has correctly clicked within the “No VST instrument” field. If this is the case, a small screen should appear at the location of the mouse cursor, asking you to enter the name of the desired VST instrument. If it doesn’t work, you might have to correct the mouse coordinate.
Now (when the mouse has been clicked in the “No VST Instrument” filed) you can enter the name of a VSTi and press ENTER → A new VSTi track with the instrument will be added.
Press R to turn on “Record Enable” on the VSTi instrument track.
Now you can play the instrument directly!
If all of the above works well, we can now start writing the STREAM DECK Multi Action (see below).
Now write a Multi Action script in STREAM DECK similar to the following:
(Unfortunately this editor does not support tables, so I have devided the columns with “|” characters)
This script can also be downloaded
STREAM DECK Multi Action script
Step | Type command | Command | Description
1 | System:Hotkey | ALT+NUM 1 | Load Workspace 1
2 | System:Hotkey | CTRL+Shift+ALT+C | Close All Plugin Windows
3 | MultiAction:Delay | 400 ms | Wait for 400 ms
4 | System:Hotkey | CTRL+Shift+ALT+N | Select Next Track (useless) or First if none was selected before (useful)
5 | System:Hotkey | END | Select last track
6 | System:Hotkey | CTRL+Shift+ALT+U | Disable record of All Tracks
7 | System:Hotkey | V | Evoke the selection of a VSTi instrument before adding a new VSTi instrument Track. Selecting “No VST instrument” (see preparations) will insert an empty VSTi Track here.
8 | System:Hotkey | RETURN | Confirm adding the VSTi track
9 | System:Hotkey | RETURN | Select the newly created VSTi track and by doing so → exit any open editors → now the Track Section of the inspector is opened guaranteed.
10 | System:Hotkey | Shift+CTRL+ALT+V | Open Track version section → This will certainly close the Routing Section.
11 | System:Hotkey | CTRL+Shift+R Open Routing Section (is what we want)
12 | System:Open file: “insertVSTi.exe” | This EXE file clicks with the mouse in the “Edit Instrument” field.
13 | MultiAction:Delay | 250 ms | Wait for 250 ms
14 | System:Text | name of VSTi | Enter the name of the VSTi in double quotes eg. “HALion”
Note: enable the checkbox: “Press Enter after message”
15 | System:Hotkey | R | Turn on Record Enable on the VSTi track
Add the above Multi Action Script to a STREAM DECk button.
To create a nice Icon for your VST instrument, launch the UI of the VST instrument in Cubase and use the snippet (partial screen capture) feature of Windows.
Note: In Windows 11, the Snippet tool is hidden under the key combination WINDOWS+SHIFT+S.
With the Snippet tool you can draw a frame around theVSTi UI.
This frame is then saved as a JPG picture in your Pictures folder. (No choices here) (C:\user<your_account_name>\Pictures\Screenshots).
Test the STREAM DECK button thoroughly in all kinds of situations.
Also test if it works in a windowed version (not full-screen) of Cubase (should work, provided WINDOW coordinates were used)
Copy this button to a next button in STREAM DECK and change the name of the VSTi instrument in step 14 of the STREAM DECK script into that of the next instrument.
IMPORTANT: Check the exact naming of the VSTi in Cubase!
Change the name / text of your button.
Do this for all VSTi that you want to place in STREAM DECK.
TIP: Use multiple pages if you run out of buttons on your STREAM DECK device.
If it does not work after loading a project, check the following:
In Setup Windows Layout (gear on the right in the top bar), always enable the following checkbox:
- Left Zone
Enable/disable the following checkboxes depending on the setting you had when determining the mouse coordinate:
- Info Line
- Status Line
- If necessary, uncheck the checkbox for “Channel”.
(Depends on your screen resolution whether this is necessary)
In any other case, you might want to check your template and your workspace settings.
Huib Schippers (Trilithon)
The file Cubase VSTi insert.zip contains a STREAM DECK profile with a single Multi Action button.
The file insertVSTi.zip contains the AutoHotKey script (4 lines) and the compiled EXE file that works for my screen resolution (5120x2160)