Best practice for fixed knob values
-
Ahoi!
If I want to have a knob with fixed selectable values (say 20Hz, 50Hz, 100Hz and 200Hz) and pass these options to a scriptfx as 0,1,2,3 what would be the best practice to do so?
I can have the knob go from 0 to 3 but then the displayed value on the knob itself does not reflect the Hz values... -
Here's one method
HiseSnippet 958.3ocsV0saaaCElxILK1asnsXO.B9Jmgf.IW6jFLTLu3jrZzlTiozfMTTTPIQESXJRAQpt3VTf9X1Gi9FzcHkbrxhQRqAltvV77624vOdnFmKinJkLG4z5rYYTjyOgClIzSFNgvDnQGhbtO9DhRSycKEcvrLhRQiQNNq8GFANMWGYe9xuc.gSDQzEhPnykrH5KXoL8BoiG7bFmeLIldFKsl08FLJRJFJ4xB.Oqg8PYjnojKnmRLl0.idFQMA47K3PRnGIJIY2tgOIwqW29cCC6E2CjDt296ueReeR+GuWTDxYiihYZYdflnoJHnGHimELQ9OhxDbNSwB4TyBeT.j4RwngSX73wyaNJDxY8wKZUqU1p9Y7IrX1UxWzxdfUg6BOp2zbZbaPx+6.RN0fz5kP5g3fnbVldgFCd9Q7HArClPf8l5PozVTiO6fGJAKD5cRISoGmCKtxiN654ssK7yV+ZqVLAmIntIEhHMSJbkhmKjg9Fuyk7NQxzLo.hy1tuivKna05CsZxkQDtaLSkwIyN2HV49T2W2tq2yde6sca2u5eeupW5Ze4MP5Z9BRHk6uihp6zVSuTCpuVfdsMMuAf1GAymWDWP0CmijNssHr8VlfTgygDNODnVctN7MEXKfApz.5ycKyM.0kG1R0sMNUqcbpTSeonisva8wVt+WUIIKUWEB3z7kp1bNI+1brinHMjlWusaLD3EWmrsw2FYKprhqYnTLRvzuLiVs9XIO1PhLueSpIppkYHoUHDLUaon2uhhFvYwzbDCBxOfsaCHK3qO8.8pQGRzj4gAhHjkLZtlYJFmCouCltTx7ahOjplpkYvfhq1k.p+clzKWjv+dvrEKXCT5YlVyFVCQvLvr.16AAXr+NdnTRMO2bfpHIgcocJUBimpzP5FkBCuPNOB+JE0MllPJ3ZW0TXJAbJZJM9Lo09TVbLmNVpXlM05CTQ0pDbYkbupJwR+rExl3RpXsJ4SmWqR9DYf4nioPLG4f4u2XrALvRFWvI5qOEyLeuRgAX0GcXFOH..OqNb+NFs4cqi19Vg3CwiY5nIKGiMVBFAlz+GXr5Bg6gOJIgFoW.v0wG+Wq5z+6H8+orPyDWbBAXZvNO9zhz.3hyHJjcgfxgficZXNKVt1yr1zABnhX6huBOUJ8MqcpT5OWIvwixkuMp7Dr4JmMsR.LIrWI2D91.Xs6RN5BjZ1aM2.WOT2vwtqpiOdUcr2p5X+U0wcWUG2aUc7I2silOP42KzxzxiMHzIiOxNp0w4HAAXfV1J5eAg8hxvB
If it was for my project I wouldn't use a label, I'd draw the whole thing with LAF, but the principle is the same.
-
@d-healey yes, I'm definitely aiming to use LAF to display the values, that much I've learned from you already ;)))
-
@d-healey so to my understanding the step size of 1 is what makes the button snap, so all I have to do is use a script to display the correct values
-
@Morphoice said in Best practice for fixed knob values:
ll I have to do is use a script to display the correct values
Yes, you can do this in laf, just like I did in the button callback.
-
-
@d-healey how would I get the new data in the knob's pop up value?
-
setValuePopupFunction()
HiseSnippet 965.3ocsV9taaaCD.mxIbK1csXEnO.B9SJCAExt1IMXXntwId0nMoFScAannnfRhJlHTjBRTY0cn.8cnun8MX6HkbDcqS6fwp9fsHu+ve73cG0rbYDsnPlib57hEYTjyOfCVHTyGOmvDnoGibtC9TRghl6VM0QKxHEEzXjiyV+pdBm1aiLOe7QGQ3DQDsYJD5bIKh9LVJS0L6rQOkw4SHwzWvRszdvnoQRwXIWVB7rE1GkQhtjbA8LhVsVXzSHEyQN+DNjD5ShRR1ue3CS7GzeX+vvAwCfYBO3vCOLYXOxvGbPTDx46NIloj4AJhhVfb19HY7hf4x+RTs.myJXgbpdPOT.rxUSOQxi0aQ8rnwyY73YKCTEHvKyZBaaUE1tG9TVL654aBe+nQfaiE1APmVqh2VqfWOa77svaMH4Xgz1UHcWbPTNKS0HQyysvSEvoYBANmrQoRWTqOzBOVBZH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