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!

    Solved in post #2, click to view
    • 5 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: {}
      
          });
      }
      
      Reply1 LikeSolution
      1. Hi @Chad ,
        Thank you so much for the Script template.

        I tested it and it Works Perfectly for me. Thanks so much.

        I’d love to raise a feature request:
        It would be incredibly useful if If/Then/Else logic could be implemented more easily and visually inside the Macro Editor, without requiring custom scripting. Especially for workflows like mine — where I want to trigger different plugin actions depending on which DAW is frontmost — a visual conditional block would make SoundFlow much more accessible to non-coders.

        Thanks again for your support.

        1. Chad Wahlbrink @Chad2025-07-02 14:21:21.300Z

          Hi, @Vaibhav_Vashishtha,

          Yes, I appreciate the feature request. The best way to log feature requests like this is in the "Ideas" section of the forum. That helps us keep track of feature requests in one centralized place. I agree that the macro editor could be improved to make basic logic statements like this more friendly for those who don't want to dive into code!

          I did learn today that this kind of action can be accomplished as a macro using the "If App is running" and "If App is frontmost" macro actions. The setup would look like this. Then you would repeat this action for each DAW or application, etc.

          Here's a quick video showing this version off:

          1. Chad Wahlbrink @Chad2025-07-02 14:45:26.319Z

            Hi, @Vaibhav_Vashishtha,

            I've added this feature request to the "Ideas" section of the forum for now.

            Cheers

            1. Hi @Chad ,
              Thank you so much for this macro-based solution and the demo video, this is exactly what I'm looking for — this really helped!

              I truly appreciate you adding the feature request to the "Ideas" section as well. 🙏🏼

              Thanks again for all your help!

              Best regards,
              Vaibhav