label control knob
-
Hello, I'm looking for a way to control a knob with a label. I can display the value of the button very well but I would like to use this same label to control the knob.
for example if I want to write 144.47 hz on the label, the knob is positioned on 144.7
this function is already possible on the original knobs but is no longer possible when importing a film strip.
if you have a idea... thank u -
@yall set the label to "editable", add a callback function for it and in that function, set the value to the knob.
To read the label use the parseInt() function
-
@yall Labels have their own callback, so you can use them like any other component.
When you hit enter the callback is triggered. Use the value to set the slider.
Don't forget to callslider.changed()
at the end so the slider callback is also triggered -
const var Label2 = Content.getComponent("Label2");
inline function onLabel2Control(component, value)
{
parseInt(FREQ0GAIN.getValue(value));
FREQ0GAIN.changed();
};Content.getComponent("Label2").setControlCallback(onLabel2Control);
the compilation tells me ok but nothing happens, sorry I never used this function
-
@yall said in label control knob:
parseInt(FREQ0GAIN.getValue(value));
try FREQ0GAIN.setValue(parseInt(value));
-
@ulrik actually it works better like that. thank you so much