No internet connection
  1. Home
  2. How to

How to Toggle Inserts in Cubase

By Steve @stevef
    2019-11-15 18:33:52.742Z2019-11-15 18:40:05.193Z

    Asked by @Anthony_Sabatino over on Facebook.

    Hey Folks, is there a way to use soundflow (or any other supplemental applications) to open a specific insert within Cubase without using any sort of point and click commands?

    For example I could create a command to open/select insert 1, 2, 3 etc?

    Solved in post #2, click to view
    • 9 replies
    1. S
      Steve @stevef
        2019-11-15 18:45:33.233Z2019-11-15 18:50:19.078Z

        I currently have scripts to toggle the inserts in slots 1, 2 & 3, but you can do more. The script is one I have been using for quite a while, so there may possibly be other ways to do it, but this works for me.

        Here's the script:

        var isclosed = false
        sf.ui.cubase.appActivateMainWindow();
        if (!sf.ui.cubase.windows.whoseTitle.startsWith('Channel Settings').exists) { 
            sf.keyboard.press({ keys: 'e' });
            isclosed = true
            }
        sf.ui.cubase.windows.whoseTitle.startsWith('Channel Settings').first.elementRaise()
        var keyEditorWin = sf.ui.cubase.windows.whoseTitle.startsWith('Channel Settings').first;
        keyEditorWin.mouseClickElement({ relativePosition: { x: 100, y: 105 } })
        sf.wait({ intervalMs: 250 });
        if (isclosed) sf.keyboard.press({ keys: 'e' });
        

        It assumes your shortcut for opening the Channel settings window is 'e' - if not, change - keys: 'e' - for whatever your shottcut is (it appears twice).

        This will toggle the insert in slot 1, and also will leave the Channel Setting window open if it already was, or close it if it wasn't.

        For slot 2, change {x:100, y:105} to {x:100, y:135} and for slot 3 to {x:100, y:160}.

        For other channels change y to where the mouse would click - easiest way to do this, is to do a Mac screenshot where you drag to select the screenshot, and look at the co-ordintates. Look at the y figure when your mouse is over slot 4, 5, 6 etc.

        I have these setup to shortcuts ctrl+1, ctrl+2 and ctrl+3, but you can of course use anything you want!

        ReplySolution
        1. AAnthony Sabatino @Anthony_Sabatino
            2019-11-15 18:49:26.767Z

            Awesome thank you!

            1. SSteve @stevef
                2019-11-15 18:51:06.485Z

                @Anthony_Sabatino No problem. As you'll read on the Facebook post, Jesper says he has a package that can be installed to do this as well. He'll post it later.

              • In reply tostevef:

                Thank you @stevef
                I just reformatted your post - click the edit button to see how I did it :)
                Basically instead of using a backtick on each line, you add a line before and after your code with 3 backticks.

                1. SSteve @stevef
                    2019-11-15 18:52:52.845Z

                    :) I was actually going to ask how you do it properly! I was just using the </> on each line! Thank you!

                    1. Haha yea we need a better button for this ;)

                2. A
                  In reply tostevef:
                  Anthony Sabatino @Anthony_Sabatino
                    2019-11-15 20:03:57.077Z

                    So my key command for channel settings is Option+Command+E. What is the proper syntax for writing that in the script?

                    Also is it possible to have it set specific outputs as well?

                    1. SSteve @stevef
                        2019-11-15 20:09:34.637Z

                        I believe it would be keys: 'alt+cmd+e'

                        As for the specific outputs, I am sure that would be possible, but not something I currently have a scripts for (it would be a little more involved due to needing to get names of outputs). I would suggest you start a new question for that, and I am sure Christian or Jesper will help you out. You can never ask them too many questions, they will always be happy to help!

                      • In reply tostevef:

                        Another way to do this is using Generic Remote.
                        I've uploaded it in the Store and made a walkthrough video.
                        It's the package called Cubase Plugins Functions.

                        https://soundflow.org/store/cubase-plugins-functions

                        Best