How to trigger a macro by status of Cubase/Nuendo Pro?

Hi everyone
I'ld like a macro to be triggered by the the different status of Cubase or Nuendo Pro, will say: the macro should automatically trigger, when the DAW goes in stop, play and record mode. Is it possible to "read out" this status from the DAW and if yes, does anyone have a hint on how to do this?
Thanks for your help, Thomas

Some apps have a log file of their actions, for example, the KM Engine has a log file, and every macro that's triggered gets a line of text added to that log file. If your apps do the same thing, then it should be fairly easy.

Some apps start sub-processes when they perform a significant action. For example, some apps will start a sub-process when they "play" a file. I can (and do) use this technique to detect what an app is doing. You should open a Terminal window and run "ps -ax" when your app is in different modes. If you can spot a difference in the running apps, then it should also be easy to solve this.

Most solutions to this kind of problem don't involve "triggers". Most solutions to problems like this require KM to run in an infinite loop checking for something, perhaps a file check, or a screen check. But loops can be harmless, and I don't find that they drag my CPU down.

I haven't used either of those applications in a long time, so I don't know whether this will work in practice, but here's my suggestion...

Rather than using those transport modes to trigger your macro, use your macro to trigger those transport modes.

Whether this will be sufficiently practical in use depends on what options you have to trigger stop, play and record. I can think of many possibilities that the music applications might offer, but if nothing else, there will be transport buttons, so KM should be able to press those for you.

This approach would of course mean slight differences in how you work with those DAWs, and you might not find the changes acceptable. It depends on how you currently trigger playback etc., for a start. For instance, if you are used to pressing "play" with the space key, pressing a hotkey to activate a macro so that play starts and your macro does what you need it to, might not seem a big change, whereas if you are used to pressing a play button with the mouse pointer, an acceptable solution might be too fiddly to be worthwhile.

Anyway, you will get the basic idea, but whether you could implement it in a way you like depends on various factors.

What is it that you'd like to happen when the playback/record state changes?

I may be wrong, but given Ableton's ubiquity in live scenarios, I wouldn't be surprised if everything you do in it could output a midi message that could be used as a trigger in KM.

Basically I'ld like to trigger a recording light in another room of the building. I use a Shelly RGBW bulb that should receive apple scripts switching it on and off with different colours via WiFi such as

do shell script "curl 'http://10.0.0.244/color/0?turn=on&red=255&green=0&blue=0'"

which works absolutely fine out of KM. Now I try to make Cubase send out midi messages on each status stop, play and record that should be received by KM as midi triggers. But I can't find a way to address KM as destination. It's of course basically a Cubase "problem", since the KM part works fine, but maybe someone has a hint on how to set this up correctly. I'll try to find a solution on the Cubase forum as well, of course :wink:

You don't necessarily need to. Try setting up a new midi trigger, set to listen to any channel and any device, and it should capture the midi output from your DAW.

I would also echo @kevinb's thoughts about adding your light changes as part of a macro that also handles your playback state changes. This is easy if you use hotkeys to change state; a little trickier if you use the mouse, but not impossible. I've set up something similar in the past for a Cubase user that detects what's under the mouse using a screenshot of its surrounding area. It's surprisingly snappy and reliable, although this route wouldn't be preferable to midi triggers if you can get that going.

1 Like

thanks for your help, yes you're right: I've followed @kevinb's advice and could implement some light changes into the macros themselves, i.e. for "record". However, the play and stop status in Cubase is triggered by only one key(space), so it's a toggle, which makes it difficult without reading out the current status. But let's see what the Cubase folks say... So far it looks already much better than this morning :wink:

Press play and have a look in your menus. Are any menu items greyed out while Cubase is playing? In Logic, I can determine whether playback is active or not by testing the enabled/disabled condition of the Plug-in manager... menu item, which is only enabled when playback is stopped.

1 Like

You can use keypad 0 to stop, and Enter to play.

What happens to the Transport menu items "Start", "Stop", and "Start/Stop" when you use the spacebar toggle? Could you use those to determine state?

1 Like