sharing: selected track, highlight scene and playing clip

Learn about building and using Max for Live devices.
Post Reply
naph
Posts: 257
Joined: Fri Nov 30, 2007 4:38 pm

sharing: selected track, highlight scene and playing clip

Post by naph » Sat May 15, 2010 7:49 pm

hey guys, i've red the m4l lessons, and gave a look at live object model:

http://www.cycling74.com/docs/max5/refp ... model.html

still i hadn't got my head completely around it, but i'd like to know if what i have in mind is possible:

clicking "select track X" on apc i'd like to have live showing me the currently running clip, even if it is not in the same scene as the one previously selected, so translated:
for every track selection event, i need to know if one clip into this track is playing, if yes, this should be set as the currently selected clip. (alternatively, would be enough to select the scene this clip is currently belongin, just to look at it's waveform)

if someone with a big bag of patience would like to spread some light on my very cloudy mind, i'd be grateful :)

---

edit.. device done, check it out here:
http://www.beatbank.it/naph/m4l/na.play ... focus.amxd
Last edited by naph on Tue May 25, 2010 1:28 pm, edited 4 times in total.

naph
Posts: 257
Joined: Fri Nov 30, 2007 4:38 pm

Re: uber noob question -> sel track, scene and running clip

Post by naph » Sat May 15, 2010 7:54 pm

actually, i'm starting to figure out some theory, but would need some help to understand how to put it together

get live_set view selected_track clip_slots
get for each clip is_playing
if true
set live_set view detail_clip with the currently playing clip

naph
Posts: 257
Joined: Fri Nov 30, 2007 4:38 pm

Re: uber noob question -> sel track, scene and running clip

Post by naph » Sat May 15, 2010 8:52 pm

so far i came up with this

<pre><code>
----------begin_max5_patcher----------
504.3oc2VF0aaBCDG+YpT+NX4myhrqiMj9V2WiopHJ3k3MvFgcZyV09tO6CH
KYgzPzRBR6AxIe2Y3O+3tK986uKB+hYizhQOh9BJJ5cumHvWvSTmiHbY5lrh
TKjHVKey7x2vSZi4jabf+B0qxoUotUaCoxg.9r+jfr0qdcoRWHcvci148qFs
yp9oDbRlR1IayZWW5rN29mS1Jkd4hZYlqQ+r49cg3hYfgF9klLkfdtaOM2G2
OpjMa.imzd8mbBxPmVBYfepVkVf9roHGCg+082ErdyjASqRo0ltTdHtVZbFT
fYKrRG5Uk7MjUV3eaj4Kb0oYeuWLR6GiObdXjdZLx3..EIMlOliiB+7TKqPU
svVX7uU8.KdxMBVBBXhmMxr5C6L8QBxtONEe04zb.MhXnqjOeH8li.mppU59
Ij3hL8hbRBES.BwXGRnaa0xwliyu5iwoTXjifk7e7bb1UuiqCiMiltVywa1f
ujQevoH.MEB7WT0ZVWm08DaYAZGUkKsNkN0oL5cRhueRqT44R8d8Tkp7Jiu+
sUGnmO9m5AKsvjwAnMw3HtjAIt3yUbyRlx8ENbATwPXaWcQTc3DLmV0giKNF
HcvDkdNZi9PL.QQyvrYrsqtLHkrufNhrSNWj5OIMO7u0PgPSUAr3FJZ1+jla
4d+hN3va9MPlTWt5
-----------end_max5_patcher-----------
</code></pre>

basically, it's just printing the id of every clip in the clipslot of the currently selected track, automatically everytime track selection is updated

now i need two things:

a way to have it starting automatically after loading the patch instead of having to click the first message
what to do with these ids to iterate the test clip is playing?

i know this is pretty basic stuff so forgive me.. but i'm a total noob and thought this could be a super simple patch to get started

naph
Posts: 257
Joined: Fri Nov 30, 2007 4:38 pm

Re: uber noob question -> sel track, scene and running clip

Post by naph » Sun May 16, 2010 2:24 pm

loadbang does the trick but only after the patch is opened in max editor.. is there a way to have it triggered as soon as the device is dropped into a channel?

naph
Posts: 257
Joined: Fri Nov 30, 2007 4:38 pm

Re: uber noob question -> sel track, scene and running clip

Post by naph » Sun May 16, 2010 6:49 pm

yessss! i'm almost there ! 95% done

<pre><code>
----------begin_max5_patcher----------
1029.3oc4Zt0aaBCEG+4Lo9cvJpO1UguAN6gIs80XpJhFbS8FAhBta8h1284
KDZZyn0N1JP1dnE4Kf+yONmiObHOc1GlL85564MSAeB7MvjIOo5YhoOcOS11
wjoqxueQYdiYhSq3+p95uO8h1wj76kl9KqyKtNuZY2H02IK4R4Cq41EXpYTv
UaGWTXNO0E6intS5l5JYU9JyoL8KaD4kfuVWVzM95b4haEUKmuguPZutoIWl
bA.NCpOPolFrKSddgptaknRIEi9g6tRMhGMqDTeIdd1Vkamto2ee1GzGUGtv
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HmdVGdzGcGpC+whTEE9
-----------end_max5_patcher-----------
</code></pre>


i figured out that my best friend for getting this job done is the zl object, veeery handy!

Now i only have these missing points:
As read on c74 forum, i had to use a deferlow object to avoid the error "Changes cannot be triggered by notifications", someone could please enlighten me about this matter?
What's the best way to insert a toggle(eg in which part of the path, and how), so to be able to temporary disable the autofocus thing?
How could be the message path improved ? i didn't use any trigger object, but i see many patches use it to have a more consistent message path..

hope someone can help me at least with those points :)

note: edited with the proper loadbang message
Last edited by naph on Sun May 16, 2010 7:56 pm, edited 2 times in total.

naph
Posts: 257
Joined: Fri Nov 30, 2007 4:38 pm

Re: sel track, scene and running clip [almost done]

Post by naph » Sun May 16, 2010 7:54 pm

ShelLuser, sorry i doubted about your suggestion, only i don't really know why it wasn't working for me the first time i tried it out. maybe there was already some kind of error ..

of course i confirm, loadbang it's working :) thanks a lot for the help!
Last edited by naph on Mon May 17, 2010 12:04 am, edited 2 times in total.

naph
Posts: 257
Joined: Fri Nov 30, 2007 4:38 pm

Re: sel track, scene and running clip [almost done]

Post by naph » Sun May 16, 2010 11:54 pm

for the disable switch, i think i found a good solution: connecting the main path coming from the observer outlet of live.path to a gate object, with a toggle feeding it's right inlet.

<pre><code>
----------begin_max5_patcher----------
1369.3oc4a00iahCE84To9evJpOlFgM17w9vJs6eippHlfSFukXGANSmoU6+
80XCjjYfLlf2.o8gID+A3Cm68d7kKY94G+vr4OHdlVLG7Gfu.lM6mpdlo6qr
mY0cLa9tjmWmkTnm3bN86hG9m4KpFSReVp6eahj1zq3fLiJkurmZt3ymC9Z8
XrT87UWjOGzbBaDbIOYmd5y+qbVRF3uEYoMiuOQt9QFe6pb5Zo4ZB8iW5s.f
BvkG7QKIK.vnkdGWI9gcLtBGZfiNcoJX+PuTPO04db1FXqmNT26+9wOTdTcX
g0DTF6I5RoX61ri7wSI4M2csMtk7E9HejSKnbYhjI3mvIHMW.CzeRp+730pE
ZLNTyh93NOmSVJMyb7hkqtmjz7UTdxCYzyF7LtG1AGW2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EUZkw9MpF0sts.uz2.d640WSXWBdigYmbNszk
WY73DyXsLzXXYg1YYGGpS+BHr.dk0RdLXOrucvKZjXOKgGo+xgvRAPBwTJKy
Fh5VNxqL1p.5We+cy3Uh8dkWSpEjp2.a.roki.N1NfOVQ61Y1I3Ic3Do2hQm
GNgLYW3vvIhclcxHk0lcY7BGoTdey51E606cvQXbogNxy7SPL1qoki.dj8.+
ZjopANw0.2N2gQZSUhch+8lSi0NCgnS2RU25lB6fAB7JeZ2AbqjtB5MnqpBT
fwCFqUb0sbyyv6YyFYAiRRqAV83H8N3plCiN0+U251gZ+gAZDj3VPaUg65eR
h3.8+6UUUvz3Iqa8FPW1g5v+APQGI4C
-----------end_max5_patcher-----------
</code></pre>

Markemark
Posts: 250
Joined: Mon Jun 22, 2009 3:51 pm

Re: sel track, scene and running clip [almost done]

Post by Markemark » Mon May 17, 2010 7:51 am

If you use the track selection buttons from you apc yes the clip displayed will be the one in the highlighted scene. But now hold down the clp/track button on the apc, now the current playing clip in that track will be displayed regardless if its in the highlighted scene. Kinda undocumented by ableton, like also holding down the track select button will open and close group tracks.
Selecting the scene without playing it would be nice but shift plus scene buttons already taken by session overview :(

naph
Posts: 257
Joined: Fri Nov 30, 2007 4:38 pm

Re: sel track, scene and running clip [almost done]

Post by naph » Mon May 17, 2010 10:25 am

Markemark wrote:... But now hold down the clp/track button on the apc, now the current playing clip in that track will be displayed regardless if its in the highlighted scene..
very good to know, maybe if i knew this trick i wouldn't have done this little tool, anyway i got it running smooth now.. if you got M4L and want to try it out, here it is:
http://www.beatbank.it/naph/m4l/na.play ... focus.amxd

don't know if it's kinda pointless or not, but at leats you don't have to keep the button pressed, you can always have the running clip selected as soon as you switch track.. totally useless in the studio, but i'm sure on stage will make things easier (at leats for my workflow)

btw, still open for suggestion on improving it :)

Markemark
Posts: 250
Joined: Mon Jun 22, 2009 3:51 pm

Re: sel track, scene and running clip [almost done]

Post by Markemark » Mon May 17, 2010 8:57 pm

naph wrote:
Markemark wrote:... But now hold down the clp/track button on the apc, now the current playing clip in that track will be displayed regardless if its in the highlighted scene..
very good to know, maybe if i knew this trick i wouldn't have done this little tool, anyway i got it running smooth now.. if you got M4L and want to try it out, here it is:
http://www.beatbank.it/naph/m4l/na.play ... focus.amxd

don't know if it's kinda pointless or not, but at leats you don't have to keep the button pressed, you can always have the running clip selected as soon as you switch track.. totally useless in the studio, but i'm sure on stage will make things easier (at leats for my workflow)

btw, still open for suggestion on improving it :)

Just checked your patch out, nice work!!! The ableton way sets the highlighted scene to the running clip in the track selected each time the clip/track button is held down. With your patch the highlighted scene does not change yet the current playing clip is in focus, very nice!! Your max coding looks real clean too. :D

Only thing I might add is the midi in midi out, or audio in audio out, because if you put your patch on a track midi and audio are blocked even on the master track, add a audio thru.

naph
Posts: 257
Joined: Fri Nov 30, 2007 4:38 pm

Re: sel track, scene and running clip [almost done]

Post by naph » Mon May 17, 2010 10:38 pm

thanks for the positive feedback Markemark, i just uploaded a new version at the same link, with the ability to choose between the "clipfocus only" behaviour or the standard "highlight selected clip". i think both can have good use for different tastes, also i want to check out what works best for me during the night
also cleaned up an unecessary duplicated "goto path" message

Post Reply