Color Active Channel

I love the new color stuff, but as soon as i colored one track it hit me,
it would be cool to be able to set a color for “active track” so when you TAB / Shift+TAB
around the pattern the color would change as well - sorry if it was mentioned before just quick reply

That’s a good idea for a tool if they won’t add it natively :)

that would be real swell.

Yeahh !! a full color track (like the tool auto color filter) but straight as basic funktion.
an Expand color for track button would be cool click in the color track menu and set a marker to expand track color
separate for all tracks ,please ;)

than we can fill track 1 in color , and track 2 stay clean , and than track 3 in color again. :)

yepp , by thinking of this ,… hmmmmm nice !

+one

Obviously native feature is the way to go, but this is indeed an easy tool to write. I would write it myself, but I simply don’t have time. Kids these days.

EDIT: I wrote some script after all.

Daughter slept for a bit longer than expected, I wrote this code instead of taking a shower.

[details=“Click to view contents”] ```

–[[Globals, capitalized for easier recognition]]–

local MY_COLOR = {255, 0, 0}
local MY_BLEND = 100

local OLD_TRACK_INDEX = nil
local OLD_TRACK_COLOR = nil
local OLD_TRACK_COLOR_BLEND = nil


– Functions

function revert_track()
renoise.song().tracks[OLD_TRACK_INDEX].color = OLD_TRACK_COLOR
renoise.song().tracks[OLD_TRACK_INDEX].color_blend = OLD_TRACK_COLOR_BLEND
end

function color_active_track()

local new_track_index = renoise.song().selected_track_index

if OLD_TRACK_INDEX == new_track_index then
return
end

if (OLD_TRACK_INDEX) then revert_track() end

– Remember color of this track
OLD_TRACK_COLOR = renoise.song().tracks[new_track_index].color
OLD_TRACK_COLOR_BLEND = renoise.song().tracks[new_track_index].color_blend
OLD_TRACK_INDEX = new_track_index

– Change color to bright red
renoise.song().tracks[new_track_index].color = MY_COLOR
renoise.song().tracks[new_track_index].color_blend = MY_BLEND

end


– Bootsauce

function start()
if not (renoise.song().selected_track_index_observable:has_notifier(color_active_track)) then
renoise.song().selected_track_index_observable:add_notifier(color_active_track)
color_active_track()
end
end

function stop()
if (renoise.song().selected_track_index_observable:has_notifier(color_active_track)) then
renoise.song().selected_track_index_observable:remove_notifier(color_active_track)
revert_track()
end
end


– Menu

renoise.tool():add_menu_entry {
name = “Main Menu:Tools:Color Active Track:Start”,
invoke = start
}

renoise.tool():add_menu_entry {
name = “Main Menu:Tools:Color Active Track:Stop”,
invoke = stop
}

  
Someone please package, improve, and maintain it. Put your name as the creator too. It would be great to see it improved.  
  
Bugs:  
* If you move a track with drag and drop, it kind of breaks. Need an improved strategy to keep an eye on "renoise.song().tracks[], _observable" ([More info here.](https://forum.renoise.com/t/selected-track-index-observable-questions/35605))

I thought of making what Conner did but with HSV instead.

Another problem is that it should reset the color just before saving a song. I don’t think that’s possible.