change hightlighted clip slot
Using the highlighted clip slot seems easier and more natural than creating a scene box that is 1,1. In particular, most of the things I want to do – like add clip and delete clip and fire – are naturally on a single clip.
Thus it is really nice to:
self.song().view.highlighted_clip_slot.fire()
which also works groove with delete_clip(), and between fire (in toggle mode) and delete I don’t need much more for live performance.
I’ve also figured out how to set the highlighted clip slot with an absolute value:
self.song().view.highlighted_clip_slot = self.song().view.selected_track.clip_slots[1]
sets it to the second slot (0 index of course)
To fully generalize it, though, I’d want a button to move to the next or previous one. Then I can fire and delete to my heart’s content.
I’ve tried doing things like using a global variable, but that doesn’t seem to work – how might I create a variable across invocations? I could maybe hang it off self….
global bb_slot
bb_slot = bb_slot + 1
self.song().view.highlighted_clip_slot = self.song().view.selected_track.clip_slots[ bb_slot ]
I notice the MAX documentation of the LOM states there is an id on every object. The right idea, is probably to iterate through the clip_slots to find which id matches, then I can find the index I am currently at, then I can set to the next one.
self.song().view.highlighted_clip_slot = self.song().view.highlighted_clip_slot.id - 1
but that didn’t work either.
I’d love the following:
An example of how to print things. I know there is a message thing, but the messages aren’t super clear about whether you need to fully cast to a str as well as enclosing in ” “.
A discussion of creating global variables
how to move the highlighted clip slot
Thanks in advance
-brian
how can i get a number of a highlighted clip? (i meam if i select a clip on scene 1 it should be like 1 )
to enter clip number here to delete automatio:
self.song().tracks[self.get_modifier_value(“m1”].clip_slots[0].clip.clear_envelope(self.song().tracks[self.get_modifier_value(“m1”].devices[self.get_modifier_value(“m2”].parameters[1])
Sign up
User registration is currently not allowed.