Simple question for M4L N00b!

Apr 27, 2012 at 5:42am

Simple question for M4L N00b!

Im trying to get my patch to highlight a clip slot in my project.
I have a message ‘goto live-set view’ patched to a live.path object. It’s middle outlet sending to the right inlet of a live.object.
Then another message ‘set highlighted_clip_slot 1′ patched to the live.object’s left inlet.

I know this is probably completely wrong, I have looked in the reference and the fact that it says you can set this value, aswell as it being a parent confuses me.

#63248
Apr 27, 2012 at 10:12am

Note that ‘highlighted_clip_slot’ is a children of song view, ie. an object to be referenced by ID number.

So your set message requires an ID as parameter, something like ‘set highlighted_clip_slot id 118′.
The ID of clip slots can be obtained by sending ‘path live_set tracks X clip_slots Y’ to a live.path object.

#228133
Apr 27, 2012 at 9:30pm

I have set my patch up like you said however the 'set highlighted_clip_slot' id 118 returns as invalid syntax in the Max window.
I attached a picture of my patch so you can see how i set it up.
Thankyou!

[attachment=192346,3785]

Attachments:
  1. Picture2.png
#228134
Apr 27, 2012 at 11:27pm

It seems my explanation wasn’t quite clear. Here is a patch to show the set up.

– Pasted Max Patch, click to expand. –
#228135
Apr 28, 2012 at 3:36am

With everything thing I want to do with the API. Is it true i need to first find the id of the item i want to effect eg. which track, parameter, device, clip, clip. AnD then apply it to a live object with the corresponding parent path?
In this case the parent of clip-slots is view?
Thanks for the time.
Also how can I save this chunk of programming as an abstraction so I recall it later?

#228136
Apr 28, 2012 at 8:43am

Usually you don’t need to find the id first, but highlighted_clip_slot is a special case (view as parent).
Ordinary clip slots have track and/or scene as parent, and thus can be accessed directly with the path.

To make an abstraction save the patch with some meaningful name and put it into your Max folder.

#228137

You must be logged in to reply to this topic.