Get clip start/endand loop start/end at a time

Questions and discussion about building and using Max for Live devices
Post Reply
Crubier
Posts: 51
Joined: Thu Nov 05, 2009 8:37 am
Location: Toulouse, France

Get clip start/endand loop start/end at a time

Post by Crubier » Sun Aug 08, 2010 5:26 pm

Here is a simple device that I made which makes it possible to get the clip start, clip end, loop start and loop end of a clip, without changing the looping state of the clip.

Just send the object id of the clip in the right inlet of the "p getter" object.
A bang into the left outlet will trigger output.
Unfortunately, ther is a live API limitation that prevent us to trigger the ban automaticly when the clip changes : "Changes cannot be triggered by notifications"

Hope that this is gonna be usefull.

Code: Select all

<pre><code>
----------begin_max5_patcher----------
1874.3oc6b0siahCF85LOEdQ8xoivFyOdk1UZ6M6k6CPU0HRvIwsDLBbRmtU
8ceM1jDfgebRCy.yVUUnwFrO93y2m+L1te+tEVK4OQys.+N3ifEK99cKVnRp
HgEk+dg0tvmVEGlqdLqX1A5CB5SBq604dHLKIbGs8L46EwTg3aoTccXYcu7u
fOUl8NdjJC6xeyhTECe4meODRNVHoghUaYIadLitRnKGWeuGruG3D3WbyUcE
Aev9TIq.QQY82TAHLNF7amKsLIbEzrGoIgKiU0OrLuj86XIR.m2HQcyPkJpL
07vCznGCEhL1x8B54+UdI4UxdEDT7dJe8wjOldUjjKno4UHhFvb+tR1SVTvB
FTdGchEq+vOkxSnIp1tjOZ4I1mvD4huU1va6I1I6v6982IoHETaM2ic0nVxi
IqYVXbEdusRHeKOSzohpQAdfky5orj5qisEjeq3MLIgKBELdximpy1ppXdxF
y.UQc1GCEyR9RQIk2GnqaWznQul2IL4YQzrtdSUOemuZdJkFEyTRMac1+3t6
NeSc8G2cug9IRneUZFa0zbLErQ5OPhwNcPbxDdMOQjy92Rc5Cs5iHnGeDdPT
gaALV4cPeEFTwGwJdLOS+rEEu7BlDX6PtWo7AUcmTyw.pB.OoI9qLozF7Adb
jUq9MfUAptOppSh0rX5AZVtTHV4oWXct4fbK.kGQcEq.LNv9LFkcHah4q9BM
pZ+uUDc8kTF7TZx4m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i7oluPyEKNSKqyBwhuQ.mLwn7YpeEEi6YRrrjoGtcM.2s337U
G2XSvcvzC2NlnSlf7MxHOJdSOfCMB3SPF2nAefSPWgAl5BGN+vsNzvYIvmsL
NZtBbmIEvCfF6TwdhM+d6Kxc3T5KXAmmgz11zw5hxclXhEGiQNdhgbimrbKe
vqWW0h4b9sLBwxDkMgpmuZ8p10ygqt0iO3UclC2DyWFFWd7Le1YA1jijXOY0
0og71e9ZUGDQiOAsDRuGfV8YfHPu+xe1g2o8iK+EcpXsucsb1Zv6XPve9G1.
wVZRwOtIGx3.29nHGO8FuQs5tD7HPQvqfhpuECppN3ozLw2.qYYRqq7Xt3QV
RD8oaCS402+iMnUQP8NUF5.at2BtEmw5amZpbOCjSyNz2gU+9Kjg76UKUZgo
oFDoewzUwPnaoXJTrETvSOVrqUDYgq9R9oso0OoRpuy0ueIOg07DDMCTREbU
+pnKUIQ5kgJ4D09WyENBdkbl5DDA2moFRu29cUNrcClHDzkYoAVEyRU9vyAu
Cp90Mw3i3Y.yo2.uPBdjM9TEa88phlIaFWaIe970aq123oyPYq8Q5ddXrsGB
6y5dMETp+yMpR8MMP0EPUvWPpJv.phPdQYp.WSvj2KKl7M.SM.9niIS56Bdg
66HFnxUj4KmHOvyDdx+k0afIXhf+Ivj7G+3t+CfwSZcM
-----------end_max5_patcher-----------
</code></pre>

Last edited by Crubier on Sat Aug 14, 2010 5:07 pm, edited 1 time in total.

Crubier
Posts: 51
Joined: Thu Nov 05, 2009 8:37 am
Location: Toulouse, France

Re: Get clip start/stop and loop start/stop at a time

Post by Crubier » Tue Aug 10, 2010 4:08 pm

This new version is simpler to use.
Only send a clip id to the inlet, and the data comes out automatically.
Live transport must be playing because it uses a metro object.

Code: Select all

<pre><code>
----------begin_max5_patcher----------
2257.3oc6cstbiaBE92IOEZ7r+z0Cf.jnyzNa29XrSmLx1DG5JK4Qhjca6z2
8JARwVw1hicrbnQIYhczEi+3iyMN.h+41alLO+GxxIA+bvWCt4l+41atwbp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t6
3HrmkmMNXj6YYR.AWXIzyP9fq2x3amwSWKk2XngLi8sb6.NYylEJx43Qyx9L
Nd6DXnyAzlQfOxL7.liFrJKdfE9FLsFvoND6Y563PvHm5YHGr2ALyyjVfy4d
VFSpCkHFraMreAb3VQ8LFGzLJ.E4e.m.B3dnLNjjvF4gDNE.tEw9GtYPvsGx
2bHxIB+C2QfTL8KfCNcldn7Ml.MnVOymIFCNiG9FxgmxCOC4BvY73RA7lSVU
Cr6IDkIOIWdmcxZeWhVWnl+n1NSU2oF7p2tD54Rt1oFVklOOIsYuq34xnSIu
GhdYYc6VVv7psA7UrUhjlmrzt5EN9VIRH19fx17DJjw5cqDgAbqDY.1eP14Y
P3kgaraFEt2iUnzcdHYcDhQHtbDC5HDykqlqtO3SJbvu9Kn.8Cxr5CbKfDZY
.AsOdH9MT.47DN5tpa1U5HeirP+WA2qJpr7TllquSksT9C.pRLKGEt2CCrNT
E+bnJxaHUcLaL1kQSor3o92yhZjivMO295UgJN5xwNjSkcldwElRzODTyS2U
uPtzEI0arAnd3JVjXWIolGmTGSRJ98jjTMWAfYhQGd+foCwbAsJGdNBQSeCH
nV0Lq909OKm631h9+UB5zzzBVjp1XrgWF7Ir4H.LHSXeTiS6S4S3MlwMnq6B
3xxjuLj+F9b+o4RmzdcrbdzoK36Gg+giteuVWnXRzoebGaR7wupXhy.vSw9H
lhutscfjmnWULECASwQWWLI.HiG2Yg7M7XJFBOccsE7hlkifI10ESPz6DuFa
AUG7u29e.rgFet.
-----------end_max5_patcher-----------
</code></pre>

S4racen
Posts: 5208
Joined: Fri Aug 24, 2007 4:08 pm
Location: Dunstable
Contact:

Re: Get clip start/stop and loop start/stop at a time

Post by S4racen » Tue Aug 10, 2010 5:50 pm

Good work fella!

Thank you!

Cheers
D

Palmer Eldritch
Posts: 525
Joined: Thu Jun 23, 2005 9:47 pm
Location: Universe>Earth>Europe>Germany

Re: Get clip start/endand loop start/end at a time

Post by Palmer Eldritch » Tue Aug 24, 2010 12:24 am

Crubier wrote: Unfortunately, ther is a live API limitation that prevent us to trigger the ban automaticly when the clip changes : "Changes cannot be triggered by notifications"
[/code]
Exception: a "deferlow" object inbetween the notification and the Changes :)

So try a "deferlow" instead of the "metro"

Cheers, palmer
Live 8_3_4 + 4b7_32+64 -Suite- Max4Live 5_1_9 _ core2DuoMacBook 2*2,16 Ghz + external FW HD _ OSX 10.6.8 _ 3G RAM _ M.H. MIO 2882 + 5.4d208 Driver _ Faderfox LV1 _ Akai MPK25 _ Logitec wheel mouse _______ PeacE will be the SOLution of LIVE

Crubier
Posts: 51
Joined: Thu Nov 05, 2009 8:37 am
Location: Toulouse, France

Re: Get clip start/endand loop start/end at a time

Post by Crubier » Tue Aug 24, 2010 6:27 am

Palmer Eldritch wrote: Exception: a "deferlow" object inbetween the notification and the Changes :)

So try a "deferlow" instead of the "metro"

Cheers, palmer
OMG ! Why didn't I think about it before !
Your tip is gonna help me so much man !
Thank you very much !

So here's the new version :

<pre><code>
----------begin_max5_patcher----------
2051.3oc6b01aihCD9yo+JPn8i8p7aXiOo6jt89YrZUEIwM02RfHvsa2a08e
+.aHARCslWq0coUkTvfyy73YFOdrw+7lU9qSeQj668qdewa0pedypU5KUdgU
UmuxeezKahix02leh36oq+K+aMEoDunzW9f2NgRIxpK3gzDUt7uEkEBA2Apt
bxS6kIwBkttfUWbSZbZlACk2YwABODf425AKOs3f2WO87oOoNuBNDo17nLY2
8YhMJSEE.QkOKIjo+PeDF1nlLUi5GGDlGv2+XQxsZQpPL+EFto.kDsWe29+Q
lLJ16yowa8aBAQVEwUwbEOkLV7rHKWllz.vq7OATJQCMBU+A.ET9Ik2.pEsH
6hS27MgFVf5KtU7P+pkzChjSOQES23P66TlbHSjKRTQpJv27aN5oX08sZiQ2
cwxeHZinyGtMe5WeK6xjaSSJAQqmr7x0ecewCpEwximvs9NRhNbgGVklFuNJ
6YYtbcrnUaQg9dThbejRnjF7f.GeN49CYxDUq5RjDUTGOluIKMNtUUYJ44KT
xVwyxMhuK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