Paint routine for Natan
-
Add this in the for loop for some trippy colour effects:
g.setColour(Math.randInt(4000000000, 4300000000));
-
Sir, Is This Possible To Change The Min / Max Value Of The Ghost Knob To 0 / 1 ?!
It's Set To 1 / 4
-
Ha Ha Ha
This Is So SynthWave :))))))@d-healey said in Paint routine for Natan:
Add this in the for loop for some trippy colour effects:
g.setColour(Math.randInt(4000000000, 4300000000));
-
@Natan It needs to be 1 to 4 because there are 3 moving rings. If you want to change it you'll need to rework the calculations or remap the range 0-1 to 1-4 in the knob's callback.
-
Yeah I Changed The Value Of The Callback To value /4
But The Pop U Shows Doesnt Shows The 0 To 100% -
Is This Possible To Change The ValuePopUp?
-
value / 4 wouldn't give a range of 1-4 if the knobs range is 0-1. 0/4 = 0 and 1 /4 = 0.25.
Can't change the popup without changing the knob's range.
-
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.