No internet connection
  1. Home
  2. How to
  3. Logic Pro

Logic Pro X: Freeze Modus

By Josh Ha @Josh_Ha
    2024-06-16 13:38:48.430Z

    Hi everybody,

    I want to switch between the two options of freeze modus in logic.
    I tried with the ui clicker, but it wasn't successful.

    What is the best way to do this?

    thanks
    Josh

    Solved in post #5, click to view
    • 6 replies
    1. Kitch Membery @Kitch2024-06-17 19:59:50.824Z

      Hi @Josh_Ha,

      I'm not sure what you mean by "freeze modus". Can you take a screenshot of the UI element you are talking about?

      Or are you just referring to the freeze button on a track?

      1. JJosh Ha @Josh_Ha
          2024-06-18 22:25:00.294Z
          1. Kitch Membery @Kitch2024-06-19 05:12:09.136Z

            Ah yes.. thanks for clarifying. :-)
            I'll see if I can rustle something up this week.

        • In reply toJosh_Ha:
          Kitch Membery @Kitch2024-06-28 00:45:22.539Z

          Thanks for your patience with this one @Josh_Ha

          Let me know if this script works for you.

          const logic = sf.ui.logic;
          logic.invalidate();
          logic.appActivate();
          const inspector = logic.mainWindow.inspector;
          const inspectorList = inspector.children.whoseRole.is("AXList").first;
          const channelPanels = inspectorList.groups;
          const trackPanel = channelPanels.find(panel => panel.children.some(child => child.value.value === "Track:"));
          const disclosureTriangle = trackPanel.childrenByFullRole("AXDisclosureTriangle").first;
          
          // Ensure the "Track:" panel is open.
          if (!disclosureTriangle.isCheckBoxChecked) {
              disclosureTriangle.elementClick();
          
              // Wait needed for panel to expand
              sf.wait({intervalMs:200});
          
              //Invalidate the "Track:" panel in case it was closed
              trackPanel.invalidate();
          }
          
          const trackPanelScrollArea = trackPanel.scrollAreas.first;
          const trackPanelTable = trackPanelScrollArea.tables.first;
          const trackPanelTableRows = trackPanelTable.childrenByFullRole("AXRow:AXTableRow");
          const freezeModeRow = trackPanelTableRows.find(row => row.children.first.value.value === "Freeze Mode:");
          const freezeModePopup = freezeModeRow.children.allItems[1];
          
          if (freezeModePopup.value.value === "Source Only") {
              freezeModePopup.popupMenuSelect({ menuPath: ["Pre Fader"] });
          } else if (freezeModePopup.value.value === "Pre Fader") {
              freezeModePopup.popupMenuSelect({ menuPath: ["Source Only"] });
          }
          

          Thanks for requesting this. When I have time I plan on turning this into a command template to control other parameters in the Track and Region panels.

          Reply1 LikeSolution
          1. JJosh Ha @Josh_Ha
              2024-07-02 20:09:08.828Z

              Thanks a lot. Works perfectly.

              I would like to learn how scripting in logic with soundflow is working.
              can you recommend a source where I can look up?

              1. Kitch Membery @Kitch2024-07-02 22:13:16.857Z

                Hi @Josh_Ha,

                Glad it worked for you. :-)

                Regarding learning how to write scripts for Logic Pro, I'd start by checking out the following links.

                Javascript Resources:
                https://soundflow.org/docs/how-to/custom-commands/javascript-resources

                Picking UI Elements:
                https://soundflow.org/docs/how-to/custom-commands/pick-ui-elements

                Discover actions through Code Completion:
                https://soundflow.org/docs/how-to/custom-commands/using-code-completion

                Writing scripts for Logic Pro can be a bit tricky sometimes so if you have any questions along the way please feel free to ask questions here in the forum. :-)