Hey guys!
I was wondering if there was a way to make a label show one of 3 different names?
My use case is basically a button that is showing status of the tracks, when pressed it’ll hard mute or unmute, but it’s label would reflect the following…
Tracks On = Tracks at 100% volume
Tracks Off = Tracks at 0% Volume
Tracks Fading = When tracks are fading either up or down
Basically just a status indicator for when I use my other control buttons so it makes it easier for our volunteers to understand why something may not be working (forgotten to fade tracks back in, etc).
Hey @Adam_Molinaro,
Yes, that’s totally doable with templating. The Label field of a Button (or a separate Label element) supports template expressions, and AbleSet exposes both the volume and the fading state of every mixer group as OSC values:
/mixer/[group]/volume — the group’s current volume between 0 and 1
/mixer/[group]/isFading — whether the group is currently fading in or out
So assuming your track group is called tracks, you could set the button’s Label to something like this:
${osc("/mixer/tracks/isFading")
? "Tracks Fading"
: (osc("/mixer/tracks/volume") ?? 0) > 0
? "Tracks On"
: "Tracks Off"}
This shows “Tracks Fading” while a fade is running, and otherwise “Tracks On” or “Tracks Off” depending on whether the volume is above 0. The label updates automatically as the values change.
One thing to keep in mind: if your button hard-mutes the group via /mixer/tracks/mute instead of setting the volume to 0, the volume value stays where it was — in that case, check /mixer/tracks/muted in the template instead of the volume.
You could also make the button’s Background Color reflect the same states by enabling the Dynamic toggle on the color field, e.g.:
${osc("/mixer/tracks/isFading")
? "yellow-600"
: (osc("/mixer/tracks/volume") ?? 0) > 0
? "green-700"
: "red-800"}
That way your volunteers get both a text and a color cue at a glance.
You can also see templating and dynamic colors in action in the official tutorial.
Would that work for your use case?
1 Like
Yes I think this will work perfectly thank you!
1 Like