HISE Logo Forum
    • Categories
    • Register
    • Login

    One knob controlling two parameters

    Scheduled Pinned Locked Moved General Questions
    27 Posts 5 Posters 1.2k 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.
    • Dan KorneffD
      Dan Korneff
      last edited by

      You need a callback to trigger the function

      HiseSnippet 1289.3oc6X0saaTDEdV6r.1kV0hpPbCRih3BWnjX6lVPJBEm3XWhZSia1zB2UMY2yFOJ6NylYmMsNndEbQeN3UfGAdAPhW.3MnuAvY10N65zsoFiZDpBe2b9Yluy2LmeVOPIcg3XohXUauQQ.w5CscFIzC6NjwEjs1jX8o18dHsE8dB49z1zALEitGDqosVp4RMIaLJhEGCdDKqp203hUsEHo+d4ZavBXBWHWDg7XI2EtOOjqykNny83AA8Ydvd7vBVuRmsbkhtx.YBBup1MIQL2CYG.OfYLqhMw5854w0RkilogXh0BaH8F4LT9TQl8OlGy2O.LKZQbvMJSbeYfmAwFojtC4AdClPCwDhk8fbRoZFobc6s4d7SkmSNWMUAM2ih7gUkyCdsJBulyN7rJ.uExf20rcbU7HctFC1tj8VBMn7Y3UPQXkYKoxOVwtqDsPnWJjcHzWgKN0iF2oYyaRucyl2X0KW+x0wKB7J+Xlh16gsneCM8MxRG.5d99fqtwhn3EuwpSYW6xsqswt5bQ.W.T+DgqlKETo39RmgPfeeEbjAVJYPCWYXjTf.7l3VFj.2n9OTu1xKGHeJM1XK0GMtds.oKKfBG48LCzZR+bCHWZClvaGe+XPS+hTAlcd0hV29TqaeVqaOwZiinv00ZEe+DMzH8XlfmTCZ+pFzN2fmmxeKu7HYBU.fGkQwyOXe7oLcHn.pVRQWO3.PQ0CyYDiWStdP9q6DpnwhlLQjrMm5Xhp63MrQYrn4Br.M+.oF1QzHkJq+75zypx2uTci2r.PUpZSlq57brgHIbePU7hzXH9Dd5bD6WeNRwTX2LlofgRwVBtdmHP75xbHioSSNzXTglpSyftx3LHm.tGnHbLQ48sSIZRJfGWU5ONoxO2g7ns1joYS1FbGwSIBTZtI.r1DNFqwkkXVydSH9PsLJ01w2fXl4a7PeVdYvc5LpXsxPtmW.LPFyMD7oZdwu1IVCQN7Slf0N+4I+zZgEqHuRmPV9F+heuSbhuOGkXaS+1SHgROvT0v71IADtiHdfOKIP+3BL.52uzg7pkfvBgRuj.ld5pilVBiUXPawxPlRMBLJFUrkwakRlyJbul8.t1cX43sRI3EeB71Fuia.cY6rBn4fcA69e+71so7lgMKqaSkBXo9jG0cSTGC8NJEG133AslBHOHIrOO.6iXRmsrv3wTbs4zSFH7ZULmxHn8Ys3VmUvJ4BtZm982qmfgQTVzWc5nu5rE8kP96JSzbwAayvpxlbCLbbvIPbAj6EBHHMppXJmjstoYsARNPZTZa8W3uwJaMgBLJaMQIYVH01+OoN2j5UxH0KY6fCYjNCRJs9woqoeG6XfdWP.JS9eqyYF1eaVmgMZlmgcGWMd76oXh3HY7TarCDx2CaQDWT3ihASA4cMEjJJuqjoJU0KWqOFjk5iCSmnRqrsdnLQnmpRV0+kkOJcX0E9O8rzWb8wpNav8MLtesIXzgGFE.8DGCA3jGoX7ivQMR6VOQ5zuq2VJjQCkBtawK8cgwidVD6kFP37s3.l4Rtdmcg.fU7A7m0493COlZ6z4HlKtn0ryEm280mXmAWpIYj9tw7GUeGZ9i+AP4hnwwEwYDxbUxm3l8YGl2xePpDLtEo+aF0r21rld52aXaa96Uvo84Ow00P2eIxOk6S64vmaMG9rxb3ysmCetyb3yWMG970mqOllQqmnkgYohnfA8R+tOKqBiHQ9arPecv.
      

      Dan Korneff - Producer / Mixer / Audio Nerd

      1 Reply Last reply Reply Quote 0
      • DanHD
        DanH
        last edited by

        Hi guys, I have a similar enquiry and am well out of my depth!

        I would like to control 3 parameters with one knob on 3 different AHDSR Envelopes (I have a Sampler, SineWave Generator and Waveform Generator in my project).

        Any help would be hugely appreciated, I've learned a lot from the forum so far but have a long way to go!

        Cheers, Dan

        DHPlugins / DC Breaks | Artist / Producer / DJ / Developer
        https://dhplugins.com/ | https://dcbreaks.com/
        London, UK

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

          @DanH Can you write a callback that controls 1 parameter?

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

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

            @d-healey Hi David, the scripting is super new to me so the short answer is not really!

            I find the Hise UI very intuitive and have made pretty much the sampler I wanted in a couple of days, but the extra functionality afforded by scripting is currently beyond me and I need to learn!

            I've opened the knob link snippet from the Hise website (https://docs.hise.audio/tutorials/recipes/ui/general.html#link-sliders) and got close but ultimately couldn't link the three knobs to the ASDR functions.

            PS - I downloaded and compiled Hise for the first time on Wednesday! Following your video of course!

            DHPlugins / DC Breaks | Artist / Producer / DJ / Developer
            https://dhplugins.com/ | https://dcbreaks.com/
            London, UK

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

              @DanH The snippets given in this page so far (with a little modification) can do what you want. Since that's a little complex for you at the moment it's probably best to start with this video and get familiar with the basics of HISE scripting.

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

              DanHD 1 Reply Last reply Reply Quote 1
              • DanHD
                DanH @d.healey
                last edited by

                @d-healey Thank you, much appreciated :)

                DHPlugins / DC Breaks | Artist / Producer / DJ / Developer
                https://dhplugins.com/ | https://dcbreaks.com/
                London, UK

                Dan KorneffD 1 Reply Last reply Reply Quote 0
                • Dan KorneffD
                  Dan Korneff @DanH
                  last edited by

                  @DanH I highly recommend @d-healey Patreon. You'll learn so much AND he's a great teacher.
                  https://www.patreon.com/davidhealey

                  Dan Korneff - Producer / Mixer / Audio Nerd

                  DanHD 1 Reply Last reply Reply Quote 2
                  • DanHD
                    DanH @Dan Korneff
                    last edited by DanH

                    @dustbro Great shout, thanks for letting me know!

                    In the meantime, I'm getting my head around the script in the snippet you posted above @dustbro. However, in line 3, when I try to change 'EQ1' to the modulator I want (in this case the AHDSR which I have called 'ENV1') I get the error 'ENV1 was not found'.

                    My line is: const var ENV1 = Synth.getEffect("ENV1");

                    I had this before as well, I don't know if there is a special name / code for 'Gain' modulators as opposed to 'FX' modulators... FX always works, Gains do not!

                    DHPlugins / DC Breaks | Artist / Producer / DJ / Developer
                    https://dhplugins.com/ | https://dcbreaks.com/
                    London, UK

                    Dan KorneffD 1 Reply Last reply Reply Quote 0
                    • Dan KorneffD
                      Dan Korneff @DanH
                      last edited by Dan Korneff

                      @DanH said in One knob controlling two parameters:

                      My line is: const var ENV1 = Synth.getEffect("ENV1");

                      This declaration is not correct. You would need to use:

                      const var ENV1 = Synth.getModulator("ENV1");
                      

                      The easiest way to to get reference to a module is by right clicking on it and selecting "create generic script reference" and then pasting that into your script :)

                      right click.png

                      And that's only half of the story. Once you get reference to that module, you'll have to use setAttribute() to select the parameter you wish to control.
                      Available parameters for the module can be found in the Module Browser:

                      module.png

                      Dan Korneff - Producer / Mixer / Audio Nerd

                      DanHD 1 Reply Last reply Reply Quote 0
                      • DanHD
                        DanH @Dan Korneff
                        last edited by

                        @dustbro Thanks Dan, that is massively helpful. I've somehow managed to do it! No doubt be asking you tomorrow about something else 😂

                        DHPlugins / DC Breaks | Artist / Producer / DJ / Developer
                        https://dhplugins.com/ | https://dcbreaks.com/
                        London, UK

                        DanHD 1 Reply Last reply Reply Quote 1
                        • DanHD
                          DanH @DanH
                          last edited by

                          @DanH So I'm attempting to apply the same script to a Legato On/Off button for all 3 synth/sampler modules. In the Module Browser these's no value for On/Off for any of the modules (I don't think). Does this need to be done a different way? Script below:

                          //LEGATO

                          const var LEG1 = Synth.getMidiProcessor("LEG1");
                          const var LEG2 = Synth.getMidiProcessor("LEG2");
                          const var LEG3 = Synth.getMidiProcessor("LEG3");

                          inline function onLEGATOControl(component, value)

                          {
                          //onoff
                          local legdx1 = 0 * LEG1.BandOffset + LEG1.On;
                          local legdx2 = 0 * LEG2.BandOffset + LEG2.On;
                          local legdx3 = 0 * LEG3.BandOffset + LEG3.On;
                          LEG1.setAttribute(0, value);
                          LEG2.setAttribute(0, value);
                          LEG3.setAttribute(0, value);
                          };

                          Content.getComponent("LEGATO").setControlCallback(onLEGATOControl);

                          DHPlugins / DC Breaks | Artist / Producer / DJ / Developer
                          https://dhplugins.com/ | https://dcbreaks.com/
                          London, UK

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

                            @DanH .setBypassed()

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

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

                              @d-healey Many thanks David, what do I need between the parentheses to make it switchable?

                              DHPlugins / DC Breaks | Artist / Producer / DJ / Developer
                              https://dhplugins.com/ | https://dcbreaks.com/
                              London, UK

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

                                true or false, 1 or 0.

                                3b19f477-12e3-46ed-b8fa-584dceed3421-image.png

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

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

                                  @d-healey Thanks again David, so my script is: LEG1.setBypassed(0); which will turn the legato on when I click the LEGATO button, but not off again.

                                  DHPlugins / DC Breaks | Artist / Producer / DJ / Developer
                                  https://dhplugins.com/ | https://dcbreaks.com/
                                  London, UK

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

                                    @DanH And if you set it to 1 it will do the opposite. Can you think of a way to get a 1 or a 0 when the button is clicked?

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

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

                                      @d-healey haha, I will certainly try! PS - I am exhausting all avenues before eventually posting on here and am hugely grateful

                                      DHPlugins / DC Breaks | Artist / Producer / DJ / Developer
                                      https://dhplugins.com/ | https://dcbreaks.com/
                                      London, UK

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

                                        @DanH I'll give you a hint, try checking the value of the button inside the callback ;)

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

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

                                          @d-healey 2 hours later and I still can't do it! I'm hopeless 😰

                                          DHPlugins / DC Breaks | Artist / Producer / DJ / Developer
                                          https://dhplugins.com/ | https://dcbreaks.com/
                                          London, UK

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

                                            @DanH LEG1.setBypassed(value);

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

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

                                            12

                                            Online

                                            1.7k

                                            Users

                                            11.9k

                                            Topics

                                            103.2k

                                            Posts