HISE Logo Forum
    • Categories
    • Register
    • Login

    How to duplucate LAF knob

    Scheduled Pinned Locked Moved Newbie League
    13 Posts 3 Posters 1.1k 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.
    • d.healeyD
      d.healey @AGD_
      last edited by

      @AGD_

      Create a new local laf object for each knob design. They can all exist in the same js file as long as they have unique names.

      Free HISE Bootcamp Full Course for beginners.
      YouTube Channel - Public HISE tutorials
      My Patreon - HISE tutorials

      AGD_A 1 Reply Last reply Reply Quote 0
      • AGD_A
        AGD_ @d.healey
        last edited by

        @d-healey thank you for your reply.
        I think I've misread the code. How do I create a local LAF object? I placed the script in the scripts folder and used the include"name.js" function in onInit. Is there another way (or rather, the correct way) to create a LAF object? Thanks.

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

          @AGD_

          You don't need to put this in a separate file, and at this stage it might just be making things more complicated for you.

          Here's an example of creating two laf objects.

          const myLaf = Content.createLocalLookAndFeel();
          
          const myOtherLaf = Content.createLocalLookAndFeel();
          

          Free HISE Bootcamp Full Course for beginners.
          YouTube Channel - Public HISE tutorials
          My Patreon - HISE tutorials

          AGD_A 2 Replies Last reply Reply Quote 0
          • AGD_A
            AGD_ @d.healey
            last edited by

            @d-healey thank you!

            1 Reply Last reply Reply Quote 0
            • ChazroxC
              Chazrox @AGD_
              last edited by

              @AGD_ are you trying to have different designs for each knob or do you want them all to be the same?

              AGD_A 1 Reply Last reply Reply Quote 0
              • AGD_A
                AGD_ @Chazrox
                last edited by

                @Chazrox thanks for your reply. At the moment I want to create 4 knobs with the same layout. If you've any suggestion, thanks.

                ChazroxC 1 Reply Last reply Reply Quote 0
                • ChazroxC
                  Chazrox @AGD_
                  last edited by Chazrox

                  @AGD_ yes.

                  You can highlight all the knobs you want to share the LAF. Right click and create a script reference to them as a group.

                  then do:

                  
                  const var allMyButtons = [ Content.getComponent(button1),
                  Content.getComponent(button2),
                  Content.getComponent(button3),
                  Content.getComponent(button4)
                  ];
                  
                  for (a in allMyButtons)
                  a.setLocalLookAndFeel(myLafFunction);
                  
                  

                  thats off the top of my head. I think that looks right.

                  AGD_A 1 Reply Last reply Reply Quote 1
                  • AGD_A
                    AGD_ @Chazrox
                    last edited by

                    @Chazrox thank you and sorry for this late reply, but I wasn't in the studio yesterday. Thanks, I'm just starting out, so I might be asking some silly questions.

                    ChazroxC 1 Reply Last reply Reply Quote 1
                    • ChazroxC
                      Chazrox @AGD_
                      last edited by

                      @AGD_ All good. lmk 🤛

                      1 Reply Last reply Reply Quote 0
                      • AGD_A
                        AGD_ @d.healey
                        last edited by

                        @d-healey it's works fine! Thank you David! I'm looking forward to your next course because now that I've finished the first one, I'm having a bit of trouble following the correct order to continue, even though I'm studying your videos, which are fantastic! Thank you so much.

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

                          @AGD_ Thanks, are you on the Discord server? New course will be ready pretty soon

                          Free HISE Bootcamp Full Course for beginners.
                          YouTube Channel - Public HISE tutorials
                          My Patreon - HISE tutorials

                          AGD_A 1 Reply Last reply Reply Quote 0
                          • AGD_A
                            AGD_ @d.healey
                            last edited by

                            @d-healey yes I'm on Discord serve, thanks

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

                            22

                            Online

                            2.0k

                            Users

                            12.7k

                            Topics

                            110.3k

                            Posts