observing clipslots/stuff and almost all in a liveset ??

Learn about building and using Max for Live devices.
Post Reply
julienb
Posts: 1843
Joined: Sat Oct 29, 2005 1:15 pm
Location: France
Contact:

observing clipslots/stuff and almost all in a liveset ??

Post by julienb » Tue Oct 13, 2009 5:42 pm

hello,

I just finished my protodeck controller.
Now comes the time when I have to build its interface with Live... of course, the interface will be a m4L patch.

I have to:
- map midi events from protodeck to live
- map live feedback to protodeck

if I imagine how to "translate" midi message from protodeck to trigger for live, I'd need help about observing things from live.
By observing, I mean:
- detect/get coordinates of the clip in a clip creation in a track, in all the clips slots
- detect a clip triggering
- detect the position of the playing clip in a track
- etc
If I understand how to do that in a particular slot, I cannot figure out how to do that for all the clipslots.
it may involve a kind of loop...

I'd like to know if some of you have ideas, tips, part of patches to do that.
what could be the architecture of this kind of patch?

any help/idea/tip/word about that would be appreciated :)
Julien Bayle
Art + Teaching/Consulting

Ableton Certified Trainer
Max Certified Trainer


Structure Void / Ableton Certified Training Center

monohusche
Posts: 190
Joined: Thu Jan 22, 2009 4:28 pm
Location: Hongkong

Re: observing clipslots/stuff and almost all in a liveset ??

Post by monohusche » Wed Oct 14, 2009 3:46 am

one way of doing could be to create an abstraction for a clip slot observer which takes column/row coordinates as parameters and outputs the various events plus the coordinates.

then the messy bit would be to dynamically create all the observers in a loop using jscript within a bpatcher which collects all the outputs from the various dynamically created observers.

the max help describes jscript, have a look.

julienb
Posts: 1843
Joined: Sat Oct 29, 2005 1:15 pm
Location: France
Contact:

Re: observing clipslots/stuff and almost all in a liveset ??

Post by julienb » Wed Oct 14, 2009 6:35 am

hello
thanks for the answer

indeed,it was the way we did it while live API wasn't official yet (you know, with all python stuff)
so I can figure out it

I thought that there was a tip with object observer like a kind of "all observing" parameter given to this object.

I'll try to build that asap!!

thanks a lot
Julien Bayle
Art + Teaching/Consulting

Ableton Certified Trainer
Max Certified Trainer


Structure Void / Ableton Certified Training Center

julienb
Posts: 1843
Joined: Sat Oct 29, 2005 1:15 pm
Location: France
Contact:

Re: observing clipslots/stuff and almost all in a liveset ??

Post by julienb » Thu Oct 15, 2009 6:50 am

I'm a little bit stuck...

if I'm ok with listener in a code, I cannot figure out how to do this in a patch.

for instance, should I make a big loop polling things everytime?? I guess Answer is no!!
indeed, I could make a big polling when I connect the protodeck controller. but even in that case, How to make a kind of "loop" ?? uzi? metro + incrementing value?
Julien Bayle
Art + Teaching/Consulting

Ableton Certified Trainer
Max Certified Trainer


Structure Void / Ableton Certified Training Center

monohusche
Posts: 190
Joined: Thu Jan 22, 2009 4:28 pm
Location: Hongkong

Re: observing clipslots/stuff and almost all in a liveset ??

Post by monohusche » Thu Oct 15, 2009 9:12 am

I guess, you wouldn't need polling as in "traditional" programming as live.observer is already taking care of that. have a look at the live.observer help, you feed it a parameter to monitor (such as "is clip loaded"), and it will fire automatically if the value changes (e.g. adding or deleting clip). the only thing you would have to do is to "kick off" observation by feeding live.observer the path to the clip slot (right inlet) and the value to observe (see LOM).

for that initial setup, you need the loop (across all visible tracks and all available scenes)...check out the M4L abstractions under Max/patches/LiveAPI...

lots of practical use cases...

hope that helps,

nick

julienb
Posts: 1843
Joined: Sat Oct 29, 2005 1:15 pm
Location: France
Contact:

Re: observing clipslots/stuff and almost all in a liveset ??

Post by julienb » Thu Oct 15, 2009 9:49 am

okay with the LOM (precious document!)

I guess I don't have to create a lot of live.observer, only one, right?
I could use a kind of Lookup Table which would be feeded with the live.observer results and which feed midi message to my controller to light led

observer => LUT => midi messages => controller

the lut could be a coll object (I opened a thread for that : http://forum.ableton.com/viewtopic.php?p=984982#p984982)


the feature of "creating/removing a clip update to my controller" isn't the major thing I'm looking for.
I mean, I can force a "scan" of the liveset at the controller connection or when I want to...
Julien Bayle
Art + Teaching/Consulting

Ableton Certified Trainer
Max Certified Trainer


Structure Void / Ableton Certified Training Center

julienb
Posts: 1843
Joined: Sat Oct 29, 2005 1:15 pm
Location: France
Contact:

Re: observing clipslots/stuff and almost all in a liveset ??

Post by julienb » Thu Oct 15, 2009 12:30 pm

I did that:

Code: Select all

----------begin_max5_patcher----------
1399.3oc0ZssaiaCD8Yu.6+.gw9XRflgT25as+FEKBjsUcztVRFVxsocQ+2q
HGJakD6DJZRosH.QXnt3gGMyYNbn9wm+zhkqpeNuYI6WX+NawhezMxB0XxQV
zOvhkkYOudWVi5BWVk+W0q91x6zmqM+4V036y9NCXHie5T+QcUaUVYt5z+5g
hrcreqd2lSmuXi5LcOs6CSNMZ0wxhpc4speM9vmUSw+ndVPvCACt55is8WNz
O79r10OUTs8wC4qao4GFlzcarPNmNH+OzMD6q82D8fZ+684zcrbI6qpS8ue9
SxicGt61goCEUsVAQQWFhfwAQAF.QgQxC7APj0vv55xx7AS3S3P6gr0eu4dv
JnP3cnHTnl7owJ.I1mHQy57pbaQBt2QBQp71XXPfyfhqkabOyNP.tLHfti7P
vin4sBD33CgeH4gLM+VvnikqxOXEbfNIl.M.NRSUwDAFvkpX8XKWkUscoOxh
dJq4w06J1aEhE3+rHTQnHRTLrhTOlEcrZeG0JqXCKvFvPj58vGNFpPgPELDE
YRo36lwLJA2+PRLNH9XJynbLYrv+jw.nvJHNYpHiKyaZx1l+VPp6pXewJbhG
NUEsPf3bHEMQSthWMeTS2eVQHwicR1G+8x9RzfCHODCFRH4BRoq.Z6J9y7G5
7zmrBwR7OhER4f5USMFDyKIhaqaqYRP6wl716XayaWWerpkQhqsBDS8dBZOH
Bpxg.srqYHCcWc1FUYDKfIzMKK8846IU25EmZPn1sVS7578EU1Qhg9mtGIdK
jvIdrmCl7PMQTLUZGPHZZpIZslSz+qhqWGktIG+Dn47VkJff2K7EQvD0or+2
qT.C7NfgIjPgfetEJP8izFLD7uPAMFpyW0pF7Gq0piss0UWbt9QJKGcU8HN0
cw9+OGU06BBX2R+ifH+GAPjz7TUcqnj4Ronjro6LR+xllC3eI0nJdRfJbJL0
y6xy6u8FVEKE5+s4If5KPrR8COxmatgLkpYWcqcLq9eed3zFApwBu1W1apPM
v8egZMEiHdRqTORIxcy8hxiku385Pb5rr4tek9qD7sTZTLLLZRkR6V3CtH7k
581eGfyD9YlPQs7P1WPljQ6QEklkqxMcxDKnkMl.yjZA4mDRfcqjKw+JEnPN
d.LnS.S+2CRKaEamMHTr26OPeXTTrw6yB0EwKgTzM0UDr5MevQpeZ4IdE90T
e7v59mb+VSxfy+7axaZKpxZK5VrxfqpqTIafS9TwlM4UufwqrXy95NBjl91+
Cx4lPugRCrduW3l61uxgtraK+DnXnEtcHs3IYfbukSbaYoTCc6Qg1XHNvswt
nKm51u1gthaGMZ2V6nZAiCrbCZCFi1vnBR.UXAlpH3PZ+keoEm1+ALQHuRkk
SlRnQAPxl9Nt2DtILwHmStKsyfyI2xygbAWIX.lGjyrHUbrNmPDppvjp2t5y
VtgE1H2FGsaCHPNJsN5AVtIIBLITP.151wwCcaokanyLhEVtGqizsgToiRe3
Y7Hn2vINcrQxKFMCrt9bBIiJN7sVBpqUxOBnPskah4M4kfXzuD3jVPA8Qxx4
hSVtg8KzD2F.KIXP5q7fq2IvWZESuHzEMic0KBzSSILIflR3P2VZ4l2DoFkE
mLOEISLgYTUJc5cNHxnTuQm4EDQLDz6acdHhSaXJdago5E.3tvTzHvFRrrXi
dKeOa3Fm1HxYLzxB6HsKg8HeHNotMXqLJMc7oPDvUtcfIjE37nnFLhlUMElA
myHkbvMpjK14B49XWNxR1WdhtygmsbCRaTehhs0qouy9gVNwqMJ1E3150TiY
GZMgM2Zzcaom2JUqLN5j0D1jnQWm6TOhdgJxTWEWaDARpkNc+pqzAHWrMhxA
5N7e.KRj5cB
-----------end_max5_patcher-----------
when track and clipslots change, it get has_clip value. it is a beginning. I guess it could be improved but ... :?
I'm adding the observing things right now . . .
Julien Bayle
Art + Teaching/Consulting

Ableton Certified Trainer
Max Certified Trainer


Structure Void / Ableton Certified Training Center

julienb
Posts: 1843
Joined: Sat Oct 29, 2005 1:15 pm
Location: France
Contact:

Re: observing clipslots/stuff and almost all in a liveset ??

Post by julienb » Thu Oct 15, 2009 1:18 pm

Storing (id,x,y,has_clip) where id is the object id, x track number, y scene number and the has_clip property value...

but observing the clip in the lookup table (coll object) isn't easy for me :(

Code: Select all


----------begin_max5_patcher----------
1809.3oc2b0ziaaCD8rCP9OPHrGRA1cg3mhp2ZO2i8VPvBYa0cUisjgkbxlF
z+6UjCks75unnIkWTDr1lxxlO93LuY3P57yO9gIQSqdMuNB8qnOilL4msWYh
9ZpqLo6BShVl85rEY05aLZV0xk4kMQ2adyl7WazuweTU80MqP+Y1zE4nuWz7
BZ1hhUOUunpoV+RTcSVS91O3hhx7YUaJ0eZR2UWsNut8qOqonp7oieK+UUYS
Y1xbcu9aqKxVf98pEy29EWLW+NUS+6GDhni9EuNeVCLr4x3GiuGg0ORHIpmX
zGiQeo6CVtYYQ4h7F8vG2GD0E+iFDXQ6mZ2cWsoo612d4UYMydon74d8rfvU
cFOA.PJ4vttOl0cj95+6G+f541mt+5m0Jl+jZtAlkdE8CzKY05qD4BcytDcS
RnpgI7ngtU7P3oaLNUS2rzdz89cs+n6k400YOmeHcSQXTLB6B4xkWhbYBolb
E5Ap90X4I4VxQ4Vxo3V7Y3VJ39v4zS0yGPscuAzCM+XUN7UEEg9h+o857Fzc
XzcDzcTzcLmn+jnAPiwWCMRzlnRrlFE8oQuxVmTS3Zj.3hnP6ISS0lYLFETt
S24I6etnYc1ruh9zq+hSjA+htrZEPvsUNhhgBsFAgp4tD1MQKb1h7r0tPqrv
6JJhAWQlNLAkEXWwx7u2NvNBEUsXgSLzEy6QvzYeH.E6zG4mMVAdXLK6LLK2
zkIjS0yCHVw889a2WPc12xm+TKOz1oOk0zrtX5lFHO2I6lAlDkubZtlyhgqX
l475L3lxUJAjLDwo4QdjOlOHmSJfqMDXP1nBxgwtOJsWnRJ2+F7ZxpMAIDAQ
chvHGmvXdLJsI7SJPXI1PXAKxT8CtkKIyK1UmKDCGVVivrHmcrj+Yh5Y4k4t
xDzfyDTtI7A0aTwobedvwkVfCetsP.ULjzFkbnr+AdMWqDylV4cmxufSBtpa
Gc.5sFekKSGsB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UYCfEth
Z9dbM2absUZH3AKhfwbEPgsytMrj409AyVYVq1VrggYu.Nc2RtH3v2FvwrZ1
lL7YaPtE9gx0IpoZMhvlvcE1lerwfK1aZECA4SD56L1WoyRDVMSHczuiXpo6
1F9Az7vX9zwtz39lOTuE61Jtl4pxrj1WYV5qTvUm9uKKjPStIBITqjfoxaiJ
mclo3qyLsKESuYlRCDroP8DHlhB1AaeEM1JsYVpidWL3vURiYaa4sr0v1HIf
GVEm.zJnm9I3Tqo9gBvMsFwD4nNmHm4+fH11vOdpXaz3XXGCrigeSs8a4GSd
qVBKw0znTUyoGrE9xDgaEr4DGEXvP8P52xO5hI1XjvuMYTyspt.T9sIPnUfi
vtZvotP6S+GP9bkfW
-----------end_max5_patcher-----------

Julien Bayle
Art + Teaching/Consulting

Ableton Certified Trainer
Max Certified Trainer


Structure Void / Ableton Certified Training Center

Surreal
Posts: 560
Joined: Wed May 17, 2006 1:18 am

Re: observing clipslots/stuff and almost all in a liveset ??

Post by Surreal » Thu Oct 15, 2009 10:19 pm

i think you will have much better fortune when we have access to all of M4L. the control surface portion looks like the way to avoid writing per clipslot.

pukunui
Posts: 405
Joined: Thu Jan 29, 2009 10:26 pm
Location: Los Angeles

Re: observing clipslots/stuff and almost all in a liveset ??

Post by pukunui » Thu Oct 15, 2009 11:14 pm

The best way to observe a large number of properties without tears is via the JS API object. My APC40 observer patch went from a nasty 160 odd voice poly~ to about 10 lines of code.

We hope to have some more examples of this in the not too distant future.

-A

julienb
Posts: 1843
Joined: Sat Oct 29, 2005 1:15 pm
Location: France
Contact:

Re: observing clipslots/stuff and almost all in a liveset ??

Post by julienb » Fri Oct 16, 2009 5:50 am

to get fired clips & playing clip, there are properties from track object
it works very fine
it provides the "y coordinates" of the clip as soon as it is fired or playing. x coordinates being thé track number.


nothing yet from live.observe and adding removing a clip

just hope too :-)
Julien Bayle
Art + Teaching/Consulting

Ableton Certified Trainer
Max Certified Trainer


Structure Void / Ableton Certified Training Center

matcham
Posts: 36
Joined: Fri Mar 06, 2009 1:35 pm

Re: observing clipslots/stuff and almost all in a liveset ??

Post by matcham » Thu Nov 05, 2009 7:14 am

pukunui wrote:The best way to observe a large number of properties without tears is via the JS API object. My APC40 observer patch went from a nasty 160 odd voice poly~ to about 10 lines of code.

We hope to have some more examples of this in the not too distant future.
-A
would you share this "APC40 observer" patch ?
I would really love / need to see more JS examples.. :-)

thanks in advance

MathieU
________________
Mathieu Chamagne
http://mathieuchamagne.com

julienb
Posts: 1843
Joined: Sat Oct 29, 2005 1:15 pm
Location: France
Contact:

Re: observing clipslots/stuff and almost all in a liveset ??

Post by julienb » Thu Nov 05, 2009 7:15 pm

matcham wrote:
pukunui wrote:The best way to observe a large number of properties without tears is via the JS API object. My APC40 observer patch went from a nasty 160 odd voice poly~ to about 10 lines of code.

We hope to have some more examples of this in the not too distant future.
-A
would you share this "APC40 observer" patch ?
I would really love / need to see more JS examples.. :-)

thanks in advance

MathieU
I'm sure andrew works around beautiful and tricky JS examples for the release date!
:)
Julien Bayle
Art + Teaching/Consulting

Ableton Certified Trainer
Max Certified Trainer


Structure Void / Ableton Certified Training Center

Bugayev
Posts: 82
Joined: Wed Sep 23, 2009 4:08 pm

Re: observing clipslots/stuff and almost all in a liveset ??

Post by Bugayev » Fri Nov 13, 2009 10:12 pm

pukunui wrote:The best way to observe a large number of properties without tears is via the JS API object. My APC40 observer patch went from a nasty 160 odd voice poly~ to about 10 lines of code.

We hope to have some more examples of this in the not too distant future.

-A
Where are the existing examples of JS API?

Thanks :-)

Nick

julienb
Posts: 1843
Joined: Sat Oct 29, 2005 1:15 pm
Location: France
Contact:

Re: observing clipslots/stuff and almost all in a liveset ??

Post by julienb » Fri Nov 13, 2009 10:19 pm

I guess we have to wait for several days before getting them...
Julien Bayle
Art + Teaching/Consulting

Ableton Certified Trainer
Max Certified Trainer


Structure Void / Ableton Certified Training Center

Post Reply