HISE Logo Forum
    • Categories
    • Register
    • Login

    Disable Shift-Click Knob Text Box

    Scheduled Pinned Locked Moved Scripting
    25 Posts 6 Posters 867 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 @ILIAM
      last edited by

      @ILIAM

      You can use an array and loop over the knobs array.

      const mods = [];
      
      for (x in knobs)
          mods.push(x.createModifiers());
      

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

      ILIAMI 2 Replies Last reply Reply Quote 2
      • ILIAMI
        ILIAM @d.healey
        last edited by

        @d-healey said in Disable Shift-Click Knob Text Box:

        const mods = [];

        for (x in knobs)
        mods.push(x.createModifiers());

        Thank you

        1 Reply Last reply Reply Quote 1
        • ILIAMI
          ILIAM @d.healey
          last edited by

          @d-healey But i see an error"

          const var knobs = [Content.getComponent("Knob1"),
                             Content.getComponent("Knob2"),
                             Content.getComponent("Knob3"),
                             Content.getComponent("Knob4"),
                             Content.getComponent("Knob5"),
                             Content.getComponent("Knob6")];
          
          
          
          const mods = [];
          
          for (x in knobs)
              mods.push(x.createModifiers());
              
              
          for(k in knobs)
          {
              k.setModifiers(mods.TextInput, [mods.disabled, mods.disabled]);  // No text input
              k.setModifiers(mods.ResetToDefault, [ mods.disabled, mods.disabled ]); // No Double click to Default
          };
          
          d.healeyD 1 Reply Last reply Reply Quote 0
          • d.healeyD
            d.healey @ILIAM
            last edited by

            @ILIAM said in Disable Shift-Click Knob Text Box:

            But i see an error"

            What is it?

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

            ILIAMI 1 Reply Last reply Reply Quote 0
            • ILIAMI
              ILIAM @d.healey
              last edited by

              @d-healey

              const mods = [];
              
              for (x in knobs)
                  mods.push(x.createModifiers());
                  
                  
              for(k in knobs)
              {
                  k.setModifiers(mods.TextInput, [mods.disabled, mods.disabled]);  // No text input
                  k.setModifiers(mods.ResetToDefault, [ mods.disabled, mods.disabled ]); // No Double click to Default
              };
              
              Interface:! Warning: undefined parameter 0
              :			Line 17, column 19	{SW50ZXJmYWNlfHwzMTB8MTd8MTk=}
              Interface:! Warning: undefined parameter 0
              :			Line 18, column 19	{SW50ZXJmYWNlfHwzOTZ8MTh8MTk=}
              Interface:! Warning: undefined parameter 0
              :			Line 17, column 19	{SW50ZXJmYWNlfHwzMTB8MTd8MTk=}
              Interface:! Warning: undefined parameter 0
              :			Line 18, column 19	{SW50ZXJmYWNlfHwzOTZ8MTh8MTk=}
              Interface:! Warning: undefined parameter 0
              :			Line 17, column 19	{SW50ZXJmYWNlfHwzMTB8MTd8MTk=}
              Interface:! Warning: undefined parameter 0
              :			Line 18, column 19	{SW50ZXJmYWNlfHwzOTZ8MTh8MTk=}
              
              d.healeyD 1 Reply Last reply Reply Quote 0
              • d.healeyD
                d.healey @ILIAM
                last edited by

                @ILIAM That's telling you that the parameter you're passing to a function on line 17 and 18 is undefined - in this case mods

                mods is an array, you need to get the individual mod object from the array for each knob.

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

                ILIAMI 1 Reply Last reply Reply Quote 0
                • ILIAMI
                  ILIAM @d.healey
                  last edited by

                  @d-healey So Loop doesn't works?

                  d.healeyD Oli UllmannO 2 Replies Last reply Reply Quote 0
                  • d.healeyD
                    d.healey @ILIAM
                    last edited by

                    @ILIAM Yes, but you'll need to modify it to access the mods. Probably a for loop rather than for in.

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

                    1 Reply Last reply Reply Quote 0
                    • Oli UllmannO
                      Oli Ullmann @ILIAM
                      last edited by

                      @ILIAM
                      @d-healey is talking about something like this:

                      const var knobs = [Content.getComponent("Knob1"),
                                         Content.getComponent("Knob2"),
                                         Content.getComponent("Knob3"),
                                         Content.getComponent("Knob4"),
                                         Content.getComponent("Knob5"),
                                         Content.getComponent("Knob6")];
                      
                      const mods = [];
                      
                      for (x in knobs)
                          mods.push(x.createModifiers());
                          
                          
                      for(i = 0; i < knobs.length; i++)
                      {
                          knobs[i].setModifiers(mods[i].TextInput, [mods[i].disabled, mods[i].disabled]);  // No text input
                          knobs[i].setModifiers(mods[i].ResetToDefault, [ mods[i].disabled, mods[i].disabled ]); // No Double click to Default
                      };
                      
                      1 Reply Last reply Reply Quote 3
                      • ILIAMI
                        ILIAM
                        last edited by

                        @Oli-Ullmann 🙏

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

                        23

                        Online

                        2.0k

                        Users

                        12.8k

                        Topics

                        110.8k

                        Posts