No internet connection
  1. Home
  2. How to

Select Group on VCA Track?

By Jon Shamieh @Jon_Shamieh
    2020-01-04 19:52:28.407Z

    Is there a way to select a group on a VCA track?

    I want to set that VCA to control the new Group I create.

    Solved in post #2, click to view
    • 12 replies

    There are 12 replies. Estimated reading time: 11 minutes

    1. Looks cool Jon!

      Yes you can do it, but you'll need a script for it:

      sf.ui.proTools.selectedTrack.groups.whoseTitle.is('VCA IO').first.buttons.whoseTitle.startsWith('Group Assignment selector').first.popupMenuSelect({
          menuPath: ['*- MX Stems 1'],
          useWildcards: true
      });
      

      To use this together with your macro steps, you'd have to convert each of your macro steps to script (click the three small dots in the top right corner of each action).

      Reply2 LikesSolution
      1. JJon Shamieh @Jon_Shamieh
          2020-01-04 20:15:02.929Z

          Gotcha. What's the best workflow to convert Macro Steps to Script? I can copy it as java... then what? Can I use Execute JXA macro and just past for each one and then deactivate the macro to keep it all in the same place? Or is there easier more elegant way? Should I create a new script and copy paste each one after each other? Do I just use spaces in between? Sorry, very new to scripts..

          1. Right now the only workflow is to create a new script in SoundFlow and then paste each action in there one by one.
            We'll hopefully allow embedded scripts inside macros some time soon though, but Execute JXA action is not related to this at all so can't be used for this purpose.

            1. And yes - just put each pasted thing on each their own line, following each other.

              1. JJon Shamieh @Jon_Shamieh
                  2020-01-04 20:29:41.353Z

                  Can I build it in a text / script editor first then paste all at once?

                  1. Yes :)

                    1. You can also have more than one SF window open at the same time (Window -> New Window in the menu).
                      Be aware that TextEdit is not a good choice for copy/pasting script code since it autoconverts quotes to different characters that aren't valid in scripting.
                      We recommend VSCode which is open source and free.

                      1. JJon Shamieh @Jon_Shamieh
                          2020-01-04 20:45:38.316Z

                          Ah new window! I've been tabbing like a maniac this whole time! :)

              2. In reply tochrscheuer:
                GGabriel Lundh @Gabriel_Lundh
                  2021-01-24 16:38:31.278Z2021-01-24 19:27:25.751Z

                  Hi @chrscheuer !
                  I am using this script as a part of a longer much longer sorting script. It works like a charm for some time, but it seems to get stuck after the script has run for a while.
                  Is it possible for you to take a look and see if I'm missing something here? Do I need to reset the chache in the script or something like that?

                  This is a video link where you can see the script in action until it breaks in the end - trying to assign the GTRVCA to the GTRGRP:
                  https://vimeo.com/504091072/e1d650c7dd

                  And here is the first part of the script, until it breaks (the rest is alike)

                  Do you have any idea what could be my problem?

                  Thank you!!

                  sf.ui.proTools.appActivate();
                  
                  // Set Transport Controls
                  
                  sf.soundflow.runCommand({
                      commandId: 'user:ckf5ufmkx0001hs10awq5qn8d:ckdti4p7g000ejw10bhbap4t4',
                      props: {
                          universe: "Disable",
                          clipEffects: "Disable",
                          trackList: "Enable",
                          clipList: "Disable",
                          mIDIEditor: "Disable",
                          mIDIInputDisplay: "Disable",
                          zoomControls: "Disable",
                          transport: "Enable",
                          mIDIControls: "Enable",
                          synchronization: "Enable",
                          abletonLink: "Disable",
                          outputMeters: "Enable",
                          expandedTransport: "Enable",
                      }
                  });
                  
                  // Set Edit Window View
                  sf.soundflow.runCommand({
                      commandId: 'package:ckhqsnlyq000c29106dfhgwjq',
                      props: {
                          viewComments: "Disable",
                          viewMicPreamps: "Disable",
                          viewInstruments: "Disable",
                          viewInsertsAE: "Enable",
                          viewInsertsFJ: "Enable",
                          viewSendsAE: "Enable",
                          viewSendsFJ: "Enable",
                          viewIO: "Enable",
                          viewObject: "Enable",
                          viewRealTimeProperties: "Disable",
                          viewTrackColor: "Enable",
                          trackNumber: "Disable",
                      }
                  });
                  
                  // Drums sorting
                  let namesToSelect = sf.ui.proTools.trackNames.filter(n => n.startsWith('DR_'));
                  sf.ui.proTools.trackSelectByName({
                      names: namesToSelect,
                  });
                  
                  if (namesToSelect.length > 0) {
                      sf.ui.proTools.colorsSelect({
                          colorNumber: 8,
                      });
                      
                      sf.soundflow.runCommand({
                      commandId: 'user:ckhtp21v40000w510c45vabx9:ckf4cv3ei000oy410dgixx1tu',
                      props: {
                          groupName: "DRMGRP",
                          groupNumber: "4",
                          letter: "a",
                          createVCA: false,
                      }
                      });
                  
                  
                      sf.soundflow.runCommand({
                      commandId: 'package:ckk9qkdc80007qx10yyebxx8w',
                      props: {}
                      });
                  
                      sf.ui.proTools.trackGetByName({ name: "DRMSVCA", makeVisible: true }).track.trackScrollToView();
                  
                      sf.ui.proTools.selectedTrack.groups.whoseTitle.is('VCA IO').first.buttons.whoseTitle.startsWith('Group Assignment selector').first.popupMenuSelect({
                      menuPath: ['4a - DRMGRP'],
                      useWildcards: true,
                      timeout: 10000,
                      });
                  
                  } else {
                      sf.ui.proTools.trackSelectByName({
                      names: ["DRMSVCA"],
                      });
                  
                  
                      sf.ui.proTools.trackHideAndMakeInactiveSelected();
                      
                      
                      
                  }
                  
                  
                  
                  // Bas Sorting
                  let namesToSelect = sf.ui.proTools.trackNames.filter(n => n.startsWith('BAS_'));
                  sf.ui.proTools.trackSelectByName({
                      names: namesToSelect,
                  });
                  
                  if (namesToSelect.length > 0) {
                      sf.ui.proTools.colorsSelect({
                          colorNumber: 14,
                      });
                      
                       sf.soundflow.runCommand({
                      commandId: 'user:ckhtp21v40000w510c45vabx9:ckf4cv3ei000oy410dgixx1tu',
                      props: {
                          groupName: "BASSGRP",
                          groupNumber: "4",
                          letter: "b",
                          createVCA: false,
                      }
                      });
                  
                  
                  
                      sf.soundflow.runCommand({
                      commandId: 'package:ckk9qmjek0008qx10sw6h5obd',
                      props: {}
                      });
                  
                      sf.ui.proTools.trackGetByName({ name: "BASSVCA", makeVisible: true }).track.trackScrollToView();
                  
                      sf.ui.proTools.selectedTrack.groups.whoseTitle.is('VCA IO').first.buttons.whoseTitle.startsWith('Group Assignment selector').first.popupMenuSelect({
                      menuPath: ['4b - BASSGRP'],
                      useWildcards: true,
                      timeout: 10000,
                      });
                  
                  } else {
                      sf.ui.proTools.trackSelectByName({
                      names: ["BASSVCA"],
                      });
                      
                      sf.ui.proTools.trackHideAndMakeInactiveSelected();
                      
                  
                  }
                  
                  
                  // GTR Sorting
                  let namesToSelect = sf.ui.proTools.trackNames.filter(n => n.startsWith('GTR_'));
                  sf.ui.proTools.trackSelectByName({
                      names: namesToSelect,   
                  });
                  if (namesToSelect.length > 0) {
                      sf.ui.proTools.colorsSelect({
                          colorBrightness: "Medium",
                          colorNumber: 1,
                      });
                  
                        sf.soundflow.runCommand({
                      commandId: 'user:ckhtp21v40000w510c45vabx9:ckf4cv3ei000oy410dgixx1tu',
                      props: {
                          groupName: "GTRGRP",
                          groupNumber: "4",
                          letter: "c",
                          createVCA: false,
                      }
                      });
                  
                      sf.soundflow.runCommand({
                      commandId: 'package:ckk9qpafl0009qx10hin7xnxf',
                      props: {}
                      });
                  
                      sf.ui.proTools.trackGetByName({ name: "GTRVCA", makeVisible: true }).track.trackScrollToView();
                  
                      sf.ui.proTools.selectedTrack.groups.whoseTitle.is('VCA IO').first.buttons.whoseTitle.startsWith('Group Assignment selector').first.popupMenuSelect({
                      menuPath: ['4c - GTRGRP'],
                      useWildcards: true,
                      timeout: 10000,
                      });
                  
                  } else {
                      sf.ui.proTools.trackSelectByName({
                      names: ["GTRVCA"],
                      });
                  
                      sf.ui.proTools.trackHideAndMakeInactiveSelected();
                      
                  
                  }
                  
                  
                  ```
                  1. GGabriel Lundh @Gabriel_Lundh
                      2021-01-24 16:45:10.999Z

                      When it breaks, the log says:
                      "Could not open popup menu (MASTER TEMPLATE SORTING V.100: Line 169)
                      Popup menu was not found
                      Popup window was not found after waiting 10000 ms"

                      Just to be clear, I tried adding extra timeout time to all these instances to see if it made the script not break.

                      Thank you again!

                      1. Hi Gabriel,

                        Can I get you to open this as a separate thread? It looks like something that'll need further debate, so it's not a good idea to append it to this already closed thread :)

                        1. GGabriel Lundh @Gabriel_Lundh
                            2021-01-25 13:07:52.985Z

                            Of course! Sorry!

                            I will do it right away!