Start M4L sequencer with Ableton Live "play button"

SonOfAGlitch's icon

Hello,
I'm in the process of syncing my M4L sequencer to Ableton Live using the "transport" object.
Although I managed to sync the BPM count, I can't understand how to start/stop the sequencer by pressing play/pause in Ableton. This is a fundamental feature to me, as I need the sequencer to start/stop with the rest of the project.
My understanding is that the transport gets a 1/0 to start/stop, so I could tell a toggle to turn on/off each time I press the play/stop button in Ableton.
How do I do it?
You can find below attached the basic clock system of my sequencer.

Thanks

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


dfwaudio's icon

live.object; left inlet: getinfo; right inlet: object: live.path live_set... gives a lot of info about API control.
Here is a patch where play is observed... Play is 1. Stop is 0.

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

SonOfAGlitch's icon

It works perfectly, thanks!
I just connected the message box with my start/stop toggle and now I can start/stop the sequencer by pressing the play/stop button in Ableton.

Could you explain me what's going on in the patch you sent please?

dfwaudio's icon

https://help.ableton.com/hc/en-us/articles/209071389-Controlling-Live-using-Max-for-Live-Tutorial-#h_ec5590ac-3484-4275-816d-d0adbcfb489f

long story short: live.observer object can observe a lot of states of live objects. You have to set the id from the path or object at the right inlet (in this case main path for ableton live set Api = live.path live_set. At the left inlet you have to set the method (observe) followed by the parameter/function which you want to observe (is_playing). Hope this helps.

SonOfAGlitch's icon

All clear, thank you very much!