How to use Loop Clip Slots?
Is there a way to loop through ALL Clip Slots (not just those in one Scene or in One Track?
I'm trying to set ALL clips as grey and those clips in the session box to a specific color according to track.
Already (to mark the tracks for a controller with no led or feedback) I have a color match setting wherein each of the eight tracks show a different color, which changes as the session box moves. This works perfectly and my controller's Red column corresponds with the Red Track.
I'd like to do the same thing with the clips but I'm having trouble. I've tried Looping through scenes and then using
self.song().tracks[self.get_sessbox_track_offset()].clip_slots[loop_number].clip.color = 15151170
self.song().tracks[self.get_sessbox_track_offset()+1].clip_slots[loop_number].clip.color = 16220729
and so on,
but I'm not getting the clips to be colored. (I am getting an error of course for the clip slots with no clip, but that shouldn't stop the clips from getting color changed, should it?
Can you point me in the right direction?
Thanks in advance for any help - from anyone.
Comments
If you have a set number of tracks in your session, you could create an action block for each of them which loops through the clips in each track number.
1) can I nest loops?
2) what condition do I bring to the clip slot to know if there is a clip in it or not?
1, no you can't nest loops
2, live object model > clip slot > has clip. Make sure to set 'clip slot number' to 'script > loop > loop iteration number' See attached screenshot.
Thanks John!
I've figured out how to do what I need based on what you've got above, but I want to specify the track programatically.
Before I try modifiers, can you tell me what's wrong with the custom code in the attached screenshot?
I've tried
self.get_sessbox_track_offset()-1
[self.get_sessbox_track_offset()-1]
and
(self.get_sessbox_track_offset()-1)
IF I use a modifier instead, for "self.get_sessbox_track_offset()-1" can I then use
M2+1?
John, please tell me what I'm doing wrong here.
My script crashes (i.e. syntax error and Live doesn't show the script in the list) if I add ANY version of Loop Clip slots.
If I add Loop Clip Slots, Track 1 with *no additional actions or conditions* - nothing else in the Action Block - the script crashes. I mean just adding it and accepting the default - Track - Number - 1.
What am I doing wrong? Or is this a bug?
John,
the example you have in respnse #3 above; does that work?
I can't seem to show any version of Loop Clip Slots that works. (I mean I can't see it in action anyway because the script won't load.)
(I thought it was my code (see response #4) but it seems that no matter what I enter, I cannot have a script which attempts to use "Loop - Clip Slots")
It seems there's an issue in the code being generated for it.
After selecting Loop - Clip Slots, click the 'switch to custom' code button.
You will see this code: self.song().#tracks#.clip_slots
Change it to this: self.song().tracks[0].clip_slots
If you want to loop through a specific track, change this part tracks[0] to the track number (minus 1).
i.e. if you want to loop through track 3: tracks[2]
Thanks John!
I saw that #tracks# but I had no idea this was no good! lol. That fix (I actually changed it to self.song().tracks[self.get_sessbox_track_offset()-1].clip_slots and for the session tracks I'm using self.track_num(1)) did it!!!
It also allowed me to free up that modifier. The track reference is working so I no longer need it.
This is amazing - it's going to be so great for my portable workflow!!! Thanks again for Remotify!!
Awesome, glad to hear this helped! :)