HISE Logo Forum
    • Categories
    • Register
    • Login

    Display control parameter on label

    Scheduled Pinned Locked Moved Scripting
    5 Posts 2 Posters 458 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.
    • P
      paper_lung
      last edited by

      Hi all, I'm relatively new to this but I'm wondering how I go about displaying a parameter (for example, left delay sync time) on a label that updates whenever the slider is changed?

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

        @paper_lung In the slider's callback you can set the label's text property. Or you can get rid of the label completely and use LAF.

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

        P 1 Reply Last reply Reply Quote 0
        • P
          paper_lung @d.healey
          last edited by

          @d-healey Thanks. The thing I'm unsure about is how to connect the label to the sliders parameter - as in which command should I be looking for? There's a ton in the API such as 'getparameter' - would it be something like that? Sorry for the dumb question, trying to wrap my head around it!

          inline function onKnob1Control(component, value)
          {
          	Label1.set("text", "text goes here" + commandgoeshere? ());
          };
          
          Content.getComponent("Knob1").setControlCallback(onKnob1Control);
          
          d.healeyD 1 Reply Last reply Reply Quote 0
          • d.healeyD
            d.healey @paper_lung
            last edited by

            @paper_lung You don't need to connect the label to anything, the label is just for displaying the value.

            To change the parameter of a module you can use the setAttribute function from within the slider's callback.

            For example to change the attack of an envelope you could use something like envelopeReference.setAttribute(envelopeReference.Attack, value);

            Replace envelopeReference with the variable that references your envelope.

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

            P 1 Reply Last reply Reply Quote 0
            • P
              paper_lung @d.healey
              last edited by

              @d-healey Great, that makes sense, thanks for the help!

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

              13

              Online

              2.0k

              Users

              12.8k

              Topics

              110.9k

              Posts