No internet connection
  1. Home
  2. How to

DAW-Specific Plugin Launch Macro (Ableton, Logic, Pro Tools) if/then else

By Vaibhav Vashishtha @Vaibhav_Vashishtha
    2025-06-22 11:27:53.273Z2025-06-23 04:42:42.752Z

    Hi
    How to create an If then Else command like

    If Ableton Live is frontmost → trigger macro A
    If Logic Pro is frontmost → trigger macro B
    If Pro Tools is frontmost → trigger macro C

    It's pretty easy to do it in Keyboard Meastro, but I can't seem to. figure out how to do it in SoundFlow.
    Can someone guide me on the correct way to do this?
    Basically what I want to achieve is to launch a plugin like pro-q on the selected track but if ableton is active and frontmost it launches the plugin in ableton but if pro tools or logic is frontmost them put the plugin in logic etc..
    Is there a better approach? pls Help..

    Thanks in advance!

    • 1 replies
    1. Chad Wahlbrink @Chad2025-06-25 15:53:39.656Z

      Hi, @Vaibhav_Vashishtha,

      Thanks for the question.

      There is currently no easy way to facilitate this as a macro, but it's relatively simple to do as a script. Feel free to share this as an idea in the "Ideas" section of the forum, though! Adding more if/then functionality to the macro editor is a great idea.

      Here's a quick walk through of how to set it up:

      And here is the code template you would use:

      /**
       * Replace the commandID for each `sf.soundflow.runCommand()` method with the command ID of the preset you wish to call. 
       * To copy the commandID, select the preset in the SoundFlow Editor and use the menu command "Command" > "Copy Command ID"
       */
      
      // For Pro Tools - Use the Command Template from Teezio's Plugin Loader on the Store
      if (sf.ui.proTools.isRunning && sf.ui.proTools.isFrontmost) {
      
          sf.soundflow.runCommand({
              commandId: 'user:xxxxxxx:xxxxxxx#xxxxxxx',
              props: {}
          });
      
      } 
      // For Logic - Use the Command Template in the Plugin Loader subfolder
      if (sf.ui.logic.isRunning && sf.ui.logic.isFrontmost) {
      
          sf.soundflow.runCommand({
              commandId: 'user:xxxxxxx:xxxxxxx#xxxxxxx',
              props: {}
          });
      
      } 
      // For Ableton - Use the Command Template in the Plug-ins subfolder 
      if (sf.ui.abletonLive.isRunning && sf.ui.abletonLive.isFrontmost) {
          
          sf.soundflow.runCommand({
              commandId: 'user:xxxxxxx:xxxxxxx#xxxxxxx',
              props: {}
      
          });
      }