Forum

    • Register
    • Login
    • Search
    • Categories

    One knob controlling two parameters

    General Questions
    5
    27
    288
    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.
    • T
      TNTHM last edited by

      I’d like to have a knob control a frequency band on two eq’s.

      Knob1 controls Band1 on EQ1 and EQ2. How can I script this?

      Lindon 1 Reply Last reply Reply Quote 0
      • Lindon
        Lindon @TNTHM last edited by

        @TNTHM

        const var EQ1 = Synth.getEffect("EQ1");
        const var EQ2 = Synth.getEffect("EQ2");
        
        inline function onLoShelfFreqControl(component, value)
        {
        	//low shelf freq
        	local eqdx1 = 0 * EQ1.BandOffset + EQ1.Freq;
        	local eqdx2 = 0 * EQ2.BandOffset + EQ2.Freq;
        	EQ1.setAttribute(eqdx1, value);
        	EQ2.setAttribute(eqdx2, value);
        };
        

        HISE Development for hire.
        www.channelrobot.com

        T 1 Reply Last reply Reply Quote 1
        • T
          TNTHM @Lindon last edited by TNTHM

          @Lindon Thanks for the code. How do I get the script to reference Knob1 so the parameters move when I turn the knob?

          HiseSnippet 1329.3oc4X0sabSDEd7twE1MMUsUUHtAoQUbQBTRWuMsfTDjsIY2RTSZ1FmV3tpI1iyNJimw0dbZ2VUItfK3I.gP7LvEvK.R7BfDRbM7Fz2.3Li8F6swJc6VZQprW447yLemiOmu43serziljHiQVM1cXDEYcZa2gB0f0FPXBzFqirdO6t2F6fuoPtGtMtOIlf2klnvNK1ZwVnUGFQRRn9HKq52P6hUiYPleOckUIbhviVHBgtqj4Q2jExTER624lLNuGwmtKKrj0K0YCOoXMIWlBvqtcKTDw6.x9zaQzlUyFYcpt9LkL1UQTzDj0LqJ8G5NP9.Ql82kkv1iS0KbPtvFkItmj6qQr9YzZCXb+9iRCIHjkc+hjR8rjxEr2h4yNRdQx4rFE3BOJmOrpcRvyYJgmUI3MSF7NmsqWLKRUnQisYs2PnnwAD3UPYXkYKpFpl8ZRvBgZwP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fwyCSjXtddjzwKx2RJjQCjBlW4JfcnPy496SiKi8JCHXbW3awJjbgN6P4TR4p42uylPUHIdKyfCSUtvYxyEmz6q20NCtXcmI9MiANp+Fz.Gu.P40wsHuNNiPhWr7ddYechtV9sMRf3VX9yMZXukdM9nOKw1V+us.eN.6ddd5z8GA4mp8o8T3yUlBeVZJ74pSgOWaJ74imBe9jSzG8kQWOUICyZEAA86Z97PKqtBBTIap5Q+CPx.Ghg
          
          1 Reply Last reply Reply Quote 0
          • Dan Korneff
            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
            • DanH
              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

              d.healey 1 Reply Last reply Reply Quote 0
              • d.healey
                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

                DanH 1 Reply Last reply Reply Quote 0
                • DanH
                  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!

                  1 Reply Last reply Reply Quote 1
                  • d.healey
                    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

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

                      @d-healey Thank you, much appreciated 🙂

                      Dan Korneff 1 Reply Last reply Reply Quote 0
                      • Dan Korneff
                        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

                        DanH 1 Reply Last reply Reply Quote 2
                        • DanH
                          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!

                          Dan Korneff 1 Reply Last reply Reply Quote 0
                          • Dan Korneff
                            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

                            DanH 1 Reply Last reply Reply Quote 0
                            • DanH
                              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 😂

                              DanH 1 Reply Last reply Reply Quote 1
                              • DanH
                                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);

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

                                  @DanH .setBypassed()

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

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

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

                                    1 Reply Last reply Reply Quote 0
                                    • d.healey
                                      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

                                      DanH 1 Reply Last reply Reply Quote 0
                                      • DanH
                                        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.

                                        d.healey 1 Reply Last reply Reply Quote 0
                                        • d.healey
                                          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

                                          DanH 1 Reply Last reply Reply Quote 0
                                          • DanH
                                            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

                                            d.healey 1 Reply Last reply Reply Quote 0
                                            • First post
                                              Last post

                                            6
                                            Online

                                            1.1k
                                            Users

                                            6.8k
                                            Topics

                                            62.1k
                                            Posts