Problem with live.remote~ controlling Ableton Looper state

Andrew's icon

I'm trying to setup a control that will turn Ableton loopers on/off. But, the state of the looper also gets controlled from elsewhere (I have a bunch of controls set up with Bome and Ableton I don't want to let go of, at least for the moment).

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

Here's the code:

It mostly works. But, if the looper is off (0) and I turn it to play (2) from elsewhere, then send live.remote 0 it won't turn off. If I send it a 2 first, then a 0 it will. So, I thought maybe it will only send changes, and it doesn't know that this is a change since it hasn't been updated with the new state.

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

So, I added an observer:

It kinda works, but now when I click play in Ableton it cycles on and off in Max before either settling on on, or off. The number of cycles isn't consistent. If I add breakpoints and step through it, it works fine. So, I tried delaying signals with pipes etc, but that just stretched out the cycles or caused other weirdness.

As far as I can tell, I just need live.remote to be sent the current state whenever I change it elsewhere for it to function as I want. If I manually send it it works fine, but I haven't been able to figure out how to accomplish this automatically.

Ideas?

Andrew's icon

Stupid me... adding a deferlow before setting the IDs fixed it.

Andrew's icon

Actually, while it seemed to work for awhile. After rebooting, now it works sporadically. Sometimes hitting play manually causes it to cycle quickly. Other times, it works at first, but then seems to disconnect from controlling the state parameter even after re-sending all the messages...frustrating

ironlion's icon

Andrew, I'm also working on something that's loop related, but it's about looping within clip slots in Ableton. If you have a few minutes, could you take a look a this: https://cycling74.com/forums/problem-with-clip-observer

Andrew's icon

Sure, I'll take a look later tonight once I'm free