TDAbleton issues with buffers and file descriptors

This thread is for discussion and testing of buffer and file descriptor issues in TDAbleton. These issues so far have only appeared on Mac. If you experience them with PC, please comment here!

Symptoms generally seem to be inability to connect with TDAbleton, and sometimes loss of connection with individual TDAbleton components. In the Ableton log you will often find this error:

ret = select.select([],[self._fd], [], timeout)
      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ValueError: filedescriptor out of range in select()

If you are having this issue, feel free to report here. We are working on a solution. You can send ableton log files, toe files and Live sets to ivan@derivative.ca. The simpler the better.

@nikoRLT @Hazetheai

Hi friends, starting this thread to focus on your particular problems, which seem like the same problem.

I’d like to start with the latest TDAbleton, for sanity’s sake. I can only make changes starting from that anyway, so first we need to get you working in that TouchDesigner version. If you have trouble getting your projects working there, start by making sure the TDAbleton Demo works. If it doesn’t, there is something wrong with your installation and we can address that. Most importantly, carefully follow the instructions in the wiki for upgrading.

Note that if you want to keep your old versions working, you can change the name of the TouchDesigner remote script folder (TouchDesignerLegacy or whatever) to keep that old version intact. There’s a link to the remote script folder on the TDAbleton component Utility parameters… by default it’s in your Ableton User folder. You can set Ableton to use that remote script when you’re using your older version of TD. When it’s named differently, you can install the new TDAbleton to the default location “TouchDesigner”

Once you get your project working in the latest version the same way it does in the old version, try replacing the OSC3.py file in your TouchDesigner remote script folder with the one in this ZIP:

OSC3.zip (23.0 KB)

Then close and reopen Live and see if anything changes.

I can’t seem to find any discernible difference with the OSC3 file you provided and the one from TDAbleton 2.6.2. I tried all the following, with the original file and the updated file you provided.

I’ve triple checked that I am using the most up-to-date TD Ableton (2.6.2) and comps and devices are updated in TD & Ableton. Currently on the test patch and live set files, I have about 50 level and 7 MIDI devices and it still seems to connect. Going above that amount and it won’t connect.

Another thing to note is that the Ableton push controller I use seems to exacerbate the issue in that when it’s connected to the computer, Ableton doesn’t seem to connect when there’s any more than 30 level and MIDI devices. Also, connecting the push after loading Ableton and TouchDesigner, it disconnects TD Ableton altogether. Happy to focus on the underlying issue, of course, until that’s solved.

For my part, I deleted all TD modules in TD and all TDA modules in Ableton. I updated TD to 2025.31310 and Live to 12.2.6.
I overwrote the old version of OSC3.py with the recommended one.
Then I opened my projects, added all TD modules (12.2.6) in Ableton and in TD: Package, Level, Midi, Rack, and song, etc.
Everything works fine, connection ok. Happy.
I save. I turn off the computer, then turn it back on, then open my Projects: 0 connected…
I really need help. I’m currently in residency, and I can’t work on my video project.
Whereas a few weeks ago, I didn’t have this problem.

Okay, I think I found the problem, thanks Hazetheai. I was using 8 RackMappers on 8 tracks. I finally replaced that with ‘Ableton parameters’ to retrieve a parameter I needed.
For now, it’s working.

There seems to be some deep limitation on Mac that we haven’t encountered on PC. I am going to dig into this in the coming year when I have access to a Mac for testing. Sorry that it may take a little time. Feel free to post any and all discoveries.

If it helps, there are only certain TDAbleton components that use OSC in this way. This includes racks, level, and midi components… basically, the components that have associated Max4Live devices. If you can find other ways to get the info you need, that should help prevent this problem from happening.

Thanks for the update, Ivan. For now, yes, I think it’s the best way to go. I’m trying to keep the number of level/midi devices to a minimum using individual levels as opposed to analyzer racks etc.

I also did find this thread that might be somewhat related to the issue of a “glass ceiling” with OSC connections on Mac. I tried the suggestion of one user who tried to increase the amount of bandwidth the OSC ports can use. It did seem to help — I changed it from ~.75MB to ~1.5MB, but it doesn’t seem to be a one-to-one scaling.

In the test file, if the connection caps out at around 60 devices, at .75MB when I increased the rev space, it now caps out at 70 devices.

I’m happy to do any testing that would help, as I’m quite reliant on TDAbleton :slight_smile: