No internet connection
  1. Home
  2. How to
  3. Ableton Live

Solo specific track that is not selected

By Tristan Hoogland @Tristan
    2025-06-27 19:46:49.940Z

    Hello! Slowly exploring SF x Ableton stuff, awesome work so far guys!

    After a real rudimentary one, I imagine still a bit off. Is there a way to set the solo state of a track that isn't selected in Ableton? I'm basically trying to create a toggle switch for a solo button and elementClick doesn't appear to work. I get the solo state by using intValue 0/1 so that part is good, but no success beyond that.

    i.e.

    sf.ui.abletonLive.invalidate();
    
    const soloButton = sf.ui.abletonLive.mainWindow.groups.first.groups.whoseTitle.is("Arrangement").first.groups.whoseTitle.is("TH RUFF").first.checkBoxes.whoseDescription.is("Solo/Cue").first;
    
    if (soloButton.value.invalidate().intValue === 0) {
        soloButton.elementClick()
    }
    
    Solved in post #7, click to view
    • 9 replies
    1. Kitch Membery @Kitch2025-06-27 20:16:13.398Z2025-06-27 20:39:02.780Z

      Try this @Tristan.

      The "Solo/Cue" button's role is a checkbox, so you can use the checkboxSet method to explicitly set its state.

      function setTrackSoloCueState({ trackName, soloState }) {
          const abletonLive = sf.ui.abletonLive;
          const mainWindow = abletonLive.mainWindow
      
          mainWindow.invalidate();
      
          const arrangementGroup = mainWindow.groups.first.groups.whoseTitle.is("Arrangement").first;
          const trackHeaders = arrangementGroup.groups;
          const targetTrack = trackHeaders.getByTitle(trackName);
      
          const soloQueButton = targetTrack.getFirstWithDescription("Solo/Cue");
      
          if (!soloQueButton.exists) throw `Could not find the Solo/Que button`;
      
          soloQueButton.checkboxSet({ targetValue: soloState });
      }
      
      setTrackSoloCueState({
          trackName: "TH RUFF",
          soloState: "Enable",
      });
      

      Updated as a reusable function

      1. In reply toTristan:
        Kitch Membery @Kitch2025-06-27 20:54:30.770Z

        Misread... You are after "Toggle" behavior.

        This should work.

        function setTrackSoloCueState({ trackName, soloState }) {
            const abletonLive = sf.ui.abletonLive;
            const mainWindow = abletonLive.mainWindow;
        
            mainWindow.invalidate();
        
            const arrangementGroup = mainWindow.groups.first.getFirstWithTitle("Arrangement");
            const trackHeaders = arrangementGroup.groups;
            const targetTrack = trackHeaders.getByTitle(trackName);
        
            if (!targetTrack.exists) throw `Could not find track named "${trackName}"`;
        
            const soloQueButton = targetTrack.getFirstWithDescription("Solo/Cue");
        
            if (!soloQueButton.exists) throw `Could not find the Solo/Que button`;
        
            soloQueButton.checkboxSet({ targetValue: soloState });
        }
        
        setTrackSoloCueState({
            trackName: "TH RUFF",
            soloState: "Toggle",
        });
        
        
        1. Chad Wahlbrink @Chad2025-06-27 21:55:21.336Z2025-06-27 22:09:15.754Z

          Nice one, @Kitch! @Tristan, I'm glad you are digging into the Ableton package.

          Here's a version that uses the MIDI Control Surface API and keeps the original track selection if that's helpful:

          
          // Bail out if Ableton is not running
          if (!sf.ui.abletonLive.isRunning) throw `Ableton Live is not running`;
          
          /**
           * Set Track Solo State
           * @param {Object} params - params for function
           * @param {string} params.trackName - Name of Track
           * @param {'Enable'|'Disable'|'Toggle'} [params.targetValue='Toggle'] - Target Value
           */
          function setTrackSoloCueState({ trackName, targetValue = 'Toggle' }) {
              let previouslySelectedTrackName = sf.app.abletonLive.song.view.selectedTrack.invalidate().name.stringValue;
              let previouslySelectedTrack = sf.app.abletonLive.song.tracks.find(track => track.name.stringValue === previouslySelectedTrackName);
          
              let trackToSolo = sf.app.abletonLive.song.tracks.find(track => track.name.stringValue === trackName);
          
              let setLoopSwitchLookup = {
                  "Enable": true,
                  "Disable": false,
                  "Toggle": !trackToSolo.solo.invalidate().boolValue,
              }
          
              // Set Solo Value
              trackToSolo.solo.setValue({ value: setLoopSwitchLookup[targetValue] });
          
              // Select Previously Selected Track
              sf.app.abletonLive.song.view.selectedTrack.setValue({ value: previouslySelectedTrack });
          }
          
          setTrackSoloCueState({
              trackName: "TH RUFF",
              targetValue: "Toggle",
          });
          
          1. Kitch Membery @Kitch2025-06-27 22:09:37.562Z

            @Tristan... Use Chad's method above... It's much more direct.

            1. In reply toChad:
              TTristan Hoogland @Tristan
                2025-06-28 21:21:42.619Z

                Hey guys! Thanks for the swift replies, just trying this out now.

                Kitch's works right off the bat, though I love the logic of yours Chad. I'm just getting an error at line 12 let previouslySelectedTrackName = etc Error: Failed to read config file.

                I'm just in the middle of a session now, but I'll check it more thoroughly to see if I overlooked anything!

                But man this is GREAT. I've been deep in Ableton sessions lately for mixing in a forced way so Soundflow is going to start getting a bit of a workout, appreciate the groundwork you guys have done thus far

                1. Chad Wahlbrink @Chad2025-06-29 01:02:45.804Z

                  Interesting, @Tristan!

                  Were you able to get the SoundFlow MIDI Control Surface set up in the settings?
                  https://soundflow.org/docs/getting-started/ableton-live#installing-the-ableton-live-integration

                  It should look like this when you are done, with:

                  • the SoundFlow Ableton Output to the Input section of that same row.
                  • the SoundFlow Ableton Input to the Output section of that same row.

                  If you are on Sequoia and the SoundFlow MIDI Control Surface is not showing up in Ableton's settings, navigate to System Settings > Privacy & Security > App Management and ensure SoundFlow is enabled in this list.

                  https://soundflow.org/docs/getting-started/ableton-live#troubleshooting

                  Reply2 LikesSolution
                  1. TTristan Hoogland @Tristan
                      2025-06-29 19:29:21.341Z

                      PERFECT

                      This works even better because it doesn't select the track (which was a minor inconvenience tbh). So sick.

                      Thanks guys!

                      1. Chad Wahlbrink @Chad2025-06-30 14:53:54.089Z

                        Glad to hear it, @Tristan!

                        Can you confirm that you previously did not have the SoundFlow control surface set up? I am trying to monitor how easy it is to set that up, so I'm just curious if what I mentioned was the fix.

                        I'm glad it's working for you!

                        1. TTristan Hoogland @Tristan
                            2025-06-30 18:38:02.268Z

                            Yeah man that was exactly it!