Following the “Tap Tempo” example, this is a translation of that patch it into a Max for Live device that controls the Live transport (using the mouse instead of the t key). For the purpose of the example demonstration the code that would reside inside an amxd file is included here inside a Max patch, so you can just see in Max without having to load it into Live.
This patch demonstrates some of the steps necessary to change a parameter automatically in a Max for Live device using the Live API. To use this patch, you will need the Ableton Live Studio application, and you'll need to paste the contents of this patch into the edit window of a Max for Live device.
This patch is, in many ways, identical to the patch shown in "Tap to teach tempo to Max", but in this instance it's implemented in a way that will work as a device in Max for Live. Instead of setting the tempo attribute of the Max transport object, we're setting the tempo property of the live_set object in the Live Object Model.