HISE Logo Forum
    • Categories
    • Register
    • Login

    LAF ScriptSlider?

    Scheduled Pinned Locked Moved General Questions
    195 Posts 11 Posters 15.9k 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.
    • ustkU
      ustk @d.healey
      last edited by ustk

      @d-healey @Christoph-Hart This is what you want, but since it complicates too much the formula, I should either add a valueNormalizedWithSkew, or modify the existing valueNormalized... ?

      laf.registerFunction("drawRotarySlider", function(g, obj)
      {
          var a = obj.area;
          var width = obj.area[2];
          var height = obj.area[3];
          var stroke = 3;
          var mark = 4;
          var startOffset = 2.5;
          
          var valueNormalizedWithSkew = Math.pow(10, (Math.log10(obj.valueNormalized) / (1/obj.skew)));
          
          var endOffset = 5 * valueNormalizedWithSkew - startOffset;
      
          Console.print(obj.skew);
          g.setColour(obj.itemColour1);
          g.fillEllipse(a);
      
          g.setColour(obj.itemColour2);
          g.drawEllipse([stroke / 2, stroke / 2, width - stroke, height - stroke], stroke);
      
          g.rotate(endOffset, [a[2] / 2, a[2] / 2]);
      
          g.setColour(obj.textColour);
          g.fillRoundedRectangle([width / 2 - mark / 2, 0, mark, height / 2.5], 1.5);
      });
      

      Can't help pressing F5 in the forum...

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

        Yeah, valueNormalised should definitely include the "deskewing", otherwise you can just use the normal value.

        ustkU 1 Reply Last reply Reply Quote 2
        • ustkU
          ustk @Christoph Hart
          last edited by

          @Christoph-Hart Alright, correcting... πŸ˜‰

          Can't help pressing F5 in the forum...

          ustkU 1 Reply Last reply Reply Quote 1
          • ustkU
            ustk @ustk
            last edited by

            @Christoph-Hart @d-healey that's fixed and pushed, so you can now do this:

            laf.registerFunction("drawRotarySlider", function(g, obj)
            {
                var a = obj.area;
                var width = obj.area[2];
                var height = obj.area[3];
                var stroke = 3;
                var mark = 4;
                var startOffset = 2.5;
                var endOffset = 5 * obj.valueNormalized - startOffset;
            
                g.setColour(obj.itemColour1);
                g.fillEllipse(a);
            
                g.rotate(endOffset, [a[2] / 2, a[2] / 2]);
            
                g.setColour(obj.textColour);
                g.fillRoundedRectangle([width / 2 - mark / 2, 0, mark, height / 2.5], 1.5);
            });
            

            Can't help pressing F5 in the forum...

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

              @ustk Woohoo! Thank you both!

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

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

                @Christoph-Hart Merge?

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

                Christoph HartC 1 Reply Last reply Reply Quote 1
                • Christoph HartC
                  Christoph Hart @d.healey
                  last edited by

                  @d-healey Merge.

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

                    @d-healey @Christoph-Hart so Is This Stable To Build?
                    https://github.com/christophhart/HISE/commits/scriptnode

                    The Top One, Is The Latest, Right?
                    71f75e5 <<< This?

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

                      Yes, that should be fine.

                      1 Reply Last reply Reply Quote 1
                      • ?
                        A Former User @Natan
                        last edited by

                        This post is deleted!
                        1 Reply Last reply Reply Quote 0
                        • d.healeyD
                          d.healey
                          last edited by

                          I'm convinced that LAF is the way to go now for a custom UI without images.

                          Peek 2021-03-18 17-31.gif

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

                          ? MikeBM 2 Replies Last reply Reply Quote 5
                          • ?
                            A Former User @d.healey
                            last edited by

                            @d-healey I was experimenting with Lottie graphics yesterday and was totally blown away by its looks and possibilities! I don’t get what LAF is exactly tbh. But it looks really nice too!

                            d.healeyD ustkU 2 Replies Last reply Reply Quote 0
                            • d.healeyD
                              d.healey @A Former User
                              last edited by

                              @vewilya I haven't used rlottie much but what I have done with it has looked nice, very smooth animation.

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

                              1 Reply Last reply Reply Quote 0
                              • ustkU
                                ustk @A Former User
                                last edited by

                                @vewilya Be just careful with Lottie since all actions aren't rendered/compatible with Hise. So complex animations might not work, keep them simple.
                                Custom LAF is a way to redraw the components (sliders, comboboxes, etc...) with fully customizable graphics (shapes and colours). So you don't necessarily need to recreate the components from script panels for full customizations, the original ones can now give you almost anything you want...

                                Can't help pressing F5 in the forum...

                                DanHD ? 2 Replies Last reply Reply Quote 1
                                • DanHD
                                  DanH @ustk
                                  last edited by

                                  @ustk We seem to lose the 'boxes' around the option buttons when using laf - anyone else come across this?

                                  Screenshot 2021-03-18 at 20.01.30.png Screenshot 2021-03-18 at 20.00.38.png

                                  DHPlugins / DC Breaks | Artist / Producer / DJ / Developer
                                  https://dhplugins.com/ | https://dcbreaks.com/
                                  London, UK

                                  ustkU 1 Reply Last reply Reply Quote 0
                                  • ustkU
                                    ustk @DanH
                                    last edited by ustk

                                    @DanH Unfortunately, when using custom LAF, Hise LAF isn't separated from plugins LAF. The recommendation is to write your custom LAF and then deactivate it (comment) when working on the project. Then reactivate (uncomment) before export.
                                    I'd like this to be different like many of us, but Christoph said it would be a nightmare to modify if I translate well his words...

                                    Can't help pressing F5 in the forum...

                                    DanHD 1 Reply Last reply Reply Quote 0
                                    • DanHD
                                      DanH @ustk
                                      last edited by

                                      @ustk yes but the blank boxes carry over into the plugin itself - for example at the beginning of the whole process, when installing the samples, and when overwriting a preset...

                                      I'm guessing we don't have any workarounds at the moment! :face_with_tears_of_joy:

                                      Look at this monster lol

                                      Screenshot 2021-03-18 at 20.12.29.png

                                      Screenshot 2021-03-18 at 20.08.20.png

                                      Screenshot 2021-03-18 at 20.10.24.png

                                      DHPlugins / DC Breaks | Artist / Producer / DJ / Developer
                                      https://dhplugins.com/ | https://dcbreaks.com/
                                      London, UK

                                      d.healeyD ustkU 2 Replies Last reply Reply Quote 0
                                      • d.healeyD
                                        d.healey @DanH
                                        last edited by

                                        @DanH Yes we have a workaround - LAF :p

                                        Solutions have been posted in this thread - https://forum.hise.audio/topic/3228/look-and-feel-toggle-buttons-and-the-midi-sources-panel/14

                                        Basically you have to style everything yourself.

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

                                        DanHD 1 Reply Last reply Reply Quote 1
                                        • ustkU
                                          ustk @DanH
                                          last edited by

                                          @DanH When you use a custom LAF you have to redesign the whole component as it starts from blank...

                                          Can't help pressing F5 in the forum...

                                          1 Reply Last reply Reply Quote 0
                                          • ?
                                            A Former User @ustk
                                            last edited by A Former User

                                            @ustk Thanks. I'll keep that in mind! So I guess as long as the animations show in my GUI they are working, right? Or would I discover non-compatible animations only on vst/au/standalone export? So much stuff to learn... 🀯

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

                                            17

                                            Online

                                            1.7k

                                            Users

                                            11.8k

                                            Topics

                                            102.6k

                                            Posts