Do whatever to selected clip.

Dec 29, 2009 at 1:55pm

Do whatever to selected clip.

Hello everybody.
I’m trying to make a patch that does something that I can do with “m4l.FireSelectedClip.maxpat”, but I just want try another way, for learning purpose.
I ask the patch to get the selected_track id and the highlighted_clip_slot id. Each id is sent to a message box. Ok.
But the problem is :
how to translate the position indicated by these ids to a position that “live.path live_set tracks $1 clip_slots $2″ can understand?
I have something to do before packing the ids; I tried the “M4L.api.RemoteMatchIdToIndex” but there’s something I can’t figure out about this patcher.
Can someone explain me what to do with it; or if there’s another solution?
Thanks!
Jul

#47466
Dec 29, 2009 at 2:13pm

Hello, Crampe,

I am pretty much trying out in the same direction. I have taken apart the M4L.api.FireSelectedClip abstraction to see how, for example, “get selected scene” works. Well, it sends out ids that seem to be indexed in order of selection (???), and if a scene changes place it gets a new id. I’m aware that the live.path object can send out in different outlets, following path or object, this did not seem to make a difference in this case. Also, I was not sure if “path live_set view” is the right message to send and not “path live_set”, but second case isn’t recognised anyway.

Actually I have just spent an hour to try to post an embedded picture of what I am talking about on the .info forums, and now I see that this forum does not seem do like pictures either. If anybody knows a way, please let me know. To me it seems impossible to work like this:(

#170801
Dec 29, 2009 at 2:38pm

I was getting way to complicated.
I just fed a live.path live_set view highlited_clip_slot and a “call fire” (or whatever) to a live.object and it works.
The strange thing is that I’m sure I have started this way hours ago when I began this patch, but it didn’t work. Why? That’s the question. That’s why I was trying this complicated thing described before.
Was it me or a bug?
But I’d still like to understand how this “RemoteMatchToIndex” works. And why M4L.FireSelectedClip.maxpat is so complicated?

I don’t know either how to post a picture.

#170802
Dec 29, 2009 at 3:47pm

It was not bug, now I remember…
The original idea was to access the color of the playing clip. We can access play or stop by the path wich uses “highlighted_clip_slot”… but we cannot access color.
That’s why I spent hours searching for another way.
So, my problem is still the same, I have to use the path describe in my first post and find the way to “translate” those ids.

#170803
Dec 30, 2009 at 2:16pm

I don’t know why but I didn’t see that we can access the selected clip (not the clip slot) by the path live_set view detail_clip.

#170804

You must be logged in to reply to this topic.