Can I force a Widget to always display Label rather than Caption

Widgets assigned to plugin parameter will display the parameter value when changed. But they return to either a Custom Caption or the Plugin Parameter Name.

I would like it to always display a Label that I control via a script to translate values (0-1.0) to words. In this case, I’m using a slider to control a step function with 4 settings. I’m changing a GP Mixer Output to switch between different reverb plugins treating the mixer as an assignable “Effects Buss”

select
newValue == 0.0 do
SetWidgetLabel (GtrReverbSelect, “Plate”)
newValue == 0.33 do
SetWidgetLabel (GtrReverbSelect, “Vintage”)

That works, but the display only flashes to “Plate” it then returns to either Customize Caption value or if that is “off” then the plugin param name.

I want to it show “Plate” until the script sets the next value of the label.

Is this possible?
I can’t find a function for setting a widget Customize Caption (as the UX calls it).

1 Like

Yes, you have to assign a temp. label (enable ‘Customize Caption’) and make sure, that ‘Show Value in Caption’ is OFF and ‘Hide Temporary Value’ is ON

thanks, but that doesn’t appear to be working. I see the script-set label flash and “temp.” displays even though

Hm, then set the caption of the knob to blank, add a text label widget to your rackspace and use this. I use dedicated text label, e.g. to show up Leslie speed or Chorus names. With text label widget you are slightly more flexible to change font and size

thanks. I did that already as a work around, but I would really not like the extra overhead of managing an extra widget and scriptNames to just replace an existing widget label.

Displays low or high (based on the script) as you move the widget while it’s attached to a parameter.

Not sure why it’s not working for you

@dlwhite66 Maybe it’s because you test for exact values in your select statement…
I used value intervals and it works perfectly as it should.
In my script, i packed the test-operation for the widget into a user function, so it can be called easier on various situations (Initialization, Variation change, activation…).
This prevents the script from running into undefined states which would not be handled otherwise.
Also it might make it easier to maintain/extend the code if needed.

setWidgetLabel.gig (37.5 KB)

var
knbTest1 : widget

//user function to read the target widget's value and return a corresponding string
function testKnobCondition (testObject : widget) returns string
var
tVal : double = GetWidgetValue (testObject)
strCondition : string

Select
   tVal>=0 and tVal<=0.25 do strCondition = "Condition 1"
   tVal>0.25 and tVal<=0.5 do strCondition = "Condition 2"
   tVal>0.5 and tVal<=0.75 do strCondition = "Condition 3"
   tVal>0.75 and tVal<=1.0 do strCondition = "Condition 4"
end
result = strCondition
End

// Called automatically after script is loaded
Initialization
    SetWidgetLabel (knbTest1, testKnobCondition(knbTest1))   
End

// Called when rackspace is activated
On Activate
    SetWidgetLabel (knbTest1, testKnobCondition(knbTest1))   
End

// Called when you switch variations
On Variation(oldVariation : integer, newVariation : integer)
    SetWidgetLabel (knbTest1, testKnobCondition(knbTest1))   
End

// Called whenever the value of the knob knbTest1 changes
On WidgetValueChanged (kVal : double) from knbTest1
    SetWidgetLabel (knbTest1, testKnobCondition(knbTest1))
End

…hope this helps?

1 Like

thanks, but it is not because of testing for precise values. I get the behavior I want regarding the state label displaying briefly. But I can not get the state label to NOT be replaced with the caption or plugin param name.

Did you follow the instructions that I posted earlier? The labels stay on for me

1 Like

Maybe then i don’t understand the real issue.
Uploading a gig file (stripped down to just represent the issue) could be helpful…

I did and it isn’t sticking.

Have you tried the test using the MIDI In block that I used as an example?

@dhj thanks for responding. I’ll copy your example later this week, but I don’t see a significant difference between your example and mine.

I’ll try to build a file with just this content to see if I can isolate it.

I don’t either - but that said, my version works :slight_smile:

I figured out what caused the issue, but not sure why.
The offending line is “scaledValue == previousScaledValue do Print(…)”
Effectively an “if the scaledValue hasn’t changed, then do nothing” statement.

With it, the text changes only when the scaledValue changes (a 4 position switch), but what ever is in the Customized Caption field replaces my script set label value.

If I remove it, the label stays set by the script, but the text flashes for every change of widget rather than only changing at the scaledValue break points.

It would be great if there was a Callback for onWidgetScaledvalueChanged
So for stepped scaled value, the callback was only triggered with the scaled value changed.

I think that would not be possible as the callback reacts on a changed widget, independent of the sent out value.

@pianopaul yes that’s true for the current callback. I was requesting a new callback … that is definitely possible, but only if the developer thinks its as useful as I do. Given the number of effects and sound source plugins that have limited, but multi-value (more than 2 less than 100) parameter states. For a parameter that has, for example, 4 states. having a scaledvalue callback would prevent 96 unnecessary event triggers.

Why do you think that this is definitely possible?

You could send the scaled value to another widget and react and the callback of the other widget.

@pianopaul because coding a callback is common practice which GP team has already has done many times.

I’m not saying we, the customers can do it. The developers would have to do so.