HISE Logo Forum
    • Categories
    • Register
    • Login

    1 Knob for several value

    Scheduled Pinned Locked Moved General Questions
    17 Posts 2 Posters 605 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 @yall
      last edited by

      @yall

      tried CB.setValue (1);

      Do you want the combobox's value to always be 1?

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

      1 Reply Last reply Reply Quote 0
      • Y
        yall
        last edited by

        what did you have against the number 1? ^^
        no it obviously has to change but I admit that I don't know

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

          @yall Do you want it to change to the knob's value?

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

          1 Reply Last reply Reply Quote 0
          • Y
            yall
            last edited by

            inline function onKnob1Control(component, value)
            {
            if(value == 0)
            {
            CB.setValue(1);
            }

             if(value == 1)
                { 
            CB.setValue(2);
            }
            

            };

            Content.getComponent("Knob1").setControlCallback(onKnob1Control);

            i understand i know

            1 Reply Last reply Reply Quote 0
            • Y
              yall
              last edited by

              @d-healey
              I just got there, I didn't put the .changed
              thank you .
              you won 1 week of vacation with me in the south of France (facing the sea;))

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

                Well done!

                I'll show you a slightly more efficient way that will only use one line in the callback

                CB.setValue(value + 1);

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

                1 Reply Last reply Reply Quote 0
                • Y
                  yall
                  last edited by

                  @d-healey said in 1 Knob for several value:

                  CB.setValue(value + 1);

                  i will try now

                  1 Reply Last reply Reply Quote 0
                  • Y
                    yall
                    last edited by

                    even simpler. yet these are things that I see often, I understand them but I don't have the reflex to apply them correctly.

                    thanks a lot

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

                      @yall said in 1 Knob for several value:

                      I don't have the reflex to apply them correctly.

                      It just takes practice. Read lots of code and write lots of code and you'll pick these things up.

                      One tip, if you find you are writing the same thing multiple times then there is probably a more efficient solution.

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

                      1 Reply Last reply Reply Quote 0
                      • Y
                        yall
                        last edited by

                        @d-healey yes I try more and more to write the codes with what I learn rather than doing stupid copy paste. I am creating a github to host my projects in order to sell them with the open license and I will send you all of this. you will surely be surprised for a little beginner Like me ^^

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

                        6

                        Online

                        1.7k

                        Users

                        11.8k

                        Topics

                        103.2k

                        Posts