How to highlight a toggle pad

Imagine you have a temporary toggle pad for requesting a globals dump, changing a patch etc… but you need more certainty you’ve actually pressed the button, so you’re preventing yourself from pressing it a second time.

Here’s code “showOrange” you could add to a purple pad as a function; that will convert it to Orange when pressed On and back to Purple when pressed Off:

function showOrange(valueObject,value)
  if value ==0 then 
    valueObject:getControl():setColor(PURPLE)
  else 
    valueObject:getControl():setColor(ORANGE)
  end
end
3 Likes

Immediately employed in my presets. Thx! I do a similar thing for symmetric CC7 faders: blue if <64 and red if >= 64.

2 Likes

That is a good idea: I sometime get confused between a bipolar fader that is on value -64 and a unipolar that is on +64. They look the same.

2 Likes