Vectorized knob with outside circle
-
Hi guys
-
I made the vectorized slider in the left picture (below). But it needs to be like the right one (a circle that follows the inner dot - outside)
-
Also for the knob value text on the Label I tried
Label.set("text", newValue);
in theevent.drag
but I couldn't figure it out.
Any help will be appreciated.
HiseSnippet 1874.3oc0X01aaTrEd2jtUcMDDf3KvmFrPWsFb8KIoklDEHo1IbsfVrvzBUnpx3cGaOjcmwZ2wIw2pHwuB9D+X5Oo6+f68blYWu653D5MWAh5V6rybdYdNuLyYNa+XoOKIQFaY698ymxrreamAyEpIclP4BqdcsrW2gZ8v4SoIIr.Ka60+Jjfs6srze92e4CogTgOKeJKqmJ49rugGwU4y9yG707vvioArumGUf6sOnmuTzQFJmEiKVKqoT+SniYOlhrslik8sOJfqjwCTTEKwx9VOTFLevD4YBC+OkmvGFxvAssF.JxL8wxv.Dw3rVclvCC5mYrIVfV5ma5qaL8Ov4Q7.9h4ycAuql.IWhh9C60tN30tH7Z85CO6Bv6VF38dNC7i4SU4TPr89oydEnyPzZsu3sb5HEJlP0HhdB63XXPOXb7HpOyayVspSfeps2FUL+ChIIJxozXx.dzzPFF0aS1mnSNZLloNZzHluxqpgLQSuJJetjeCcHKDEJakAw5HilJEv.upFxUyWyMpzrYePOJRrblhKXEU1IB4PCw8IilI7UbovabMRyleUnbHMjLsnjDAiEjPTRxXIYHajLlo0.wOlQQQ2nxK2nhqZBOAQkWUlfBAofp0H6uOQEOiQ9Rx3FIHfwLSuVm2p0gGd381ocMxtKQ43iSo.Vh63Fif77iBC4SSXd+T65D3+4qyY7.0jp0t6VEmbBiOdhBm84o5nr5MepsGQSKHld1B8uccx1qR+OXk5+AOuNYKiC2EcpBYbDMj+uXAOkFB179DuLozS3Uib2B5IhKpVCb44bAyQOu5p3BsCMbik3FCukWpOkztw1aA+4QTHgpeu5je5RVQyMWkUzbSiWBTOA9zrYWo5+wX4g6j5RuTr7vV6ry1c199qJVt48pS1A91V+UChK1q7lkSDCAmnIWUvB8PQvuuTaQ619dv9LicXdVmz9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h01wUvFDOR244s+8+i4Cr8GG9IYscV.72tL30sZnA+cbLscf3O0a8qe8AyyccO4fL6vLwqd5AKriT9O3.qK2cFzinL.Ozubii3tjTBPdVoVyv1uvJCyK1M8eJcS95B22yoOW4OY03csUfWH85Oa7l1a9FNlFNyA6sbN9G+KtQ76r3Ujr3bPMTdGmhcAeMusjm8ptrPZIG3OTJay5YGrh2mROAr4P0WFRiW18udYad8Wuik9CdeHWeNBZRj2XxoeeGsK+MI.qSIdyAvuqCTa3uAv0zl0X39kwbr5zimEM.5mxmAPU.Euvp11qg0ILiagiQ.MfIBzCvhJoDamUyAI1Ni3eIqQD0OV9hzKygaMuidFvtE5WIpqyivwj1YU8cbZ0nETbLf+Bee7fw6B9mUKyl2.Y15FHy12.Yt2MPl6eCj4yuAx7fqUF7sCe3LkLxj+CSz+H8sursOx7tnvsBV+WTvQERG
-
-
@Fortune I don't know about the first question but for the Text label I would set it here if you want the value from -100 to 36
inline function onknbControl(component, value) { SimpleGain1.setAttribute(SimpleGain1.Gain, value); Label1.set("text", value); }; Content.getComponent("knb").setControlCallback(onknbControl);
-
@ulrik Thank you so much!
This isthe latest version, I did like you said :)
Also I realized that middle point is not in the correct position. Is it possible to set middlePosition for this panel knob, and also decimal values like 0.1 or 0.01?
HiseSnippet 2021.3oc0XzzaaibkzNL0TacwtE8R6oYEJJnZk0G9izXa3t1Q1NUnaRDVsa5tXQP5HxQRSM4LBjijsZfu0a8TuzeL8T9AzeL8dOj9dyPJRJK6l5hcQiRjLm48w799MO1KV5yRRjwV1te47ILK6enS+4B03NiobgU2SsrW2gZ8j4SnIIr.Ka60eJBv18AV5O+yO6IzPpvmkukk0Kkbe1myi3p7c+CG+63ggmSCXeIOp.16dbWeoniLTNMFOrVVSn9WPGwdNEQaMGK6GdV.WIi6qnJVhk8CdhLXd+wxKEF7eIOgOHjgKZa0GXjY6ykgAnDi6Z0YLOLnWlxlXAboWtputQ0+INOiGvWretI3i0.H4TTzdXu1cIdsKJdsd+EO6B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vrtEtFEn9LQfdAzA3co.am0tBA1NC32KmQD0OV95z6Diolan2Azagtglqyyv0j1YW3wwoUiVPe0.9q88wBiaA1mUSy12CZ14dPyt2CZ16dPyitGz7quGz736jF7krexTkLxD+Caz6L8EOssOy7l8vTAq+M3+ZQGE
-
@Fortune Still have a few things to adjust, but here's an example (inspired from Hise documentation)
HiseSnippet 2549.3oc0Y0uaaibDmzILHxs9Px09Os+0dBEETIxxRxw4ZrgwYG+Qq5EmHDml6BBLtthbkz1PwUfbos0EjWi9W8cn8QHnOQ8Mnclc4GKoo84y.2gFEaGxcmY1eyG6L6NZXjviEGKhrra7pEyYV1+RmiWDJmt2TJOzZv9V1224TlmTDwoAecnXDYcqmtXNMNl4aYaeq+HRlciaao97e9pmRCngdrhgrrdsf6wdFeFWVL5ecmulGDbH0m8J9LCpezNC7Dg6IBDI.jtkSWq4Tu2QmvdNEIaIGK66bfOGfywRpjEaYe6mJ7Wb7TwYgZ5eMOlOJfguzy5XPP5gOTD3iHFG0Zuo7.+gYpdrEHkgEFhaoMD+Zmi3977wKLH2SMAofCS6g8RWE75YButWe3Ya.uaqg28cN1KhOWVLChsOOczKAc5IsV59+Jm8DgRVnryL56XGFAuL.dOZL0i41ua21D3Os1Zkk0+C7IwRxozHxw7YyCXnWuGYahJToyDl7fwigfD2l5oIp4alw+ZqQ1KhA1ChJ.5gjmQGwBH7PhHjQNi6CBXkk4gAb30wIgdRtHj7Nf1gzPVfaH36aSNuMYQahXzeq0JK+9UVtQfviFP.jIiDAvJ0H8Q.VY5F02upDPLQfO.8YTEyPi3bVjjyhASwr+7wu34tDMOuWSN9oIfT4zlahXni541FSNkwmLUlNq9EyooAAhy1C96HHdNFHq4dAb3o1j+j3TVD42S1OhNYBObRSS1homxFDNLhAfDXRFkvLmdFOLcEgmJMA87rInmC55GP8tQgQpiOUR63yFSSBjulFjv.yFRt4PaUk94F1VOkGcHUN0MS1fedWees2sJqAJWdIWihNkqABIZ9rQAMKbQMtd9mBFuR+D4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rhUyWX1u7eR5W70Et22YHW5Msd7tTM3Ehy9oFuoceeEGcKkK.6scN7a+YtU62M+qDIO0nBJeliYetuhuOj27w8YAzRFvuoTnl0a1oluwjAgPztbnHfFU07eqx57stdYo9A9FOt5XDTkHexDS+4NJS9mR.V2dmOY.78bfhD+e.b0sVeBbokHNVf54IyNFtGtGCOjMTECKhauDVtU+dW7cDPvkp7UufkkRmrWVMHbxdYS9yxZLi5EI9tzSXhaMuqZDPuCUeomMbNBemzKq7uiCVSZF2m+cddXhwUA6S87z+Fvy52.ddzMfmMtA773a.Oe4Mfm+vUxC98+tahTLSG+CCL7.0wvrsOP2Ibbqf0+Cf2MJmH
As you can see, everything can be embedded in one widget, so no need to add/set a label manually
-
@ustk great snippet, thanks for sharing! :)
-
@ustk Thank you so much for this awesome snippet!