HISE Logo Forum
    • Categories
    • Register
    • Login

    Linking knobs together via a button

    Scheduled Pinned Locked Moved General Questions
    31 Posts 3 Posters 471 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 @pcs800
      last edited by

      @pcs800 said in Linking knobs together via a button:

      I am struggling to figure out how to assign processorid and parameterid in the code editor.

      Use .setAttribute to set the module parameters directly from the control callback.

      First you need to get a reference to the module (right click the header and select create generic script reference).

      Then in the callback you can call something like myModule.setAttribute(myModule.parameterName, value);

      To find out the parameterName you can again right-click the module header and select dump Parameter IDs and values.

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

      pcs800P 1 Reply Last reply Reply Quote 1
      • pcs800P
        pcs800 @d.healey
        last edited by

        @d-healey said in Linking knobs together via a button:

        myModule.setAttribute(myModule.parameterName, value);

        Ok, I added the following to the code

        const var Delay1 = Synth.getEffect("Delay1");
        Delay1.setAttribute(Delay1.DelayTimeLeft, 0.00);
        

        It compiles without error, but the knob doesn't control delay time.

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

          @pcs800

          This needs to go in on init
          const var Delay1 = Synth.getEffect("Delay1");

          This needs to go within the control callback. It takes two parameters, the first parameter is the property you want to set (in this case DelayTimeLeft), the second parameter is the value you want to set that property to, you've put 0.00 but you want to use the knob's value, so put value there instead.

          Delay1.setAttribute(Delay1.DelayTimeLeft, 0.00);

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

          pcs800P 1 Reply Last reply Reply Quote 1
          • pcs800P
            pcs800 @d.healey
            last edited by

            @d-healey adding on init gives this error
            Line 3, column 4: Found identifier when expecting ';'
            I tried function onInit() but it then doesn't like the next line

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

              @pcs800 said in Linking knobs together via a button:

              Line 3, column 4: Found identifier when expecting ';'

              That tells you that you are missing a semi-colon, probably on line 2

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

              pcs800P 3 Replies Last reply Reply Quote 1
              • pcs800P
                pcs800 @d.healey
                last edited by

                @d-healey Yes, i knew it was telling me I was missing a semi colon, but I've tried adding one in a few spots without success.
                Here's what I have when adding it to line 2

                Content.makeFrontInterface(566, 400);
                ;
                on init
                const var Delay1 = Synth.getEffect("Delay1");
                Delay1.setAttribute(Delay1.DelayTimeLeft, 0.00);
                

                Still get the same error
                It says line 3, column 4, which would make it like this on; init

                1 Reply Last reply Reply Quote 0
                • pcs800P
                  pcs800 @d.healey
                  last edited by

                  @d-healey If I do this
                  on ;init;
                  it compiles without error

                  1 Reply Last reply Reply Quote 0
                  • pcs800P
                    pcs800 @d.healey
                    last edited by

                    @d-healey
                    Back to your post above, when I set the word value instead of 0.00, I get this.

                    2025-05-27_131429.png

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

                      @pcs800 your code is getting crazy now 😀 go watch the scripting 101 video if you haven't

                      Wait you already did.

                      You never need to write on init. Just remove that bit and put the set attribute stuff within your callback - the callback is triggered when the knob is moved and that's when you want to change the value in the effect

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

                      pcs800P 1 Reply Last reply Reply Quote 1
                      • pcs800P
                        pcs800 @d.healey
                        last edited by

                        @d-healey It is now working with the help of some online resources

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

                        11

                        Online

                        1.7k

                        Users

                        11.8k

                        Topics

                        103.1k

                        Posts