push coloured border follow scene?

Learn about building and using Max for Live devices.
Forge.
Posts: 5828
Joined: Wed Jun 24, 2009 2:16 pm
Location: Earth
Contact:

push coloured border follow scene?

Post by Forge. » Sat Sep 28, 2013 7:55 am

I am helping someone with a set and they would like to use number keys on the keyboard to jump to specific scenes to save having to scroll around looking for them

eg. - each song in the set has about 10 scenes, then a blank scene to mark between them, and we would like to be able to map 1,2,3,4 etc to the first scene in each song

when you do this the screen in Live follows and the scene is visible, but Push doesn't follow. So I would like the coloured border to automatically follow

we are already using max for Live to link a Soft Step so I am wondering if there is a way to do this in M4L - anybody know?

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

Re: push coloured border follow scene?

Post by S4racen » Sat Sep 28, 2013 11:34 am

Yes its possible, use the LOM Navigator to look at each component of the Push control_surface, it's probably the session_control but your looking for one that has the function of call set_offsets... which needs two variable of track and scene to move the red box...

Cheers
D

Because789
Posts: 440
Joined: Thu Apr 28, 2011 1:26 pm

Re: push coloured border follow scene?

Post by Because789 » Sat Sep 28, 2013 11:49 am

Ah, that's how you got your post count, by double posting :P

I'm glad S4racen came to the same conclusion: viewtopic.php?f=55&t=197632
Live 9.5 (64bit), Max 7.0.6, Windows 10, Push 2, Korg electribe2, Bass Station II, Launch Control XL, Faderfox DJ3

M4L

Forge.
Posts: 5828
Joined: Wed Jun 24, 2009 2:16 pm
Location: Earth
Contact:

Re: push coloured border follow scene?

Post by Forge. » Sat Sep 28, 2013 11:57 am

awesome, thanks!

Forge.
Posts: 5828
Joined: Wed Jun 24, 2009 2:16 pm
Location: Earth
Contact:

Re: push coloured border follow scene?

Post by Forge. » Wed Oct 09, 2013 7:11 am

I can't find those controls (set_offset or session_control) in the LOM for Push - although there is one called "set_highlighting_session_component" which sounds like it could be it, but I have no idea what to do with it.

How long has M4L been out now? It's surprising how difficult I'm finding it to get info on how to use it.

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

Re: push coloured border follow scene?

Post by S4racen » Wed Oct 09, 2013 7:29 am

Session Control is a component, within it you should be able to call the function call_set_offsets...

Create a live path with a message of live.path control_surfaces (whichever slot your push is in, the first = 0) components $1

feed that into a t b l

take the l to the right hand side of a live.object

take the b to a getinfo message box

take the left output of the live.object to a print object...

Attach a number box to the top, and work through the numbers examining the calls that you can make to each component in the max window...

Cheers
D

Forge.
Posts: 5828
Joined: Wed Jun 24, 2009 2:16 pm
Location: Earth
Contact:

Re: push coloured border follow scene?

Post by Forge. » Wed Oct 09, 2013 8:21 am

great, thanks

is that def. for Push as well though? I went through the LOM and API navigators and couldn't see them.. I could have just missed them though

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

Re: push coloured border follow scene?

Post by S4racen » Wed Oct 09, 2013 12:07 pm

I haven't started that journey yet so simply basing it on every other remote script that has a red box... Some home brewed (like Live Control) don't appear to have the functionality nor even named controls and components...

Cheers
D

Because789
Posts: 440
Joined: Thu Apr 28, 2011 1:26 pm

Re: push coloured border follow scene?

Post by Because789 » Thu Oct 10, 2013 8:07 am

S4racen wrote:I haven't started that journey yet so simply basing it on every other remote script that has a red box... Some home brewed (like Live Control) don't appear to have the functionality nor even named controls and components...
Afaik it depends if the remote script uses the framework classes (in the _Framework folder). They're definitly used in the Push scrips.

The LOM is not really helpfull when it comes to control surfaces and I found that the same goes for the API explorer regarding Push. For components I use the abstractions “M4L.api.GetComponentList” & “M4L.api.GetComponentPathByName” to get a list of component names and their respective paths. For controls you can get this functionality directly by calling “call get_control_names” & “call get_control [Control-Name]” on a live.object that refers to the specific control surface. It is safer to refer to these in a M4L script by getting the IDs by the name of the component/control because the IDs changed already a couple of times since Live 9 came out.
Live 9.5 (64bit), Max 7.0.6, Windows 10, Push 2, Korg electribe2, Bass Station II, Launch Control XL, Faderfox DJ3

M4L

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

Re: push coloured border follow scene?

Post by S4racen » Thu Oct 10, 2013 8:35 am

Because789 wrote:
S4racen wrote:I haven't started that journey yet so simply basing it on every other remote script that has a red box... Some home brewed (like Live Control) don't appear to have the functionality nor even named controls and components...
Afaik it depends if the remote script uses the framework classes (in the _Framework folder). They're definitly used in the Push scrips.

The LOM is not really helpfull when it comes to control surfaces and I found that the same goes for the API explorer regarding Push. For components I use the abstractions “M4L.api.GetComponentList” & “M4L.api.GetComponentPathByName” to get a list of component names and their respective paths. For controls you can get this functionality directly by calling “call get_control_names” & “call get_control [Control-Name]” on a live.object that refers to the specific control surface. It is safer to refer to these in a M4L script by getting the IDs by the name of the component/control because the IDs changed already a couple of times since Live 9 came out.
Totally agree on using the names! Good tip!

Cheers
D

Forge.
Posts: 5828
Joined: Wed Jun 24, 2009 2:16 pm
Location: Earth
Contact:

Re: push coloured border follow scene?

Post by Forge. » Sat Oct 12, 2013 7:24 am

from Ableton support:
Please note that we can't offer M4L patching support.

See here: https://www.ableton.com/en/articles/max ... e-support/

This said however, I can give you a few pointers to help.

Here is the Live Object Model:
http://cycling74.com/docs/max6/dynamic/ ... ject_model

Considering that Push is the first control surface, point a live.path object at 'control_surfaces 0' and give the resulting id to a live.object.

For that live.object, send the message 'call highlighting_session_component' which will result in yet another id that you should give to a 2nd live.object.

For that 2nd live.object send the message 'call set_offsets 4 5' where 4 is the track offset and 5 is the scene offset.

This will move the focus. Follow the LOM for details on how to get the currently playing Clip and then use this instead of numbers '4 5' above.

If you get stuck here, I would highly recommend posting on the Cycling 74 forum:

cycling74.com/forums/

Forge.
Posts: 5828
Joined: Wed Jun 24, 2009 2:16 pm
Location: Earth
Contact:

Re: push coloured border follow scene?

Post by Forge. » Sat Oct 12, 2013 9:06 am

^ I'm trying the above and I'm not sure I'm doing it the right way.

I have:

Image

but I'm getting the messages "live.object - inlet: wrong message or type" and "live.object - call set_offsets 4 5: no valid object set

can any of you see what I'm doing wrong?

<pre><code>
----------begin_max5_patcher----------
747.3oc6WssbaBCD8Y7WgFdlxHIjDn9V6uQmLdjAYakAK7fjccal7uWgjwIN
M1FmRbuL8AChUqWNb1cOK7vjn3YM6jlXvGAeADE8vjnHuoNCQ6uNJdkXWYsv
3cKVK+Zyr6iSBaYk6rdyVvLPcu00Ba4RkdwzVYoMDbDtfmxJP4rrD.qflBS.
Y3TZB.UjBA2s+epp7QycG9.Bx5i27FsUKVI868oVknF74l5p9s0aVoz0RqGf
nmL1rw1aE+rHYTe2GIDzAhf4fm1usVFPa7LgdQbBHNFbWmGONYR2gj2YNJCS
SQ64HpiiHHBkhtHQgw+sRTqjFiXg7mXpRQcMvHsSalO2cx.H.5PKtxwrTFih
w3D.m2UmgXmpBi9VHN7qRbnqj3F0JqZ0VYpaiNFYnzDKKMiiITVW+nmlNYiH
d7ooxl5l1.rfo7BnCJItUEHNCVzsBRgb2BzyvzUPs62xH1JqlFHloBqsUMai
Mn2EcfgihmtV1ZTFqTWFBt2tO0LlIH6RkoRtUUJOqHfKOvgbH08zSJ7Ylb9Y
yOXz30+mcdtdcqzH0VgU0nOBzEtltLVF0UYQxySc3mi7YTn+vAbeRADk11eZ
7kRVpVrr18y1w0FmmcvurY05FsTaGpjLCWjVPxgDVWx3BRKn+kjVbLyxgVyR
ojmViNWgKe7KaGQYkSUp6FImliywb2HYJDsu.+BU49QjI+9U8YTdJMmfQ7Ko
5S9ul+upzSWWCnz8.z1TO0roctnTZ.vA2HgyNrF4VeF4F7eJhMdv4JL0u7iJ
7Orc1OlGMMaZK6C0g25G7zCYkz3Ds8MgG4E8HuVpppjdG5wYkxHlUK8TD7Uy
oWGhPWDQ3i758DQjAwPraFCgG.d32t7EFOH9AciQzkpfH2r5G9PpmeAK991g
QGTF6FhHLZ.H5VxPCAOj2HdBh1h0q21MRLDROTbi4tOLwlk3uToCW5GRD259
Vld+8u.Vrn0MQy5FmsoMLBZWAKdR284wI+.NxIDA
-----------end_max5_patcher-----------
</code></pre>

Because789
Posts: 440
Joined: Thu Apr 28, 2011 1:26 pm

Re: push coloured border follow scene?

Post by Because789 » Sun Oct 13, 2013 3:36 pm

Try that:

Code: Select all

----------begin_max5_patcher----------
729.3oc6W00jaBBE8Y2Y1+CL9r0APAj9V6eiNcbHJIgcLZFgjl1c5+8dUhoI
c+HltYc1sSePAubANdtv4B2e6MAgyZ1osgnOh9BJH3dvRPusNKACFBBWo1UT
or8NFVq+Vyr6Bi12lSuy0ausYiSiVZVrrBdbl5E4Vs0ZZpyKZVstoVW6Nzq5
MqL0UZW+PRGrZJ6GIX3+.M6fuv3Bd599ZsGnggQvC5qCsuV4JV1Mcs5Bm2ER
FKVPETIKBkwowPAQlEigB38u6J.C+neJNl2T6rlezOeDLzsirWqV0aO7SsFU
E5yMUkg8M+yauoqDJhdwboCMCU83jE4wHK7SSVyT0KtPBSJ6XpDOs8OIeQdo
7EkRho64KAmDmRRYLxaSRaErKTsP+PVqPUUgrZWdy74PgEkhXWvNT5yrCczK
1jo3XNmQoTnd+5NB+oIOxalUbUls5XnktepwSYIWEJSHhSjzTFOBweDQshlp
lVe2vwxLL3aDTKiH43rtZXFVBUHuB77P6V0VcYtmexUNWqYFjcvtmoGn5fv7
05Vqw5z0E94v2v9H00Oh4VZrk5slB8EnVjdd0BSWtMewyqafYGzM3PhIH3Ij
mKuTxaLIiqVNd10X6fPxiyRE3TdGK9dSBA94VdAKE4m4TQmOw0QK.EzrXIVh
YfX.i7pHjj7NWvVbMVglQYwLQJkH+uf8kH1zs2.U..usoJ2toctpPaQjKH78
2F8NQlVJNrKgPSlJ8E+3CKaqevEz5AbWC+AqZa1zVL7CNbIJzQHsTaAMakCz
qO1K7odszTVp6c3.lKMV0rJcOyhe5.83AlXT.Ka5AFaT.SL8.KcT.a5wEcT3
JY5AFjpDQNKvHSOvHiBXhS8Zp.14CkromwFEt3SOtviJRlL8QR7nXrWlZw9D
Tp0q21cj.+P6wDje+N+IZ3Q9uM09u8YGCagqfMzE+QDCUsPRXGjAdSqO03Nd
ZWNw9IDd8K.nOr44
-----------end_max5_patcher-----------
If something doesn't work as expected, print the output of every object of the code in question in order of execution and you usually will find the problem quickly.
Live 9.5 (64bit), Max 7.0.6, Windows 10, Push 2, Korg electribe2, Bass Station II, Launch Control XL, Faderfox DJ3

M4L

Forge.
Posts: 5828
Joined: Wed Jun 24, 2009 2:16 pm
Location: Earth
Contact:

Re: push coloured border follow scene?

Post by Forge. » Wed Oct 16, 2013 9:39 am

thanks again loads for your help

that seems to work! so I guess "route" is just to strip the "highlighting_session_component" bit out so it only gets the ID? How would I know when it needs it stripped out like that?

i.e. with "set_offsets" below it is clearly fine with the whole message

I've been checking messages by patching outputs to the right inlet of a message box - is there any reason this is different to "print"? You're aware of?

Forge.
Posts: 5828
Joined: Wed Jun 24, 2009 2:16 pm
Location: Earth
Contact:

Re: push coloured border follow scene?

Post by Forge. » Wed Oct 16, 2013 9:58 am

Now I'm having another issue.

the code pasted above works fine in terms of moving the red box to the scene and track specified by "set_offset 4 5" - i.e. track 4 (5) and scene 5 (6), but in order to get the red box selection to follow a newly fired scene way down in the scene (which is the main goal here) then I presumably have to use live.observer to watch for a triggered scene, and then feed the track and scene index numbers into it (i.e. replacing 4 and 5 with $1 and $2)

the observer part isn't working for some reason.

I have managed to get it so that I can feed in the variables so that the box moves to the position of the selected scene and track by sending a bang to the first message in the patch (in this case "path control_surfaces 0" - if I press that message box then the box moves as expected.

But I need it to automatically send a bang whenever a the scene selection changes or a scene is triggered.

Do you have any idea why this doesn't work?

Code: Select all

<pre><code>
----------begin_max5_patcher----------
693.3ocyVlraaCCDF9r7SAAQOpJHRapkdq8RQAZOkiEAFTRSsYfLkfHsiSCx
6d4RTcqibhpiiPunkQTj+y2rPd+r.bQydPgQe.8cTPv8yBBblrFBd78.7F99
xZtxMLbwVstQhC8eRT4L1Tby6y5sI2tQHqAsa7jCFa1pO1p2j9tVvKAbAWtB
it9wO2x0kqExUK6fRseDzrrnTVHJgDEGhnw8WQWa+kGlMydIbj9hDt0n7dcq
g8tEA+sEeMh2Jh9LnuBpMKMTcUIHguHqf8C34zEo8V+QiTK4abtC9icBdM5S
M0UmAZryjR7S2LQrto2bYScSmGEwQrEr37rPySY8OvxoDVZHhXQxonrPpGEj
IyoV9RRXtaYWVLqQEn5gv4b1kCmzmGmCm.FhviiO4rHyMCkXuB7rATJ9J3I7
osqoE5z2gDpk5NwpUPGTMHuxOGdQOmzumvqQwIJym.QH9zoKadTsXGD0Tnft
cP2fkmwWN9P+GJOyyhmmSckmj7jXW8YruP8YKOGc9GMO0BzT5gxyG+IEeGTs
z38l+YIWaReL8s8M5C9McCvKMIXJgRCxRum3r6BKWxfiwEVOXf4BVnOepBLu
TvYdLMhZCNTWROi7p5cdxlCFjhrvcoBzncB3VjxtGkB8Nx.nljj9edOBRRlC
TKRdy5QnWKTUvNQILDgnjIKY7j65X2XNb76Om6xvRyGLCyMAFGWd746bSn09
eiQUy1txdA83A5PGJFp.kVH4Zg4veGFiiZ+wnVKpp.2.580JghWTCNPGOX.c
r5430ZXE4NL1DoniWqSvnjITQ1yBLBFEOgJhMFEcjteaiZVEQFEiHSHidYEw
ltZsjzQE0NWE4aNwaa2YO.heRchwzM+F+F0IgtWER+qtFs3NS669w6Zxh4cl
tiZSqwsc9F16yRvyrqyCy9ElrC2a
-----------end_max5_patcher-----------
</code></pre>

or a screenshot in case you don't have M4L handy

Image

I've tried putting a message box out of every outlet and all the right messages seem to be coming out of the right outlets, but nothing is coming out of "live.observer" either when I trigger scenes or bang the button at the top I stuck there just for testing

Post Reply