Simple question for M4L N00b!

fhill2000's icon

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.

broc's icon

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.

fhill2000's icon

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!

3785.Picture2.png
png
broc's icon
Max Patch
Copy patch and select New From Clipboard in Max.

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

fhill2000's icon

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?

broc's icon

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.