🔥 Lifetime deal! Get Control Surface Studio for Just £67 👉 Click Here To Get It
Time left... mailtimers.com
⚠️ Lifetime licenses are ending soon, get yours before they're gone ⚠️
Your shopping cart is empty.

Clip Slot Color Index always returns 'None' - Solved

Submitted by ogan on Wed, 02/08/2023 - 07:20
ogan
Control Surface Studio User

Hi There,

I am trying to loop through clip slots in a session box and set led colors on my pad controller based on the clip slots color index.

Looking at track 0 for example...

self.song().tracks[0].clip_slots[loop_number].color_index always returns 'None' even when self.song().tracks[0].clip_slots[loop_number].has_clip returns 'True'

self.song().tracks[0]..color_index returns values as expected.

Wondering if I am missing something, or is there a bug here?

Thx,

Rod.

Loop
self.song().tracks[self.get_sessbox_track_offset()].clip_slots
Conditions
loop_number >= self.get_sessbox_scene_offset()
loop_number < self.get_sessbox_scene_offset() + 8
Actions
self.log_message("csslog: " + str(loop_number) + str(": ") + str(self.song().tracks[0].clip_slots[loop_number].has_clip))
self.log_message("csslog: " + str(loop_number) + str(": ") + str(self.song().tracks[0].clip_slots[loop_number].color_index))

Topic Category: 

3 Responses

Comments

ogan
Control Surface Studio User
#1

Doesn't seem to work in the static case either.

str(self.song().tracks[0].clip_slots[0].color_index) returns 'None' whether there is a clip in the slot or not.

ogan
Control Surface Studio User
#2

str(self.song().tracks[0].color_index) returns expected values

ogan
Control Surface Studio User
#3

This works as expected...
self.song().tracks[0].clip_slots[0].clip.color_index
rather than...
str(self.song().tracks[0].clip_slots[0].color_index