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

How to identify return tracks selected?

Submitted by Golden Frog on Tue, 12/13/2022 - 14:36
Golden Frog
Control Surface Studio User

I’m trying to navigate right and left through return tracks with MIDI buttons using Reactions. I can do it if the track selected is a regular track in the session, because I can Identify the track position number using this code for example to move to the right:

track = self.get_selected_track_num()
a = track + 1
self.set_highlighted_track(a)

The problem I have is when a Return track is selected. I don’t know how to identify in code that s a Return track selected, and get its position number. If I use the same code above, it selects the second track in the session, not the return track, because I guess it’s assuming the track position is 0, but from a regular track.

However this is the weird part and I don’t know if it’s because how python works (I’m newbie in the language). If I try to use the following code to print the position number of the Return track selected in the log:

track = self.get_selected_track_num()
self.log_message("csslog: " + str(track))

In the Log it shows “False” instead of a number.

My question is, how do I get the actual number of a selected return track and how I can then highlight the one to the right or the left?

Thanks.
Nigel

Topic Category: 

0 Responses