Hey @SirDandol, please excuse my very late reply on this topic!
The behavior you experienced when you enable “Remote” on the output of the IAC driver is because Ableton sends the same note back when a clip is started, which macOS forwards back to Live, leading to an infinite feedback loop.
To make this work with MIDI, I’d recommend creating a 2nd IAC connection. I’ll call the first one “Ableton Control” and the 2nd one “Ableton Feedback”. In Live’s MIDI settings, enable “Remote” on the Ableton Control input and on the Ableton Feedback output:
Then, in AbleSet’s MIDI mapping settings, add a new “Script” mapping to your Ableton Feedback MIDI input and set it to the following script:
Here’s the script to copy:
if (midi.type === "note-on" || midi.type === "note-off") {
const sharedName = `clip${midi.note}State`;
if (midi.velocity === 126) {
setShared(sharedName, "queued");
} else if (midi.velocity === 127) {
setShared(sharedName, "playing");
} else if (midi.velocity === 0) {
setShared(sharedName, "stopped");
}
}
If you’ve mapped your clips to MIDI CC, you should be able to use this mapping script:
if (midi.type === "cc") {
const sharedName = `clip${midi.cc}State`;
if (midi.value === 126) {
setShared(sharedName, "queued");
} else if (midi.value === 127) {
setShared(sharedName, "playing");
} else if (midi.value === 0) {
setShared(sharedName, "stopped");
}
}
This will create shared variables for each MIDI note that contain the current state of the related clip. To make a button’s color react to this state, set it to “Dynamic” and use the following expression:
${shared("clip60State") === "playing"
? "green-600"
: shared("clip60State") === "queued"
? "green-700"
: "green-900"}
This is for a clip mapped to “C3” (note 60 in MIDI). For a clip mapped to “C#3”, you’d use “clip61State”, “D3” is “clip62State”, and so on. For CC, you’d just use the CC number instead.
I’ve used different shades of green to convey the status of that clip, but you could also use different colors here, depending on your preference.
Let me know if this works for you, I’m looking forward to your reply! 