HISE Logo Forum
    • Categories
    • Register
    • Login

    One knob, many parameters from many modules

    Scheduled Pinned Locked Moved General Questions
    7 Posts 2 Posters 637 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.
    • hisefiloH
      hisefilo
      last edited by

      I'm trying to control the decay time for 8 sinewaves modules with one knob.
      I've found this, but it works only into one module. how can I do to select all of the Decay Times for all of the modules into a container?

      const var Delay = Synth.getEffect("Delay");
      
      inline function onKnob1Control(component, value)
      {
      	Delay.setAttribute(Delay.DelayTimeLeft, value);
      	Delay.setAttribute(Delay.DelayTimeRight, value);
      };
      
      Content.getComponent("Knob1").setControlCallback(onKnob1Control);
      
      Dan KorneffD 1 Reply Last reply Reply Quote 0
      • Dan KorneffD
        Dan Korneff
        last edited by

        I'm not sure how to script the time variants of a knob (i.e. 1/4notes, etc...) but this script will get you most of the way there.

        const var Knob1 = Content.getComponent("Knob1");
        
        
        const var delayIDs = Synth.getIdList("Delay"); //Get IDs of delays
        const var DelayFX = [];
        
        for (d in delayIDs)
        {
        	DelayFX.push(Synth.getEffect(d));       //put delays in array
        }
        inline function onKnob1Control(component, value)
        {
        	for (i = 0; i < DelayFX.length; i++)
        	{		
        			DelayFX[i].setAttribute(0, value);   //control all delays in array
            }
        
        };
        
        Content.getComponent("Knob1").setControlCallback(onKnob1Control);

        Dan Korneff - Producer / Mixer / Audio Nerd

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

          figured it out...
          This line will change the mode of your knob to tempsync:

          Content.setPropertiesFromJSON("Knob1", {
            "mode": "TempoSync",
            "stepSize": 1,
          });
          
          const var Knob1 = Content.getComponent("Knob1");
          Content.setPropertiesFromJSON("Knob1", {
            "mode": "TempoSync",
            "stepSize": 1,
          });
          
          
          const var delayIDs = Synth.getIdList("Delay"); //Get IDs of delays
          const var DelayFX = [];
          
          for (d in delayIDs)
          {
          	DelayFX.push(Synth.getEffect(d));       //put delays in array
          }
          inline function onKnob1Control(component, value)
          {
          	for (i = 0; i < DelayFX.length; i++)
          	{		
          			DelayFX[i].setAttribute(0, value);   //control all delays in array
              }
          
          };
          
          Content.getComponent("Knob1").setControlCallback(onKnob1Control);

          Dan Korneff - Producer / Mixer / Audio Nerd

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

            and here's the parameter list of the delay modules
            Screen Shot 2019-01-04 at 9.16.08 AM.png

            Dan Korneff - Producer / Mixer / Audio Nerd

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

              @Christoph-Hart I see there is a Hi/Low pass available on the Delay, but no control for them on the module... and scripting them does nothing. I'd love to be able to access that.

              Dan Korneff - Producer / Mixer / Audio Nerd

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

                @hisefilo Just re-read your post. this would adjust the release of the simple envelope on your sine generators:

                const var Knob1 = Content.getComponent("Knob1");
                Content.setPropertiesFromJSON("Knob1", {
                  "mode": "Time",
                  "stepSize": 1,
                  "max": 20000,
                  "suffix": ms,
                });
                
                
                
                const var SimpleEnvelopeIDs = Synth.getIdList("Simple Envelope");
                const var SimpleEnvelopeFX = [];
                
                for (s in SimpleEnvelopeIDs)
                {
                	SimpleEnvelopeFX.push(Synth.getModulator(s));      
                }
                inline function onKnob1Control(component, value)
                {
                	for (i = 0; i < SimpleEnvelopeFX.length; i++)
                	{		
                			SimpleEnvelopeFX[i].setAttribute(3, value);   //control all delays in array
                    }
                
                };
                
                Content.getComponent("Knob1").setControlCallback(onKnob1Control);

                Dan Korneff - Producer / Mixer / Audio Nerd

                hisefiloH 1 Reply Last reply Reply Quote 0
                • hisefiloH
                  hisefilo @Dan Korneff
                  last edited by

                  @dustbro wow!!! That's what I need. Thanks. Doing some weird stuff here. Trying to do a sinewave bank but controlling pitch, dbs and decays by groups. I'm reinventing wavetables I think

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

                  46

                  Online

                  1.7k

                  Users

                  11.7k

                  Topics

                  101.9k

                  Posts