The Interactive & Immersive HQ

Ableton Live Visuals in TouchDesigner

In this post, we'll look at how we can create visuals for an Ableton Live Set in TouchDesigner using several TDAbleton components and some creative tricks for driving animation using the CHOP-based data we have access to.

It’s a topic that’s been covered before, but one that still holds interest for many coming to TouchDesigner for the first time: making visuals for an Ableton Live set in TouchDesigner! The tight integration with Ableton Live makes TouchDesigner a great option for creating synchronized visuals for music, as you have access to just about any bit of data you could want from your Live set, whether it’s MIDI notes, clip playback location, project tempo, or bar/beat position.

In this post, we’ll look at how we can create visuals for an Ableton Live Set in TouchDesigner using several TDAbleton components and some creative tricks for driving animation using the CHOP-based data we have access to.

Here’s a look at the effect we’ll be covering today. It actually consists of two independent effects that utilize different TDAbleton objects to drive their synchronized movement and visual changes. In the first example, we’ll look at using MIDI notes to move geometry, and in the second we’ll cover the use of bar/beat data to drive a lookup-based animation.

Moving Boxes with MIDI Data from Ableton

In this first effect, we use MIDI data coming from an arpeggiated synth in Ableton to move the position of boxes organized in a grid. Each note corresponds to a single box, and when that note is triggered, the box will move forward in the Z direction and the box’s color will change to white. Let’s take a closer look.

CHOP Network: Retrieving MIDI Note Data, Triggering ADSR Envelopes

Starting from the left, we use an abletonMIDI COMP to pull in MIDI notes from the synthesizer track. The Select CHOP is used to filter out only the channels that contain note information (we don’t need last_note, last_velocity, etc.).

Before the addition of the Trigger CHOP, the note channels will simply turn on and off as each note is triggered and released. However, once we add the Trigger CHOP, we’re able to use the change in data for each channel as a trigger for starting an ADSR envelope. This is great, as it’ll give us the opportunity to adjust each part of the envelope which will directly impact the movement of the boxes later on.

In the next section, we use a Shuffle CHOP to swap the multiple channels and convert them into a single multi-sample channel, which will make them usable for the Lookup Channel POP later on. The Trim CHOP is used to shift the starting point for the channel to 0. Finally, we have a Null CHOP which is used as a reference point for the CHOP data which will be used elsewhere.

POP Network, Geometry COMP, Instancing Data, Material

The POP networks for this example are pretty simple. We’ve set up a simple Box POP for our geometry, which has some instancing data applied to generate multiple copies. The Line MAT is used for its ability to create a wireframe outline of the geometry.

Let’s take a closer look at the nodes used for generating the instancing data.

Besides the Null POP, we have just two POPs generating the instance position data: a Grid POP, which creates the basic positions for each instance, and a Lookup Channel POP, which uses CHOP data to modify the position (P) attribute of the points. The Lookup Channel POP is set to apply the Null CHOP’s data only to the Z axis of the P attribute, so that the boxes will only move on that particular axis (which moves them towards the camera).

Creating Color Data for Instances

The final step for this part of the effect is generating color. Here, we’re able to actually reuse the same MIDI note-based CHOP data to directly modify the color of each instance (this is what “highlights” the active note by setting that particular instance’s color to white). The CHOP data is converted directly to a TOP texture with the CHOP To TOP, and output in a square resolution using the Fit to Square (Combine Sets) option for the Image Layout parameter. Though not required, it gives a better preview of how the color will be applied to the instances compared to having all the pixels oriented in a single row.

Next, the Noise TOP is used to generate random colors. The previous texture is added to the new noise texture by way of the first input on the Noise TOP. Since the CHOP To TOP’s output is in a 32bit float (Mono) format, the Noise TOP is set up to output an 8bit fixed texture so that we can generate full RGB color. The last step is to set Noise TOP up to taste, and then use the data it generates for the Color OP parameters on the Instance 2 page of the Geo COMP. That’s it for this effect! Here’s a look at the results of this network by themselves.

Important Points

To recap, this effect uses MIDI note data to directly impact the position of the boxes in the grid by modifying their P attribute via the Lookup Channel POP. The Trigger CHOP is also a core component, allowing direct control over how the position of each box will move. We hope it gives you some ideas for utilizing CHOPs as a source of POP attribute manipulation.

Get Our 7 Core TouchDesigner Templates, FREE

We’re making our 7 core project file templates available – for free.

These templates shed light into the most useful and sometimes obtuse features of TouchDesigner.

They’re designed to be immediately applicable for the complete TouchDesigner beginner, while also providing inspiration for the advanced user.

Transforming 3D Typography with Bar Info from Ableton

For our second effect, we have an interesting way of keeping track of the current bar number: we use the new Text POP to showcase the current bar number in text form, while at the same time moving the text randomly around the grid established in the previous step with each change of the bar number. Let’s dive in!

CHOP Network: Retrieving Bar Data from Ableton

Rather than the abletonMIDI COMP, we start this effect off with the abletonSong COMP, which gives us access to a wide variety of tempo and timeline-related data. In this case, all we need is access to the current bar number, which is what the Select CHOP is used for.

CHOP Execute DAT: Updating Text and Generating Random Values

Next up, we use a CHOP Execute DAT to watch for any value changes in the null_bar CHOP, and on the value changing run two lines of code. First, a random number between 0 and 1 is generated with the tdu.rand() function, which is then used to set the value of the CHOP channel in the Constant CHOP directly below this operator (more on this in a bit). Second, the new value of the input CHOP channel is retrieved, converted to an integer, and this value is used to set the Text parameter of the Text POP.

In the next part of the network, we use the Constant CHOP as a lookup value for the point positions defined by the Grid POP from the first effect.

CHOP Network #2 – Looking Up Data with the Lookup CHOP

First, we use a Select POP to select the Grid POP from the previous step (not really necessary, but helpful for visualizing what’s going on in this step). Then we use a POP To CHOP to convert the data into CHOP channels. Note that normals and texture coordinates have been turned off for the Grid POP, so all we generate are channels for the point position attribute.

Because the Lookup CHOP’s Index Range has been left at 0 and 1, the random values that are output by the Constant CHOP will pull in a different position value each time the bar number changes. Note that I’ve turned off the Interpolate function in the Lookup CHOP so that only the original positions defined in the POP To CHOP will be output, rather than the operator attempting to interpolate between them.

Geometry COMP: Applying Transformation

Finally, these CHOP channels are used to modify the transform parameters of the Geo COMP for this effect, which results in the text moving around the grid.

Just to recap, the main idea here is that you can use bar or beat-related data not only to directly set/make changes, but also to drive the looking up of other data via the Lookup CHOP-based approach we covered here. The CHOP Execute DAT is also an indispensable part of this process, providing the ability to modify multiple parameters in one step and also gives us access to utility functions like tdu.rand().

Wrap Up

As you’ve probably gathered, the TDAbleton toolset is incredibly powerful, and of course we’ve really only scratched the surface of what’s possible. But that said, with such a large quantity of data available about your Live Set, it can be hard to decide where to begin! We hope that this post has given you a bit of creative inspiration to go out and try working with Ableton and TouchDesigner yourself. Using these ideas as starting points, you never know what you might create!