HISE Logo Forum
    • Categories
    • Register
    • Login

    Paint routine for Natan

    Scheduled Pinned Locked Moved Scripting
    paint routinevectorpanel
    33 Posts 4 Posters 2.0k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • NatanN
      Natan
      last edited by Natan

      Sir, Is This Possible To Change The Min / Max Value Of The Ghost Knob To 0 / 1 ?!

      It's Set To 1 / 4

      d.healeyD 1 Reply Last reply Reply Quote 0
      • NatanN
        Natan
        last edited by

        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));

        1 Reply Last reply Reply Quote 0
        • d.healeyD
          d.healey @Natan
          last edited by

          @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.

          Libre Wave - Freedom respecting instruments and effects
          My Patreon - HISE tutorials
          YouTube Channel - Public HISE tutorials

          NatanN 1 Reply Last reply Reply Quote 1
          • NatanN
            Natan @d.healey
            last edited by Natan

            @d-healey

            Yeah I Changed The Value Of The Callback To value /4
            But The Pop U Shows Doesnt Shows The 0 To 100%

            1 Reply Last reply Reply Quote 0
            • NatanN
              Natan
              last edited by

              Is This Possible To Change The ValuePopUp?

              1 Reply Last reply Reply Quote 0
              • d.healeyD
                d.healey
                last edited by

                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.

                Libre Wave - Freedom respecting instruments and effects
                My Patreon - HISE tutorials
                YouTube Channel - Public HISE tutorials

                1 Reply Last reply Reply Quote 1
                • NatanN
                  Natan
                  last edited by 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%!!!

                  1 Reply Last reply Reply Quote 0
                  • NatanN
                    Natan
                    last edited by

                    Can We Add Some Magic To This:

                    Panel1.setValue(component.get("max") + 1 - value );
                    

                    And Bring The Knob Back to 0/1 ?

                    d.healeyD 1 Reply Last reply Reply Quote 0
                    • d.healeyD
                      d.healey @Natan
                      last edited by

                      @Natan Yeah, like I said, you have to remap the range 0-1 to 1-4.

                      Panel1.setValue(5 - (value * (4 - 1) + 1));

                      Libre Wave - Freedom respecting instruments and effects
                      My Patreon - HISE tutorials
                      YouTube Channel - Public HISE tutorials

                      NatanN 2 Replies Last reply Reply Quote 1
                      • NatanN
                        Natan @d.healey
                        last edited by

                        @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?

                        d.healeyD 1 Reply Last reply Reply Quote 0
                        • d.healeyD
                          d.healey @Natan
                          last edited by

                          @Natan Did you see my last post?

                          Libre Wave - Freedom respecting instruments and effects
                          My Patreon - HISE tutorials
                          YouTube Channel - Public HISE tutorials

                          1 Reply Last reply Reply Quote 1
                          • NatanN
                            Natan @d.healey
                            last edited by

                            @d-healey said in Paint routine for Natan:

                            setValue(5 - (value * (4 - 1) + 1));

                            WOOOOOOOOOOOW
                            yes Yes yessssssss
                            Youre A True Legenddddddddd

                            That Did The Job :) <3 :man_dancing_medium-light_skin_tone:

                            alt text

                            d.healeyD 1 Reply Last reply Reply Quote 1
                            • d.healeyD
                              d.healey @Natan
                              last edited by

                              @Natan The reason it's written so weird like (4-1) instead of just 3 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

                              Libre Wave - Freedom respecting instruments and effects
                              My Patreon - HISE tutorials
                              YouTube Channel - Public HISE tutorials

                              1 Reply Last reply Reply Quote 1
                              • NatanN
                                Natan
                                last edited by

                                @d-healey That Was Brilliant :) Thank You Sir

                                NatanN 1 Reply Last reply Reply Quote 0
                                • NatanN
                                  Natan @Natan
                                  last edited by

                                  @d-healey Dinner Is My Guest ;)

                                  1 Reply Last reply Reply Quote 1
                                  • Christoph HartC
                                    Christoph Hart
                                    last edited by

                                    Has anyone asked about how to apply post filter effects for a 50ies Scifi vibe?

                                    animation.gif

                                    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);
                                    
                                    NatanN 1 Reply Last reply Reply Quote 6
                                    • NatanN
                                      Natan @Christoph Hart
                                      last edited by

                                      @Christoph-Hart Wow, That Grain Looks Very Nice 👍

                                      1 Reply Last reply Reply Quote 0
                                      • NatanN
                                        Natan
                                        last edited by

                                        @d-healey Sir Can You Translate This To A LAF Slider?

                                        HiseSnippet 1161.3ocsWs0SiaDEdLf2tIsoZWoU8k9xHjpjyxkMgBaqz1VXIDZS2EH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l9hfvDM3vNgv1Lh0maeY2CO3Ga25nS18f2tS6CuhGFoGuZjbv8Av8GjuirxixObXFY3cwcsxr07KzenxPKWODjIkWoGpFkv6wkXPclPWNf2JT4AAymYuuJNjEH9ctWWdrKjGwfLYjuu3Br45KfM9evFLXOpxaT.Se8kq3MJxDbyKafapPXLtL7dP13deg6Ss6JztCmNdmaJ3E9F3gFuY2eolcaeetqt.rKXu6u7veYEhY69f8XPmDT8s2GZpf9LWNfDI7sJNyxZNb5hgtARiYFnGyKk3egmLgMQZqLgMyERBYtwpSbMyjvaH83TN.ljoWTrh8dHMcxvHa6Fq1.+9TbhqKlJVAv9zsYsYvlubFrY8YvlMlAad4LXyWMC1702oM3cle8HsJ6+g.Xzsc5RAKq1RFzkk1QR9O.9uLkP
                                        
                                        d.healeyD 1 Reply Last reply Reply Quote 0
                                        • d.healeyD
                                          d.healey @Natan
                                          last edited by

                                          @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.

                                          Libre Wave - Freedom respecting instruments and effects
                                          My Patreon - HISE tutorials
                                          YouTube Channel - Public HISE tutorials

                                          NatanN 1 Reply Last reply Reply Quote 1
                                          • NatanN
                                            Natan @d.healey
                                            last edited by

                                            @d-healey Thank You Sir👏 Will Try My Best 👋

                                            1 Reply Last reply Reply Quote 1
                                            • First post
                                              Last post

                                            46

                                            Online

                                            1.7k

                                            Users

                                            11.7k

                                            Topics

                                            102.2k

                                            Posts