TDAbleton - TouchDesigner Ableton Connection

First of all, thank you for this fantastic project. This is an incredibly powerful tool for audiovisual performance/installation. Made life so much better for me!

I also have a couple of questions/suggestions, and not sure if this is the best place to raise them?

If not, please ignore this and let me know if there’s a more appropriate way to get in touch regarding those.

1: I’ve been trying to figure out what the best way is to trigger events at the exact time when scenes change. The last triggered scene channel of the abletonsong module sends out the scene number when the scene is clicked, and not when it’s actually activated (on the downbeat of the first bar, e.g.). So I scrambled something together that can do that. Have a look and see if that’s something useful to implement? (I’m using it quite a bit, as I need use the scene number to trigger new visual material right when the scene is actually started).

2: I think I’m probably being naive a bit and this should be obvious, but I’m really struggling to find a way for TD’s timeline tempo to “listen” to Ableton’s BPM. I’ve tried using Ableton Link, but that only turns my Ableton’s downbeat events in sync with TD’s timeline. I haven’t been able to figure out a way to control TD’s BPM using Live (and in fact, not even the other way around. I don’t even seem to find a way to control TD’s tempo dynamically, using an operator. If I did, I’d be able to hack something together using the BPM info from TDAbleton). Am I being silly and missing something obvious?

Thanks again for your beautiful work.
Best,
Mo
tdAbletonSceneNum.tox (1.29 KB)

Posted build 1.8.4 with last_started_scene fix

Good find, Mo. I had broken the last_started_scene channel somewhere along the way! It should work now. By the way: triggered_scene shows the scene clicked and about to play and last_started_scene shows the last scene that started playing. I do it this way because a scene is never considered to be “playing” by Live. You may also want to check out the scene callbacks in abletonSong’s callback DAT, because if you start the same scene twice, the last_started_scene channel won’t help you!

Posted version 1.8.6

  • Fix for MIDI notes from TD to multiple tracks
  • Fix for MIDI tracks with no instruments

Note that these updates require your TDA Max devices to be updated… if you have resaved your TDA devices in a new folder, or done a Collect All and Save, you may have to replace those devices by hand.

Hi Ivan, thanks for all your hard work on this!

I’m trying to build something that requires the currently selected / highlighted clip from ableton. I found Song.View.highlighted_clip_slot and Song.View.detail_clip properties in the python API reference, and I can read / write those properties through the touchAbleton console, but I can’t seem to find a way to attach a callback to respond to changes to those properties.

The abletonValueListener COMP seems to only handle simple properties like floats that can be put straight into CHOP channels. Is there a recommended way to get at more complex data types with abletonValueListener LOM expressions, or with python directly? The midi remote script errors if I point the abletonValueListener at a clip object, for example. Even string properties give an error, like Clip.name.

I tried hacking AbletonSongExt to add a listener for Song.View.detail_clip and, set up an OSCin DAT to debug the messages sent to touch from the remote script, but only got as far as receiving this message:

/listener/song/info/detail_clip/setterIndex 11 "SONG.view.detail_clip" "name" "/song/info/detail_clip" 39773

But I haven’t been successful in actually getting the name of the clip to come through. Am I on the right track or does this require some specialised code on the remote script side, like how you set up the scene listeners for example?

Thanks!
Corey.

I should add that I plan to make a new touchAbleton COMP if I can get this working, rather than hacking the existing COMPs. It was just convenient to test code in there.

Hi Corey

Nice to see people going deep with this.

Fascinating problem with a somewhat complex solution. I have built a tox with the main features you need. It’s a bit thrown together, so I imagine you’ll want to clean it up some. At the very least, it will get you started with some deep methods for this sort of thing. Check out the red Operators in the tox… all the work is in there with just a one line change to the main extension (search for ‘detail_clip_listener’).

Please send me changes and feedback. I will make a more polished version for a future TDA release. Or maybe you will!
abletonDetailClip.tox (9.28 KB)

Wow, Ivan this is great.

Really smart to set the parent’s custom parameters for the target track and clipslot in the OSC callback.
It gives people way more functionallity out of the box than just dumping the clip details in table and leaving it to them build something to get data from the track that their highlighted clip lives in.

I do think however that the most useful information someone would expect to pull from the detailClip property is the name / slot of the selected clip, so I added a select that picks the highlighted clip’s row from the out_clips table and out DAT to the tox, so you can wire that to straight to DAT Execute and script a callback. There’s nothing stopping anyone from doing this outside the component of course, I just thought it would be convenient.

Other changes:

  • When you use the arrow keys or mouse to move your detail selection from clip to clip in the same track, you always get just one message in the OSCin DAT, but if you move it from a clip to an empty slot, or from a clip to a clip in a neighbouring track, or if you are moving it from a track header to a neighbouring track header, you’ll get two or more messages in the OSCin DAT. I’m not sure what the implications are for performance here, I feel like setting the parent().par.Track and Slot.MenuIndex parameters in the callback even if they haven’t changed probably isn’t too expensive but in any case I edited the callback to avoid settings those parametes if the last received message == the current message.
  • Line 77 in AbletonTrackExt was throwing KeyError: ‘hasMIDIOutput’ whenever the detail clip selection changed. I fixed that.

Some things I noticed:

  • When you move your clip detail selection from on track to another, the ‘Include clip playing data’ channels disappear from the CHOP output until you triger another clip in that track.
  • The ‘Include clip playing data’ toggle seems to be broken for me.
  • When you have a midi clip highlighted and the next clip you highlight is an audio clip you get the error below:

[code]# TDA Remote Script Error #
Traceback (most recent call last):
File “C:\ProgramData\Ableton\Live 9 Suite\Resources\Python\lib\SocketServer.py”, line 290, in _handle_request_noblock
self.process_request(request, client_address)
File “C:\ProgramData\Ableton\Live 9 Suite\Resources\Python\lib\SocketServer.py”, line 318, in process_request
self.finish_request(request, client_address)
File “C:\ProgramData\Ableton\Live 9 Suite\Resources\Python\lib\SocketServer.py”, line 331, in finish_request
self.RequestHandlerClass(request, client_address, self)
File “C:\ProgramData\Ableton\Live 9 Suite\Resources\Python\lib\SocketServer.py”, line 652, in init
self.handle()
File “C:\ProgramData\Ableton\Live 9 Suite\Resources\MIDI Remote Scripts\TouchDesigner\OSC.py”, line 1797, in handle
self._unbundle(decoded)
File “C:\ProgramData\Ableton\Live 9 Suite\Resources\MIDI Remote Scripts\TouchDesigner\OSC.py”, line 1779, in _unbundle
self.replies += self.server.dispatchMessage(decoded[0], decoded[1][1:], decoded[2:], self.client_address)
File “C:\ProgramData\Ableton\Live 9 Suite\Resources\MIDI Remote Scripts\TouchDesigner\OSC.py”, line 1741, in dispatchMessage
reply = self.callbacks[addr](pattern, tags, data, client_address)
File “C:\ProgramData\Ableton\Live 9 Suite\Resources\MIDI Remote Scripts\TouchDesigner\TDA.py”, line 307, in onMsgListener
msg[4] if len(msg) > 4 else ‘’)
File “C:\ProgramData\Ableton\Live 9 Suite\Resources\MIDI Remote Scripts\TouchDesigner\Listeners.py”, line 55, in add
returnAddress, id)
File “C:\ProgramData\Ableton\Live 9 Suite\Resources\MIDI Remote Scripts\TouchDesigner\Listeners.py”, line 191, in addSpecial
addInfo = addFunction(property, returnAddress, extra)
File “C:\ProgramData\Ableton\Live 9 Suite\Resources\MIDI Remote Scripts\TouchDesigner\Listeners.py”, line 256, in addMIDINotes
clip.add_notes_listener(callback)
AttributeError: ‘NoneType’ object has no attribute ‘add_notes_listener’

End TDA Remote Script Error #[/code]

I’ve attached my version of the .tox, note I was working in the current stable build.

I’ll continue testing this in my project and report back with any problems or improvements. Thanks again for your speedy response!

Regards,
Corey.
abletonDetailClip_1.tox (9.47 KB)

There are problems with TDAbleton in latest experimental versions and 20k branch. We are working these out.

For now, you can fix things by deleting the tdAbletonPackage2 component from your toe, if you have it. It comes in TDAbletonDemo.toe, so if you started with that, you might have it sitting around in your file.

Posted version 1.8.7

  • More fixes for “Doesn’t have send” errors

Hi there,

First off I am loving this touch-ableton pathway! thanks for making it :slight_smile:

I have a question regarding the song/time value at… what format this value
is in? (Seconds?) If so it seems to be running quite fast for a seconds counter? (have tried on multiple machines)

Also is there any example out there of having TDs Timeline or a timerChop slaved
to abletons song timeline?

thanks!

puck.

The time value is in milliseconds.

We don’t have an example of locking TDA to the Touch timeline yet, but it is on the todo list. If you make it happen, please share!

Hello, very good project, I have been experimenting on my computer without problem.
I recently started to add 2 mac, but it brings me some problems, for example, in the mac 1, when I try, everything works, except in the middle of signals midi in tda midi.
executing ableton 9.7.1, in the forum I saw that it said 9.7.2 or higher, I suppose it must be a compatibility problem, because in the other mac with windows 10 it works fine.
the version of max for live is 7.3.5.

Could it be that midi signaling does not arrive through a lower version of ableton to which you ask?

And my other question is if I can control from my Touchdesigner with TDAbleton, 2 macs each with ableton and TDableton components?

the idea is from my computer to send midi signals and parameter control to 2 macs.

Thanks and very good project!

cheers Ivan

So from what i can see the integer part of song/info/time is the
total number of beats and the float / decimal points are milliseconds .

I’ve work out a quick hack for getting TD timeline to sync by pulsing
the scrub function in /local/time. seems to work ok for the moment.

i’ve attached the 2 tox’s needed … if you replace /local/time with
time.tox and place the timeSync.tox into the tdAbletonPackage it
should work correctly … you can switch in and out of slave mode by hitting the
sync button.

thanks
puck.
timeSync.tox (1.72 KB)
time.tox (3.59 KB)

@puck: Thanks for sharing your work! I’ll check them out when I have a chance.

@tolchxxx: Yes, Ableton (actually Max) did have some issues with MIDI at one point in development. I’m not 100% sure which version that problem was in. This may or may not have to do with your problem.

What definitely will affect what you’re trying to do is that EVERY COMPUTER that receives MIDI information needs to have its own TDA_MIDI device. That’s just the nature of the beast because each device only sends to one OSC address.

I understand, I will try with more recent versions of max and ableton to see if it is solved.

With respect to connecting TD Ableton to more than 1 computer.
I see that the Touchdesigner project needs an Ip (Abletonpackage / tdableton), from the computer running Ableton. (Ableton Address: the IP address of the computer running Ableton Live. Also accepts “localhost”.)

In case you have 2 computers running Ableton, each with its own ip.
How can I assign the second ip, inside tdableton in touchdesiger?

double tdAbleton?

The 3 computers (1 Windows with touchdesigenr, 2 macs with ableton), connect by means of a router, through wifi.

Thank you

@tolchxxx

You have to create another tdAbleton, yes, with a different global shortcut. Then you have to change the TDAbleton Comp parameter of all the abletonComponents that you want to watch that new master’s connection.

Here is a package that is set up to work as a second connection
tdAbletonPackage2.tox (73.7 KB)

thank you very much I’ll try it.
in the case that one of the computers does not have a ableton suite, to run max for live, would it need a physical interface, which would send mid tdableton to the other computers without the ableton suite?

I know there are virtual midi programs, which I use successfully on my computer.

if they are connected in the same network, it is possible to configure midi out touchdesigner with this soft, and ableton live midi in. to receive midi data by network?

I leave one example: nerds.de/en/loopbe1.html

Thank you

I’m not sure of the details of that, but what you describe sounds possible.

TDAbleton interacts with Ableton Live, not Max directly!

What Max For Live was for the plugins that need to be incorporated into Ableton, like the tda midi.

Thank you

System requirements are in the wiki and at the top of this post