Detect playing position of clip - solution!?!

Learn about building and using Max for Live devices.
gavspav
Posts: 342
Joined: Tue Jul 12, 2005 12:43 am

Detect playing position of clip - solution!?!

Post by gavspav » Thu Dec 03, 2009 11:04 pm

Am I hallucinating or is now there a method of detecting clip position using the api?

See the code below. Was this always there? Or was it slipped in quietly?

Or am I just hallucinating? :o

<pre><code>
----------begin_max5_patcher----------
799.3oc6X1zaaBCFG+L4SgEmyhrwgDxztzpcYR8ztNMU4.NIdyXi.SWyp59r
O+BoosCHjlFqVocwDdvf+6e9+ieI2MJHbo7VZUH3ifuABBtaTPfMjIPPy8Ag
4jaS4jJa0BEzeIW9ivwtGon2prgUfkfk6htRJTUreSMOAAm.aBKpyYBNUY+P
n8Ak0pcQiZh5Bo1VPcZKbIQrNbbyUv2apVAQktgIVecIMU4pIZFR2ffollEf
ilDOFfRl.e3UXYV8p6CeH9w5UPxssU3EkLBGbojmEZd58iFYJFeZ3gKIYttv
oRHTuDpWxDuvvDzbSYbr82cPF7YfLq3RcO4LZQzM.QMHORDx06mZuDC6CEQm
CVjSqpHqo+iMonTVPKUaAEbxVilKjULESJNFrEcb9lCjMYgyrYVDgw1Ky5fT
POlOwtgNQtrhVdCs7zgSmdJicZPVIjEMyi5yJgV3Y.o06lSOgC2KbNHfboWI
I1TMTu7A5yTMMa.FJccEUATkjzeVAffTNq35JtTs6lcuHmInoxZg5w9EemNF
MMwMwksDZyJil2NMSNCvLUlmS0H34v7SfKqY7LvVYcIfTmwj.5pUZYC1PKom
LBa2WB6lSysqwgsXZg0+EsncJM0iT5qujbwUkqW55TvI3wlholRcA5Q8n1Ii
okSkbY4g+.sM2OzMaFJZ+1F5bUxCsWJvWTDNK80DmW89BmX3vo4L+Sy2mlS7
Pn4z+6MGj2DiF.Li7OL+L8FVJEn2omhkpaFNKmodI.dCKKiJdQqn3Rdm2jC2
Kh5YWdulT4B6xrJI3J8lXZkFn2r1sliSX8aINWWGqOO2+1MGXWUJyeOh1FGp
cmOy5irmw0X53LIE7505N7eNimWqhsVnSyF+vu5iUMal1shbLt2o872I2LTh
IdiAI7.XD5HXj88sGH3Y+4iVEXh+TvUoOXQ5N82zXf8pHiVoXBh8eJYechdR
c1O4+NFlyxJjLgpQBfu25f3wnHz.TDxaJJY.LxblaOBoH3PzzB+NvAGvHmUS
9an6YHnC2D1qbBO.IE6UEEOfAtDuqnCNrcJob5atezeAMwv7zA
-----------end_max5_patcher-----------
</code></pre>

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

Re: Detect playing position of clip - solution!?!

Post by pukunui » Thu Dec 03, 2009 11:29 pm

Far out.

First I've seen of it, and not documented.
How did you stumble on it?

Looks like it updates every 50 ms or so.

-A

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

Re: Detect playing position of clip - solution!?!

Post by S4racen » Thu Dec 03, 2009 11:53 pm

That's brilliant.....! Follow actions now solved....!!

Nice one fella!!

Cheers
D

gavspav
Posts: 342
Joined: Tue Jul 12, 2005 12:43 am

Re: Detect playing position of clip - solution!?!

Post by gavspav » Fri Dec 04, 2009 12:06 am

I just spotted it in api explorer and thought I'd try it out. Was it really there all along? Surely someone somewhere must have known about it.

I wonder what else there is to find? Sysex support? live.bugger (that was a typo but too good to fix) The lost chord?

Not sure if its quite up to driving video clips - 25hz (less?) is cutting it a bit fine - presumably it is running in low priority thread?

But with access to tempo information that doesnt necessarily matter too much anyway.

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

Re: Detect playing position of clip - solution!?!

Post by pukunui » Fri Dec 04, 2009 12:12 am

If you poll live.object with a faster metro for the same property you should be able to match frame rate no problem

-A

itsthejayj
Posts: 98
Joined: Wed Sep 27, 2006 11:01 am
Location: UK brighton

Re: Detect playing position of clip - solution!?!

Post by itsthejayj » Fri Dec 04, 2009 12:42 am


Tarekith
Posts: 19140
Joined: Fri Jan 07, 2005 11:46 pm
Contact:

Re: Detect playing position of clip - solution!?!

Post by Tarekith » Fri Dec 04, 2009 2:13 am

Everytime I get slightly motivated to try and learn Max4Live, I click links like that, my eyes cross, and my brain shuts down immediately.


:lol:

Machinate
Posts: 11648
Joined: Thu Jun 24, 2004 2:15 pm
Location: Denmark

Re: Detect playing position of clip - solution!?!

Post by Machinate » Fri Dec 04, 2009 7:35 am

haha, awesome. One more thing to check off the list, eh?

:RAWK:
mbp 2.66, osx 10.6.8, 8GB ram.

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

Re: Detect playing position of clip - solution!?!

Post by S4racen » Fri Dec 04, 2009 10:10 am

What is that exactly.....??

Cheers
D

mdk
Posts: 914
Joined: Sun Jul 31, 2005 3:51 pm
Location: Skopje, Macedonia
Contact:

Re: Detect playing position of clip - solution!?!

Post by mdk » Fri Dec 04, 2009 2:21 pm

that is a diff, i.e. it shows what has changed between 2 versions of the document. old in red,new in green.

the actual document itself is a dump of the LiveAPI from python, probably some kind of recursive dir(obj) type code :)
Pr0k Records - Bandcamp Facebook Twitter

technog0d
Posts: 265
Joined: Mon May 26, 2008 1:14 pm
Location: Philly
Contact:

Re: Detect playing position of clip - solution!?!

Post by technog0d » Fri Dec 04, 2009 4:14 pm

This is great! Just what i needed for some of my ideas in MSP!
Websites:
Max For Live Community site:
http://www.max4live.info
http://www.noisemakers.info

Controllers: Lemur, Ohm 64, Monome, APC40, Launchpad
Daw: Live 8 Suite
Audio Interfaces: Apogee Ensemble & Duet
Monitors: JBL LSR 4300

olivierseb
Posts: 230
Joined: Sun Dec 11, 2005 8:52 pm
Location: FRANCE
Contact:

Re: Detect playing position of clip - solution!?!

Post by olivierseb » Sun Dec 06, 2009 2:50 pm

pukunui wrote:If you poll live.object with a faster metro for the same property you should be able to match frame rate no problem

-A
thanks Gaspav and Andrew

here is a small patch exploring the 2 versions ( live.observer and live.object)
You can adjust polling rate

Code: Select all

<pre><code>
----------begin_max5_patcher----------
2926.3oc6clzaiibE.9r8uBBibXl.GkZe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jhKns6uPg7PnRqLoWuv2TjLmSFgHTbUhn5y
KQDQ+MNl28n9Jt9PP8dPMDokxsxmfNi659nfHO8R8dn2GNaTZgIarW2bhi93
tvX+WH4i9jDjzWRARKot4rDjLoBkP5kPITOKTvSF3D1Lg6+cBHX4oWp2CwBe
FhSrwYcIn8DmALEUoTXMAZZsJAI5dTOkWIxKwkEl31Y2Cn+Fx9+dGlG0W7J8
VbS4XNyKoZJ5R1nthB2krUQTe7HB0GqwL2kRyvKdRNkFMIkpz5gS29jaGKfL
PieLnVYCyObnOirql9ybI8lQTeEItm2JDe3KIsyoIHekozE9GwmfZHoMlFeD
IdZEIyIO5smul3nUf3onPglfBEvKWSvzlkieQuAjwE8FyFkosO5lG0Ww0q3j
.noWbRljjBOLIN.MC67OwzcUWJk5e9v06axa9H7RzzSoTxRpSJ+RxEj1YudU
EJwDrZ.5yEqTJSdMCkjV+A9DhgHw5SdojmV8IhOicbzzadGWLA4DX54YjkVN
w7IDBRZ4DU5QRuLV5kIjObJgMJP3AmnxzyoapOk1BNQjSOcbSONI2pV6oUGG
6is.bZsOg8JKeV5kInO4SCSX4K8Yrijdcb5s3TZ0mfBupxaZkI1TrnQSvEpg
GS6PocVmGPJs5Rdodm3kNfOteSbOn7YIVjVCSds9JR67MuVrV39Lvodvuc++
Gj1Pq+A
-----------end_max5_patcher-----------
</code></pre>
Olivier

PS: tested with live 8.1b1 ( not sure it will work with 8.1)
Image

MacBookPro17", mac OS 10.6.2/RME FF400 & FF800
http://www.olivierseb.com

Max for Live training sessions in Paris @
http://www.apaxxdesigns.com/

Max for Live training sessions in Rennes @
http://www.intouchmedia.fr

mastahlee
Posts: 40
Joined: Sat Sep 19, 2009 11:49 pm

Re: Detect playing position of clip - solution!?!

Post by mastahlee » Tue Dec 08, 2009 1:53 am

olivierseb wrote:
here is a small patch exploring the 2 versions ( live.observer and live.object)
You can adjust polling rate

Olivier

PS: tested with live 8.1b1 ( not sure it will work with 8.1)
This is great, thanks a lot! Hopefully this is undocumented only because they haven't finished implementing it yet and they won't change the syntax after officially releasing it as I plan to heavily integrate this into my sets.

It seems to only be an get & observe property as of now. I attempted the holy grail and sent a "set playing_position 0" to the live.object but no dice, get an "Invalid Syntax" error message in Max. Oh, how good would that have been if it had worked...

technog0d
Posts: 265
Joined: Mon May 26, 2008 1:14 pm
Location: Philly
Contact:

Re: Detect playing position of clip - solution!?!

Post by technog0d » Tue Dec 08, 2009 3:46 am

mastahlee wrote:
olivierseb wrote:
here is a small patch exploring the 2 versions ( live.observer and live.object)
You can adjust polling rate

Olivier

PS: tested with live 8.1b1 ( not sure it will work with 8.1)
This is great, thanks a lot! Hopefully this is undocumented only because they haven't finished implementing it yet and they won't change the syntax after officially releasing it as I plan to heavily integrate this into my sets.

It seems to only be an get & observe property as of now. I attempted the holy grail and sent a "set playing_position 0" to the live.object but no dice, get an "Invalid Syntax" error message in Max. Oh, how good would that have been if it had worked...
I just found this out the hard way... I created a patch that gets the current position of a clip and sends it to the Launchpad. A button is pressed on the Launchpad and that allows you to change the start position of the loop. This works on loop restart, but it will not allow me to jump to that loop position when set. This greatly prohibits me from doing stuff like mlr. I hope it is added soon. Otherwise i will combine clip position with a buffer in order to accomplish something similar.

Mike
Websites:
Max For Live Community site:
http://www.max4live.info
http://www.noisemakers.info

Controllers: Lemur, Ohm 64, Monome, APC40, Launchpad
Daw: Live 8 Suite
Audio Interfaces: Apogee Ensemble & Duet
Monitors: JBL LSR 4300

gavspav
Posts: 342
Joined: Tue Jul 12, 2005 12:43 am

Re: Detect playing position of clip - solution!?!

Post by gavspav » Tue Dec 08, 2009 8:12 am

Haven't tried this but I had assumed it was possible!

What do the functions jump In running session clip and move playing position do then?

Post Reply