I’ve been having trouble trying to find a way to update the text of a label widget so that I can display the values of sliders as they are changed by the user. Kinda like a dedicated value display box that resides in the corner of my plugin. Would this be possible, or are there better, more efficient ways to do this?
In this attempt I try to chnset the label if a parameter changes. The metro is there to make the text updates slower than k-rate. However this doesn’t have any effect on the label and any printf instances within the nested if-then don’t output anything.
kmetro metro 15 if (kmetro == 1) then if (changed(gkcut) == 1) then Slab sprintfk "text(\"Cutoff: %.4f\")", gkcut chnset Slab, "Label" endif endif
I’ve also tried removing the metro and the if-then associated with the metro == 1. Alternatively I have also tried making the output of
changed a variable by putting it in its own line of code, then processing that variable through the if-then but that doesn’t have any effect either. Both this example and the widget retrieving “gkcut” are included in instruments that are always running. I’m sorry for the newb question, but why doesn’t this code work?