HISE Logo Forum
    • Categories
    • Register
    • Login

    Confusing issue with scripting simple knob for AHDSR Envelope Knob

    Scheduled Pinned Locked Moved Scripting
    7 Posts 2 Posters 491 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.
    • M
      maxtownsley
      last edited by

      Here is what I have and it compiles ok, but the knob instead switches back and forth from monophonic to polyphonic mode on the envelope. Im sure someone knows what I am doing wrong. Thank you :)

      //FILTER ENV ADSR KNOB

      const var AHDSREnvelope1 = Synth.getModulator("AHDSR Envelope1");

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

      inline function onKnbAttackEnvControl(component, value)
      {
      AHDSREnvelope1.setAttribute("AttackTime", value); //I've tried "Attack" as well

      };

      Content.getComponent("KnbAttackEnv").setControlCallback(onKnbAttackEnvControl);

      1 Reply Last reply Reply Quote 0
      • M
        maxtownsley
        last edited by

        Nevermind, I got it with this...

        inline function onKnbAttackEnvControl(component, value)
        {
        AHDSREnvelope1.setAttribute(AHDSREnvelope1.Attack, value);
        };

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

          @maxtownsley why are you scripting it instead of using processor/ property ID?

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

          M 1 Reply Last reply Reply Quote 0
          • M
            maxtownsley @d.healey
            last edited by

            @d-healey because I am actually linking the one knob to 3 different envelopes

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

              @maxtownsley Can you use the macro system?

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

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

                @d-healey Actually I just remembered I made a script for this exact purpose, and it's public domain so you can use it in your project - https://codeberg.org/LibreWave/RhapsodyBoilerplate/src/branch/main/modules/AhdsrController.js

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

                M 1 Reply Last reply Reply Quote 0
                • M
                  maxtownsley @d.healey
                  last edited by

                  @d-healey Amazing, thanks!!

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

                  52

                  Online

                  1.7k

                  Users

                  11.7k

                  Topics

                  101.8k

                  Posts