HISE Logo Forum
    • Categories
    • Register
    • Login

    label control knob

    Scheduled Pinned Locked Moved General Questions
    6 Posts 3 Posters 275 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.
    • Y
      yall
      last edited by

      Hello, I'm looking for a way to control a knob with a label. I can display the value of the button very well but I would like to use this same label to control the knob.
      for example if I want to write 144.47 hz on the label, the knob is positioned on 144.7
      this function is already possible on the original knobs but is no longer possible when importing a film strip.
      if you have a idea... thank u

      ulrikU ustkU 2 Replies Last reply Reply Quote 0
      • ulrikU
        ulrik @yall
        last edited by

        @yall set the label to "editable", add a callback function for it and in that function, set the value to the knob.

        To read the label use the parseInt() function

        Hise Develop branch
        MacOs 15.3.1, Xcode 16.2
        http://musikboden.se

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

          @yall Labels have their own callback, so you can use them like any other component.
          When you hit enter the callback is triggered. Use the value to set the slider.
          Don't forget to call slider.changed() at the end so the slider callback is also triggered

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

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

            const var Label2 = Content.getComponent("Label2");

            inline function onLabel2Control(component, value)
            {
            parseInt(FREQ0GAIN.getValue(value));
            FREQ0GAIN.changed();
            };

            Content.getComponent("Label2").setControlCallback(onLabel2Control);

            the compilation tells me ok but nothing happens, sorry I never used this function

            ulrikU 1 Reply Last reply Reply Quote 0
            • ulrikU
              ulrik @yall
              last edited by

              @yall said in label control knob:

              parseInt(FREQ0GAIN.getValue(value));

              try FREQ0GAIN.setValue(parseInt(value));

              Hise Develop branch
              MacOs 15.3.1, Xcode 16.2
              http://musikboden.se

              Y 1 Reply Last reply Reply Quote 1
              • Y
                yall @ulrik
                last edited by

                @ulrik actually it works better like that. thank you so much

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

                21

                Online

                1.7k

                Users

                11.8k

                Topics

                102.5k

                Posts