HISE Logo Forum
    • Categories
    • Register
    • Login

    Disable Shift-Click Knob Text Box

    Scheduled Pinned Locked Moved Scripting
    25 Posts 6 Posters 873 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 @tomekslesicki
      last edited by d.healey

      @tomekslesicki One per slider, but you can reuse the same object. You could also do it in a single loop which would apply it to all sliders in your project.

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

      T 1 Reply Last reply Reply Quote 0
      • T
        tomekslesicki @d.healey
        last edited by

        @d-healey ok, so that I understand it correctly - I call createModifiers() once, and then loop through the sliders with .setModifiers, right?

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

          @tomekslesicki Yes that's my understanding, the createModifiers function should return an object you can pass in setModifiers - let me know if it works.

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

          T 1 Reply Last reply Reply Quote 0
          • T
            tomekslesicki @d.healey
            last edited by

            @d-healey it does, thank you!

            ILIAMI 1 Reply Last reply Reply Quote 0
            • ILIAMI
              ILIAM
              last edited by

              @Christoph-Hart @d-healey @tomekslesicki

              Well i tried the Doc example, how I can remove the shift click command, so no input text at all!

              Content.makeFrontInterface(600, 600);
              
              
              const var Knob1 = Content.getComponent("Knob1");
              const var mods = Knob1.createModifiers();
              
              // We want to reassign the reset double click to shift + double click
              Knob1.setModifiers(mods.ResetToDefault, [ mods.doubleClick, mods.shiftDown ]);
              
              // and the text input to a double click without modifiers.
              Knob1.setModifiers(mods.TextInput, [mods.doubleClick, mods.noKeyModifier]);
              
              HiseSnippet 991.3ocsV0saaTDEdVmrAhApnn9.LpW4.Qt10IwIBPID6jhUvoV0osHgPUi24rwi7tyrZmYahaE2wyCuB7Xv0HdA3M.NyrqiWSRSZsD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6D9G7ovXSqrWgwlyLhCcAopWEju2YuL5icZPLIcWVuN9uFPY5hKb4yq3ciuJHXwTcs.e7xFXqkMvsV1.2dYCbmkMv1Kaf6d2AZ+qKeWlQEmu1PH8Gbjifzy6HICm.cSqj+E4xs4IA
              
              1 Reply Last reply Reply Quote 0
              • ILIAMI
                ILIAM @tomekslesicki
                last edited by

                @tomekslesicki @Christoph-Hart @d-healey
                is this correct?

                Knob1.setModifiers(mods.TextInput, [mods.disabled, mods.disabled]);  / No text input
                Knob1.setModifiers(mods.ResetToDefault, [ mods.disabled, mods.disabled ]); / No Double click to Default
                
                1 Reply Last reply Reply Quote 0
                • ILIAMI
                  ILIAM
                  last edited by

                  Seems to work, can we use a loop for this? @d-healey

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

                    This post is deleted!
                    1 Reply Last reply Reply Quote 0
                    • Oli UllmannO
                      Oli Ullmann @ILIAM
                      last edited by

                      @ILIAM
                      I did not try your code but if it works, it will also work in a loop like this:

                      const knobs = [Content.getComponent("Knob1"), Content.getComponent("Knob2")];
                      
                      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
                      };
                      
                      
                      
                      
                      
                      ILIAMI 1 Reply Last reply Reply Quote 0
                      • ILIAMI
                        ILIAM @Oli Ullmann
                        last edited by

                        @Oli-Ullmann said in Disable Shift-Click Knob Text Box:

                        mods

                        Okay, but what about const var mods = Knob1.createModifiers(); ?

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

                          @ILIAM
                          Phew, unfortunately I'm not familiar with this topic. I'll take a look when I have time. But maybe someone here knows something about it. :-)

                          1 Reply Last reply Reply Quote 0
                          • 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
                                            • First post
                                              Last post

                                            20

                                            Online

                                            2.0k

                                            Users

                                            12.8k

                                            Topics

                                            110.8k

                                            Posts