Cubase Midi record Mode
Hi,
Is there a way to assign a button to each of the 3 midi record modes in Cubase ?
I tried a menu macro but the transport menu is changing when you change record mode so it's not working ..
The click UI element on the midi icon at the bottom left of the main window doesn't work either ... can't pick the element ...
any help welcome ..
Ølaf
- In reply toolafnoise⬆:Christian Scheuer @chrscheuer2021-04-03 06:22:09.733Z
Hi Olaf,
It's possible to query UI menus for their names in a script, in the event where you don't know the full name of the menu item in advance.
You may also be able to just use the Loose Match option.To help you, we'd need to know the exact menu items you want to click - please share screenshots and examples.
- Oolafnoise @olafnoise
Hi Christian and thank you for your reply
Here is the first way to change MIDI record mode. But as you can see the menu "Transport" is changing according to the chosen mode ...
Now here is the second way with the MIDI icon at the bottom left of the main window.
But I can't pick the UI element
Thanks in advance
Ølaf
Christian Scheuer @chrscheuer2021-04-03 14:14:25.286Z
Thanks, Ølaf.
I don't have Cubase on this computer, but try this:
function cycleCubaseMenu({ parentMenuName, menuPrefix }) { var parentMenuItem = sf.ui.cubase.getMenuItem(parentMenuName).children.first.children.find(c => c.title.value.startsWith(menuPrefix)); if (!parentMenuItem) throw `Couldn't find "${parentMenuName}" -> "${menuPrefix}" menu`; var modeButtons = parentMenuItem.children.first.children; var checkedIndex = modeButtons.findIndex(c => c.isMenuChecked); checkedIndex++; if (checkedIndex >= modeButtons.length) checkedIndex = 0; modeButtons.allItems[checkedIndex].elementClick(); } cycleCubaseMenu({ parentMenuName: 'Transport', menuPrefix: 'MIDI Record Mode:', });
Christian Scheuer @chrscheuer2021-04-03 14:18:31.509Z
Note that the code I showed above would cycle through all 4 elements in the submenu.
Here's another version with a filter function that can ensure you don't cycle through the last item:
function cycleMenu({ app, parentMenuName, menuPrefix, filter }) { var parentMenuItem = app.getMenuItem(parentMenuName).children.first.children.find(c => c.title.value.startsWith(menuPrefix)); if (!parentMenuItem) throw `Couldn't find "${parentMenuName}" -> "${menuPrefix}" menu`; var modeButtons = parentMenuItem.children.first.children.allItems.filter(filter ? filter : () => true); var checkedIndex = modeButtons.findIndex(c => c.isMenuChecked); checkedIndex++; if (checkedIndex >= modeButtons.length) checkedIndex = 0; modeButtons[checkedIndex].elementClick(); } cycleMenu({ app: sf.ui.cubase, parentMenuName: 'Transport', menuPrefix: 'MIDI Record Mode:', filter: mi => mi.role === 'AXMenuItem' && !mi.title.value.startsWith('Auto'), });
- OIn reply toolafnoise⬆:olafnoise @olafnoise
Thanks Christian
Unfortunately, the script doesn't have any effect.
here's the log
03.04.2021 17:01:04.43 [Backend]: #StreamDeck: KeyDown (4,3) -> gu cubase rec mode 2
Validating command... user:default:ckn1tn5pr0001xe10koy2g3kw
Invoking command...user:default:ckn1tn5pr0001xe10koy2g3kw03.04.2021 17:01:04.43 [Backend]: >> Command: gu cubase rec mode 2 [user:default:ckn1tn5pr0001xe10koy2g3kw]
But actually, i haven't been clear enough.
There is a built in command in Cubase to cycle between the midi rec modes
But there is nothing in the display that indicates in what mode you are.
What i tried to do is to have 3 butons on my stream deck to select the mode I want ..
That would be an inelegant but effective way to quickly know what you're going to record instead of looking in a stupid menubest
ØlafChristian Scheuer @chrscheuer2021-04-03 16:17:30.311Z
Ok. We'll need somebody who has Cubase then to help, as I mentioned I can't test it myself here :)
The above scripts works just fine with the menus I set up to test with in Finder, so I'm sure it's a small fix.- Oolafnoise @olafnoise
ok got it
thanks anyway
Hope somebody will find it ... when you see the number of posts requesting this option for years (as a shortcut)best
Ølaf