Paint routine for Natan
-
It's A Mix Knob, I Just Added That value / 4 , And It Works Perfectly Both Animation, And The Mix Knob.
Edit: No Just Animation Looks Okey, The Value Wont Go From 0 To 100%!!!
-
Can We Add Some Magic To This:
Panel1.setValue(component.get("max") + 1 - value );
And Bring The Knob Back to 0/1 ?
-
@Natan Yeah, like I said, you have to remap the range 0-1 to 1-4.
Panel1.setValue(5 - (value * (4 - 1) + 1));
-
@d-healey
I Set The Knob To 0/1.
And Did A Change Here:Panel1.setValue(component.get("max") + 3 * value );
Now Popup Shows The Correct Amount, But The Animation And Reversed :)
Any Idea? -
@Natan Did you see my last post?
-
@d-healey said in Paint routine for Natan:
setValue(5 - (value * (4 - 1) + 1));
WOOOOOOOOOOOW
yes Yes yessssssss
Youre A True LegendddddddddThat Did The Job :) <3 :man_dancing_medium-light_skin_tone:
-
@Natan The reason it's written so weird like
(4-1)
instead of just3
is because I just copied and pasted the calculation from the remapRange function from here - https://github.com/davidhealey/HISE-Scripting-Framework/blob/master/libraries/helpers.js -
@d-healey That Was Brilliant :) Thank You Sir
-
@d-healey Dinner Is My Guest ;)
-
Has anyone asked about how to apply post filter effects for a 50ies Scifi vibe?
Content.makeFrontInterface(150, 150); const var Panel1 = Content.getComponent("Panel1"); Panel1.setValue(1); const var circlePath = Content.createPath(); circlePath.addArc([0.0, 0.0, 1.0, 1.0], 0.0, Math.PI * 2); Panel1.setPaintRoutine(function(g) { g.beginLayer(true); g.setColour(Colours.white); var area = [1, 1, this.getWidth() - 2, this.getHeight() - 2]; g.drawEllipse(area, 2); var radius = this.getWidth() / 2 * this.getValue(); var diameter; var pos; for (i = 1; i < 4; i++) { diameter = (radius * 2 / 4 * i); pos = this.getWidth() / 2 - diameter / 2; if (pos > 0) g.drawEllipse([pos + 1, pos + 1, diameter - 2, diameter - 2], 2); } g.gaussianBlur(1.0 / this.getValue() * 12.0); g.addNoise(0.2); g.applyMask(circlePath, area, false); g.endLayer(); }); inline function onKnob1Control(component, value) { Panel1.setValue(component.get("max") + 1 - value); Panel1.repaint(); }; Content.getComponent("Knob1").setControlCallback(onKnob1Control);
-
@Christoph-Hart Wow, That Grain Looks Very Nice
-
@d-healey Sir Can You Translate This To A LAF Slider?
HiseSnippet 1161.3ocsWs0SiaDEdLf2tIsoZWoU8k9xHjpjyxkMgBaqz1VXIDZS2EHkvRqTUEZh83jQXOik8DfTD+u5is+S1m5y8eP643wN1vFnnHge.my046bwmyP2XkKOIQESrpbz3HNw5Sr6MVpG1ZHSHIc1gX8w1uVJBYZgRR1dbDKIg6Qrrl+6QErpr.I84e1baV.S5xKXQHGqDt72JBE5Btc25MhffcYd7iDgkzd8s53pjsTApQ.Xl2tAIh4dJa.eeFp1b1DqG01SnUw8zLMOgXsv1Juw8FpNWZz+XQhne.GIZR5ANxvdWUfGhXjKo0PQfW27fNg.doaQJXdSJ3Y16I7DS3WjJdRp.ZgEkyGVycWvqYY3039COqRvaAC7dpcO2XQjtPhoL0Qp4w9LnDTFVFcIy8Wya2RAZH0qFxNkuaLPLwBmlazXYJ7m5upV0ZUgBQhldFKl1kI4AMoeKM21AbcKUXjRBDNKZDuHZk4mqlv0GyBFAdz3pB1cgrn9P0HsPxc7GIcwNJmA0qU8xZUovy.TKSCfi4UxpmOTn4nmPExUyKlcd6f.QTB24WaB3dYpdnHAw1OK7zCcpSWgtVAyefKFLTa39aKSWK2eE9DC0XlmXTBDp2zWuftF84S3ZhtbWfF5IfNTHQVhUjJIM5QZeUL0Q.9s4qnB52PWGdszR0MBur.I4tAzzICKOGN4WPWGdKJiYv62BLWovK.YISD9TGzrui1ndA2ojNQkVBynS9wDOllSKSYxkod6JHQdkohKjAPEllWgoJ4ajp9MwFnXUfiad2yxPlBRkl5eka19rAb.NoJ.Quy5.Uy5HdpiGRt1w7HroJsZbU5gO81zT.rXcS+UJLZwBB5CyWbtN5PGUB36qz7CjN0qdY0JUupJ8lh78mprLmEvimpXbtW7cYnibTXedbdBJWQX.v0mvXe6SXJO.z0jSJonR1QJzGDwk21bGRVhDm.kgJPUc57mOMa9Su.gGOlHfwLejcZVjjB3rY5u+m9i+dSx65rCSyxcC3Q3Th3wZAF.V6vOC1PXFqUwdGdxoZUDLreRsCF5aNzZ4C8vJe5Y9XaSW.4hxqbFWl3b7SiIL9y9aMLcRPYNjRG0S9eiua+nBEddA7tpDQ5hxIRd+l9hfvDM3vNgv1Lh0maeY2CO3Ga25nS18f2tS6CuhGFoGuZjbv8Av8GjuirxixObXFY3cwcsxr07KzenxPKWODjIkWoGpFkv6wkXPclPWNf2JT4AAymYuuJNjEH9ctWWdrKjGwfLYjuu3Br45KfM9evFLXOpxaT.Se8kq3MJxDbyKafapPXLtL7dP13deg6Ss6JztCmNdmaJ3E9F3gFuY2eolcaeetqt.rKXu6u7veYEhY69f8XPmDT8s2GZpf9LWNfDI7sJNyxZNb5hgtARiYFnGyKk3egmLgMQZqLgMyERBYtwpSbMyjvaH83TN.ljoWTrh8dHMcxvHa6Fq1.+9TbhqKlJVAv9zsYsYvlubFrY8YvlMlAad4LXyWMC1702oM3cle8HsJ6+g.Xzsc5RAKq1RFzkk1QR9O.9uLkP
-
@Natan You try it first. You already have the paint routine. If you follow the instructions in the LAF tutorial video you should have everything you need.
-
@d-healey Thank You Sir Will Try My Best
-
@d-healey It's Not Very Easy, But I'm Here
If I Use 1-obj.valueNormalized, And It Doesn't Move
Any Hints?HiseSnippet 1178.3ocsVssaaaDDkzVLnRMtnAnnOOvOQEKKKoXmV.613aRAB1VgNx0o.AAFqHWIs0j6RrbkcTCLP+Q7+R+T5mPeuOjNKWIQ5VECCAX8B0blK6YGNWnmT3SSRDRK6hmMNlZY+Tmti4pgGLjv3VsODwcNduVfGgas+3XRRBMvx1d4WqUaWrfU5u+9U6SBIbeZFjk04BlO8XVDSkg5s6QrvvVj.5YrnbVu4ts8E7CDghQHUV1olULw+Rx.ZGh1rkbrreRy.lRH6pHJZhkcg8EAi6NTbM2X+4rDVuPpVntUWLPF3Vhv.Mi0nVGLjEF3M8JmXgQwKKArrIA7cN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GjJ7Y72Dk00x1STVepRqHhuTbguoyU+oHeUJBxId5WjUz4DsLTeZCqiSsp0zEurK780oh0QtOeeZr.97hEvmMW.e1ZA74kKfO+vB3yOdu9n+3z8FoDQl1DDvqY5fSa6lbBVkkVQZ8uDY0yrC
-
@Natan Here my friend a modified version
with which you can give each knob its own colour and its own line width and whatever else you want to change.HiseSnippet 1902.3oc6Y80aaTrEe2jrbq2RJ+qBc0UBwPDHYSicrcS4BJEpy+bIpIotwgxEAnx3cGaO2rdFyrylFSTj3a.eBpfOA7Yf23U9Hf3QdAdmGfyry5cWmrMw0so5BWVIK64LmyL+N+a1yYbCA2g36yEFl41cPehg4yZ0b.S1c0tXJyXi0LLeQqZLrDyJt4x0Q2hwa4arxf9Xeehqgo4z2TwmYtYLBe90arB1CybHIjLLtKm5P1j1iJSn1n1sndd0wtjco8Rw8h01vgyVk6wC.LMsUYi9Xm8vcHaiUrMkkg4yrtKUxEMkXIw2vblU3tCZ1keell+6R8os7HpAULZBKjlbctmqBwJpFq1k541Xnt6a.KZiDKwzZKwks1h5RiomXQd9vIPIRj1dXN0oAuJogW4wGdlof2LZ38BVMcDz9xjYTX6hVavjDQaL3BRCKMuFS4bQqU4.GLYod38H0EvfXIx+VkKOO5ZkKWXoYsm0FbD9Rz9XAxC2F8tn0YcnLRIGAATsa5wag8zK6lb9dKybqSHd40hpDpOHxv8RKSCrraDCKr.BsCWhECP9dTWhPSZi1n..wHrOBiZfYnlgSNOxmHQRxARDl4h5wcIn9BdehPRI9HIGMGv7byZC.sjfzg5CZT8.lijxY4myUfu+l.zwB8xM27n1Cmry7Hdq+aA6Cm0FAOJfiAfCzJgAPuTL0vcWOg5mk7CZ4KETVm7wjnLWxA2tc94JNWAzUPUlOgaOBqiraA8xYG8AsvBgITnNBdP+JnhOtOgK5HOwTnsQY.T8FCn80dWTwJENL8BzoDXz0Yh40e4WxEK1qifPXQZRV6Tr3Jy95ddz99j7eLXLhrGJy5GW8SQEQUSQ3pgD9z4QUO4R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NcyFuSkAdgz0ya7FcQLyZsd61DGYBXmwp9+47+VWRCkKngx+xReuGIFPUfGkQz29xqDMMJddTLCUNkqM6GF2qMq+XesYlSO1VjGgqIal+m9ZxF2X8W5DtI++LmcN8+elctCTxHk0YKrTnden01A8ZBg+ND.ILnJTUgWlSoJQROtrZrxxzjvbCG76vSzjUTiMilrxvISqtWRqtWzpIjMGdG4gJ6KGNF8gXn3zaRf7bki6obt9scjv1uq.y7gFGFYgaR5Q2Ed8qeZhefOotf746nhjRSeUNVj4T+5MpCJYlxzDKCDggjK2iGvjiDB92mAcNVdvziGbOi+MgbCwXSZu9dj0Y6S7fhui9qeVizFG3IGRcz35s3Ld+tbF0IsSeGBjO1oCQjF6YpPKKkXm8Rnb4Z6P7H3zAvudM881uUXEwSjsnx3aKNM+0+zRCWjJYD8Wix596Wbbt8himF6QOrifeOGcm2pX4KDRAzaV3eVZNqsTiQw8qaYUtTYUemz643nL2EA6S1xTcBj4pSfLKNAxbsIPl2ZBj4eOAx71mpLpWFsbfj2SmJBDZrd3UeXZtNCCQxgQ8F+AfTYbQx
-
@Natan I forgot - if you use the LinearSlider in the LAF instead of the RotarySlider, all knobs in your modules remain visible and operable.
See my snippet -
@Natan Here again with text under the "volume" knob
Your circles are too big - they alone take up all the space in the area and so there is no room for the text.
HiseSnippet 1743.3ocuXs0aaaCEVNoZqQsoWFF1iqbFX.1s1NxtIYsHsq4daPSRcaxxVQQQKsDsMWjIMnnSiaP.1ejh8v9SrG2a6uQw.1qC688P2ghxRxNJwItWDrgDO7bH+34F4gUEbGhuOWXjYhs61lXj4hla0kIatTSLkYr1xFY9By4YXIlUb8EVE8PFuluwhcai88ItFYxL98U7kYhyYD77u2aQrGl4PhIYXrCm5PVm1hJioVc9GR87VE6R1l1JA2SO+ZNb1RbOdG.SiaZazF6rKtAYSrhswLMx7Yq3RkbwVRrj3aj4bKxc6tUS9qXZ92g5Sq4QTMJarELPZxqx8bUHV8swRModtU6s18MfQoZrlXbsl3KM2f5Rin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