Max4live, Sequential Chain Selector Problem. Plz help!

Ye Sol Choi's icon

I need help creating a Max for Live patch where the chain selector changes sequentially each time a MIDI note is triggered on a MIDI track.

The basic functionality works, but I’m facing two issues:

  1. When I stop and then restart playback, the chain selector visually resets to 0, but the sound still comes from a different chain.
    Only after stopping and restarting playback again does the sound correctly match chain 0.

  2. When the chain selector moves from 0 to 1, the sound still comes from chain 0.
    Then when it moves to 2, the sound comes from chain 1. When it moves to 3, the sound comes from chain 2, and so on.

It seems like the audio is always one step behind the chain selector value.

This is a bit too much for me to figure out on my own, so I’m asking for help here.
Thanks for reading!

Martin Olavarria's icon

Hello Ye!
I have found it difficult in the past to successfully route MIDI within Ableton Live. When I do it feels like I have to use some weird hacks, mention this because it is kind of important where your MIDI note is coming from. Is it on a clip on the same channel as your Instrument Rack with the chain selector? A different MIDI track?

What I can recommend is the following:
- Setup a MIDI track with the clip and MIDI note to control the increment, and a M4L patch to get the note and count it to send Control Change CC values.
- Set a virtual MIDI cable as output such as loopMIDI on Windows or the IAC driver on a Mac. BEWARE OF FEEDBACK LOOPS!
- Map the chain selector to a macro (maybe even directly to the chain selector) to map to the CC controller value and offset the regions of each instrument to different values.

Simple Max patch for counting the MIDI notes:

Max Patch
Copy patch and select New From Clipboard in Max.