Setting the step size of the Knobs with a Button
-
Can setting the step size of the Knobs like below, cause issues?
inline function onButton1Control(component, value) { if(value) { Knob1.set("stepSize", "1.0"); } else { Knob1.set("stepSize", "0.01"); } }
-
Should work.
-
@d-healey Great, Thanks!
-
The Knob value is rounded when the step size is changed, but value of the controlled effect is not being updated. I also used
.changed()
but no luck. What is the tip for that?HiseSnippet 1103.3ocuV0kbiSDDdjsmcQFX+oJdFT4mzBAibR1enRQgW6XS4JjDCNjhGnXqwRisGhzLdkFkDCUpha.G.dhS.GgkKAuyQfa.zyHYKIuNNAW.9IOc2ey70epmtm9gBWZTjHDYXdxroTjwagGLiKmzdBgwQ81GYbO7gjHIMzJwTqYSIQQTOjgQ4OSYvvrBR+6O+zVDeB2klYBgNUvboeNKfIyr1u4ALe+tDO5IrfbQuaydtBdaguHF3SYrCZJw8LxX5QDUXkvHi6zwiIEgCjDIMBhokva1fIhK3IweJKhMzmpVz.M.1nDyn1SX9d8mmqQHjQk9YYd4jL+cvGx7XKrmo.OP6vJCQdMvnz5nTi+ATxHGkpjPoGhG3FxlJy7n3yah6wgOHiHfTmmJIwhJ0qLts.hfKqGPNi1MDVr.g8NNNaYsqiyi1qZ0pfdGIsNmDZ0mDBprLj8xNeQCqOwRWETeLU1YzHpqztVg.poQmC9AbwPEr4GL.rsHXpfCKrqo8pvv39LN0ZTL2UxDbKAW6RgJT3a6NGxVvl5GSeT0enpouvk3aw3dzKgCn.Mp2hv8NdznHpz58sZX8AK4VUftWUyplEMCg+bIrXXrjZq234m2dUuBRr0lDJzo7sMw2eHThZWLMRzlbhSqXoTvud4I0+pEnTmqUhXirSWXBqL0jQwS6ZvM2oCXeOs1VV0ZT2QcDlWoTDpeDcsQ6T2oQV3IA4NgvGS8rWqNsHaVsRULezZUtr8HgjdL2VmUUupp0xtFMZk9R2MeZ3Jcq5yDtNf173fgzv7ZpJP3hXwa2241c61MQXxEnf2iyjGOklttqv2ScqU8+WuW.JUYgtBkRYHDpT2S3do8DF3y7ngHFrI2Eq+7fzjOsep027SuWSz0AN4ifFrIN8KRA3I+9pd6SjDUuoTBAjbJMTxTZgw9zygl6IcpLw6SiNSJlpYbZs.nW2HmuL6.Oo4rrEeayf7CW192BH4BcaUps3Tt6sH4x.+iml6bZ9cMkzKUCmvCfh+ov2jKXdxIHCrwkf+IT13IR0p2UO550ZQCCGDdw9DYwIFpNOoNfBsBsoUsh4QL4r7iNWdLRkquPyIWg1MTFcKo6Cw8YR2IqlukVAeU0k+Gy2zgxuMNY9SFYqf690qcBbka2czLpbiSiu+7Z71wgmS67RMOtOtvPkBT5n3ftLeXhajpxoDjYpAUNoB3e7qezu+JkgFyuq9yWbPSkgsK9ZJt2NKaX2LCOPC4w4uuqL7jTCM+kWEnM7zk2imsrgON+l1s6Ic3DPvRD2x+K87FzWJhkL93CIffAWFwfFM.dnmKE9zx4v3n4RU5ZG0ZEkFP0RG13ufeoNanVaj5rwbm+ubFAD2PwKbSZrppTdCsEHu45moZBuWFVasneJFCiRQAvSHegqqp98CgZ+UiY6M.yNa.lc2.LOdCv7jM.yS2.LOasXTud+4wRQPRuMvP+N54ZFF4pzQ+MbiAHZE
-
@Fortune try this:
inline function onButton1Control(component, value) { if(value) { Knob1.set("stepSize", "1.0"); } else { local v = Knob1.getValue(); Knob1.set("stepSize", "0.01"); Knob1.setValue(v); } };
-
@Fortune or maybe I misunderstood what you wanted?
if you want the the value rounded you caninline function onButton1Control(component, value) { if(value) { Knob1.set("stepSize", "1.0"); } else { local v = Math.round(Knob1.getValue()); Knob1.set("stepSize", "0.01"); Knob1.setValue(v); Knob1.changed(); } };
-
@ulrik Thank you for your help I get it now ;)