change knobs via script
-
Ok so... Is it possible to change sliders via script? (other slider in PROJECT FOLDER)
Im working on a project that will enlarge a certain part of my plugin and I will need a bigger slider but, I don't want to just code it to do the same thing because its a LOT of sliders and if I can find a work around that'll be great.
Hopes this makes since to someone haha.
-
@BWSounds Do you mean change the filmstrip applied to the slider?
-
@BWSounds You can set scale factor of the knob.
For example if you want to make the knob 50% smaller:
Knob.set("scaleFactor", 0.5);
If you want to make the knob its' normal size:
Knob.set("scaleFactor", 1);
-
@d-healey
yes -
@orange
wont work in this situation because im using a custom slider -
@BWSounds You can scale a slider that uses a filmstrip. Just make your film strip twice as big. So if your normal size slider is 100x200px, make it 200x400px. Then it will scale up without blurring.
-
@d-healey
ok, so I make a new slider 2x bigger but, how do I add it to the project without replacing the original sized slider? and by slider I mean a actually slider not a knob, I can see that working perfectly with a knob. -
@BWSounds A knob and slider are the same control so I'm not quite sure what you mean.
Anyway you add the 2x image (which you should do for all of your filmstrips if you allow the user to resize the UI). Then you set the scale factor to 0.5 by default. If you make the slider larger then you adjust the scale factor to match.
Another way to do it is to have one larger slider and when the user open the window to make it visible (or however you have it set up) you set it to control whatever the small version was controlling. This way if you have for example 10 small sliders that all need a big version you can use the same big slider for all of them (assuming only one big slider needs to be shown at a time).
-
@d-healey
ok thank you, I got i!