How to global transpose all of Ableton's audio clips with Max?

    Apr 05 2016 | 2:15 pm
    I want to simultaneously change the key of all of my audio clips in Ableton's clip view.
    I've tried selecting all the clips and midi mapping the transpose dial. However, whenever you trigger a different audio clip, Ableton will transpose THAT clip instead of all of them.
    It only transposes whichever transpose dial is on top. I don't know how to make sure that the grouped transpose option is always on top...
    Any help would be immensely appreciated

    • Apr 05 2016 | 3:21 pm
      Any programmatic way to do it would likely take longer than hitting cmd+A while in session mode and before tweaking the MIDI knob that's mapped to all the clips. There's not an easy way to address 'all clips' in the API, or an easy way to select all clips before transposing each one. After looking at it for a bit, my idea would be to poll the clip slots in each track and check if they had a clip, if so, transpose that clip, iterate etc.
      Maybe some one else has a quicker way?
    • Apr 05 2016 | 3:30 pm
      Hi Evan, thanks for your answer What do you mean by 'poll' the clip slots exactly? Could you demonstrate this?
    • Apr 05 2016 | 6:42 pm
      If you're not familiar at all with the live API, this might not not make much sense, but I added a few comments that hopefully will show you whats going on.
      The code asks the first track how many clip_slots it has, then it checks if the clip_slot has a clip. If it does, it sets the transposition to the amount in the number box.
      I set this up for one track, if you want it to operate on an entire session, you would create the same type of structure, but you would ask for how many tracks are in the session, and run this could for every track. You also might want to put in another check to see if the clip is an audio clip. You can't transpose MIDI clips.
    • Apr 05 2016 | 8:17 pm
      Thank you for your time Evan.
      Unfortunately I am a big Max noob, and not familiar at all with API (but now watching YouTube tutorials about it!). I see from your comments how this should work. I've popped your code into a new Max4Live audio effect device. Should the transpose change on the first track if I scroll through the numbers of the number box? Because currently I don't see anything happening
      Also, just to make you aware, I definitely know that I will have 4 tracks, but will only need to transpose all the audio clips of 3 of the tracks
    • Apr 05 2016 | 9:20 pm
      It works, I just copy pasted into an empty device, worked on 3 clips in the first track straight away. Any errors in the Max Window?
      Here's a version that works on multiple tracks:
    • Apr 06 2016 | 9:31 pm
      Perfect! That works great
      One last thing:
      I'm using a Max patcher in an external window to control Ableton. Would it be possible to control the pitch number object of the Max4Live patch you've provided from this external patcher with another number object?
      I've tried sending the external number object and putting the receive in the Max4Live device (as these images show:, but with no luck. When I scroll through the numbers of the external number object, the Max4Live object doesn't scroll too
    • Apr 06 2016 | 10:00 pm
      Yeah maybe you can't use send receive across applications like that. I bet using udpsend/receive could work.
    • Apr 06 2016 | 10:28 pm
      Cool suggestion. Using udpsend/receive now means the number can be controlled from the external patch, however the pitch isn't changing with it. The arrow on the number object is gray, whereas if I scroll in the Max4Live patch, the arrow is orange (orange meaning it is selected). Any ideas?
    • Apr 07 2016 | 12:30 am
      Nope, I already gave you my good ideas.
      Send the value from udpreceive directly to the trigger object? I don't really have much experience communicating from max to m4l with udp, so someone else might have an idea.
    • Jan 29 2020 | 12:56 am
      Hey guys, I know it's been a couple of years, but I found this code while searching around, and adapted it for my project, and it's working great, as long as I manually change the transpose value. If I try and use clip automation, it changes the transposition, but only one track at a time (whatever number the "number of tracks" is set to) instead of all of them at once. I'm assuming it's the way the loop to get track number / clip number is working. Any ideas off the top of the dome?