Use Quickeys/Keyboard Maestro/Autohotkey to enhance Cubase


Great!

BTW AutoHotkey is open source.


Yeah, you mean DIY…

Funny you should mention it - I’ve harnessed Keyboard Maestro to do some pretty in-depth macros in Pro Tools and Cubase for what I consider to be missing functionality. Where there’s a need, fill it, I say.

Here’s a few things I’ve wrangled Keyboard Maestro to do:

  • Using an X-Keys button bank that trigger custom Logical Editors to normalize MIDI event velocities
  • Set up a custom key command to open the last-opened project file (like Pro Tools’ Shift+Cmd+O)
  • To automatically give the Search field focus in the New Track From Preset window as soon as the window appears (I use a custom library of instrument track presets to build projects rapidly and it’s irritating that focus is not defaulted to the search field - are you listening, Steinberg?)
  • Whenever the MIDI Key Editor window appears, automatically run the command to show all used CC automation lanes (again, irritating that there is not an option in Cubase to make this happen automatically)
  • Last but not least: a very convoluted macro that I use to archive projects which:
  • Analyzes the project window title and uses a regular expression to deduce the project name
    • Removes empty tracks
    • Adjusts window positions and conforms the workspace
    • Selects Back up Project
    • Uses keystrokes as well as the project name to select the destination folder to backup to

Takes time to set things up and debug the macros, but pays off in the long run!

Exactly. This started for me because I wanted to have the Listen and Mute functions in the Score Editor.

Now I have “partial solo mode” like Digital Performer, and consequentially, key commands to select tracks directly.

Using Keyboard Maestro, here are a missing functions I “added” to Cubase

  • a Suspend Snap function that does not interfere with with Tool Modifiers
  • “Find Next” in the Key Commands window
  • Activate Midi Input in Key and Score Edit only while key (or pedal) is held down
  • Same for step entry
  • nudge cursor right/left by quantize value in Score Edit
  • Key commands to scroll horizontally in Score edit view

Keyboard Maestro cannot see palettes such as Score Settings and other Score Edit windows, and in Cubase, key commands open them, but don’t close them if they don’t have focus, and, there’s no way to give them focus except by clicking on them.

So I use Quickeys for that type of thing.

Makes Cubase much less “clicky”.

good stuff!

i use autohotkeys for quite a few things in cubendo/windows, including:
– a macro that enables two separate key-commands for snap on, and snap off. so that ‘snap’ stops working in ‘toggle mode’ and you can always be sure that if you press the ‘snap on’ keycommand, snap will always be on, and you can edit fast without having to double-check whether the snap-icon is currently lit up (on), or off. took quite a while and it’s doing this in a very simplistic way by sampling the colour of pixels where the snap button is supposed to be (the location of the button is different based on whether you are in the arrange, key editor, sample editor, and audio part editor).

– pro-tools style trim automation. it’s an advanced version of a cubase native macro i posted a while ago on the forum. takes whatever automation curve resides inside the selected range, creates arbitrary automation events on either side of the range, and selects it for editing / scaling.

any actual ahk code for your enhancements is very welcome btw.

Yeah. AutoHotkeys is great because you can just go in and type the command you want, and bypass all the UI stuff. In fact I was checking out switching to Windows just so I could to use it, but I could never figure out how to get midi includes to work with it…

Mac has Applescript but it is not as sleek, and much more verbose.

Anyhow, here’s my applescript for launching Cubase to a recent files dialog (not the Hub) or automagically opening last saved project: [Mac] applescript to restore open Recent/Last Project

You can launch Cubase to that no-frills recent files dialog by holding down ctrl/command while cubase starts on both platforms.

Documentation is so light, everything’s an Easter Egg. :wink:

1 Like

Sorry to hear that Rhino… Hope you get it sorted down the line.

In other (Mac) news, here’s an applescript to launch the last saved project. You load it into Keyboard Maestro, or use Applescript Editor to make it into a double-clickable app.

if application "Cubase 7" is running then
	tell application "Cubase 7"
		activate --bring cubase to front if it's running already, then exit script.
	end tell
else
	tell application "Cubase 7" to launch
	tell application "System Events"
		key down command --press command key
		set timer to 1 --to permit script to timeout gracefully
		repeat
			delay 1 --wait 1 second
			if (window 1 of process "Cubase 7" exists) then
				exit repeat
			end if
			set timer to timer + 1 --increment timer value
			if timer > 10 then --script will release command key after 90 seconds in case Cubase couldn't launch or something else goes wrong You can adjust this value to suit. My system has an SSD, Cubase launches in about 8 seconds.
				exit repeat
			end if
		end repeat
		key up command --release command key
		tell application "Cubase 7"
			activate --bring cubase to front
		end tell
		keystroke return
	end tell
end if

edit: (and this is assuming Cubase is not already running…)

This is the way I get Cubase to load the most recent project. It’s assuming that Cubase is already running.

Create a macro in Keyboard Maestro, add Execute AppleScript event, and fill in this code:

tell application "System Events"
	tell application process "Cubase"
		click menu item 1 of menu "Recent Projects" of menu item "Recent Projects" of menu "File" of menu bar item "File" of menu bar 1
	end tell
end tell

You can then assign it a global keyboard shortcut. I assign it Cmd+Shift+O which is Pro Tool’s open recent command.

I’d never come across AutoHotKey - it’s very useful, thanks, Steve! :smiley:

Here’s what I’ve done with it so far:

;>>>>>>>>>>> Cubase macros and key commands: <<<<<<<<<<
;<><><><><><><><><><><><><><><><><><><><><><><><><><><>

;<><><><> Functions to check for and change conditions <><><><>

focusCubase(inputKey) ;Checks if Cubase is running and brings to front.  Passes key command and exits if Cubase not found.
{
IfWinExist Cubase 7
	WinActivate
else
	{
	send %inputKey%
	exit
	}
}

focusProjectWindow() ;Brings Project Window to front.
{
IfWinExist, Cubase 7
	WinActivate
else
	return
}

focusMixer() ;Checks if Mix Console is open (opens it if not) and brings to front.
{
IfWinExist, MixConsole
	WinActivate
else
	{
	send {F3}
	WinActivate
	;msgBox Opened mixer for you
	return
	}
}

focusKeyEditor() ;Checks if Key Editor is is open (opens it if not) and brings to front.
{
IfWinExist, Cubase, Key
	{
	ControlFocus, Key, Cubase
   	;MsgBox Key Editor already open. I've brought it to the front for you.
	return
	}
else
	{
	send ^e
	ControlFocus, Key, Cubase
	;MsgBox Opened the key editor for you
	return
	}
}

;<><><><> Key commands <><><><>

; >>>>>>> Search for track in Project Window (ctrl+F)<<<<<<<<
$^f::	
inputKey = ^f
focusCubase(inputKey)
focusProjectWindow()
send %inputKey%
return

; >>>>>>> Search for channel in Mix Console (ctrl+alt+F)<<<<<<<<
$^!f::
inputKey = ^!f
focusCubase(inputKey)
focusMixer()
send ^f
;send {#}{space}
;I use the above line because I have all my VSTi outputs named with the "# " prefix to filter out all the other channels when I search - remove the semi-colon if you like this.
return

; >>>>>>> Open channel editor (alt+E)<<<<<<<<
$!e::
inputKey = !e
focusCubase(inputKey)
focusMixer()
send %inputKey%
return

; >>>>>>> Open VI editor (V)<<<<<<<<
$v::
inputKey = v
focusCubase(inputKey)
focusProjectWindow()
send %inputKey%
return

; >>>>>>> Open Key editor (ctrl+E)<<<<<<<<
$^E::
inputKey = ^E
focusCubase(inputKey)
focusProjectWindow()
focusKeyEditor()
return

Hope it’s of some use or gives some ideas to others.

I’ve been using Keyboard maestro with and X-Keys controller for a while. It greatly enhances work flow. Glad you started this thread!

-Rich

Nice addition. If you write others do share! Maybe include a description for those who aren’t (yet) fluent in codespeak…

Those look really solidly built.

In the spirit, here are a couple Keyboard Maestro macros that enable horizontal scrolling in Score Edit view via keyboard commands (or any other trigger KM can use)

You can get a demo of it at keyboardmaestro.com.

Unzip these files and import them in KM.
Scroll Score Right.kmmacros.zip (1.29 KB)
Scroll Score left.kmmacros.zip (1.29 KB)

I’ve made some improvements (changed the code block in my post above) and also commented what I’ve done better. I’ve set it up now so that the first thing that happens with any AutoHotKeys keycommand in the script is that it checks if Cubase is open and brings it to the front if it is. If Cubase isn’t running it passes the key stroke through with no action - so that key commands in other programs will do what you expect if Cubase isn’t running.

I have got separate functions for “focus project window”, “focus (or open) the mixer” and "focus (or open) the key editor so that others can easily use those as part of other macros. Hope it’s useful. BTW, I’m in no way a proper coder so what I’ve done may not be very elegant… but it does seem to work fine.

Posted By AndrewW in the thread about Pro Tools style automation trim (thanks lukasbrooklyn and Winter Rat) cubase ninja - pro tools-style trim automation macro - #37 by Tompa - Cubase - Steinberg Forums

nice!

what does the ‘$’-sign mean in the hotkey definition btw? (as in, $!e::)

thank you.

Thanks Steve, this is one of those things that never really bothered me but glad to see working better now that I see the light. This of course no longer lets the mix window toggle which is fine since command+w closes it quickly when you want it closed. It makes sense the Project window does work right because you always have to have it open unlike the Mix window, so hence the toggle state when you press the shortcut.

Where in the key commands have you assigned it to a shortcut? I know it is in the Windows Menu but it doesn’t show up in the key commands list under windows or any other place I can find.

Related it would be so helpful to have multiple project windows open so you can be in different locations for editing, this is so helpful in Logic and even better in Pyramix with an integrated window. Maybe you have found a magical way to make that happen :exclamation:

I would love to look and any and all Cubase shortcuts you have in QuicKeys as I use that all the time.

Project>Bring to Front

I mainly use Keyboard Meastro, and just use Quickeys (which I bought years and years ago) for certain window switching stuff, since Maestro can’t see Always-on-Top windows and palettes.

Here’s one I use to make the Mixconsole open if it’s closed, or to bring it to front if it’s open, rather than the simple toggle that’s native to Cubase.

The other Quickeys macros I have only work in conjunction with Keyboard Maestro.

Great thanks Project:Bring to Front very helpful no more cmd+` through windows.

Thanks for the quicKeys script, looks like the first one you posted with future proofing of Cubase 8 (unless you have a beta). What does cmd+option+a do for you in the shortcut? For me that selects all tracks (not aware of a default in Cubase for this).