🔥 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.

listener for any clip playing

Submitted by tobiassen on Wed, 11/09/2022 - 20:31
tobiassen
Control Surface Studio User

Is there a listener for something like 'all tracks playing status'?

Or the possibility to get 'true' if any track in the whole set is playing a clip and 'false' if no track is playing a clip?

I could do this for single tracks by using the positive or negative index I get from the following code:

self.song().tracks["track-id"].playing_slot_index >= 0
self.song().tracks["track-id"].playing_slot_index < 0

I want to use this to lighten the LED of my "stop all clips" button but only when clips are playing.
Currently I could implement this with my workaround for only the 4 tracks in my session box...

Any further suggestions?

Best,
Lukas

Topic Category: 

2 Responses

Comments

tobiassen
Control Surface Studio User
#1

ok, with a loop on "tracks" and this:
self.song().tracks[loop_number].playing_slot_index >= 0
I can at least lighten the LED when any clip is playing.

I cant detect when no clip is playing (or all clips finished) with playback still on though...

tobiassen
Control Surface Studio User
#2

If anyone is interested, I managed to do it:

listeners to:
song is playing, transport stop button was moved, stop all clips button was moved

1st action:
send the stop all clips LED an off value

2nd action is to check for any clip playing with the loop thing and light the LED in that case:
self.song().tracks[loop_number].playing_slot_index >= 0
and send LED on

3rd action:
stop all clips button

The order of the actions is crucial...

Hope this might be of use for other users too!