HISE Logo Forum
    • Categories
    • Register
    • Login

    Linked Knobs kill sound

    Scheduled Pinned Locked Moved Scripting
    2 Posts 2 Posters 138 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.
    • T
      treynterrio
      last edited by

      Hi there, I've linked 2 Filter Frequency Knobs with this code:

      inline function onW1FreqControl(component, value)
      {
      	Filter1.setAttribute(Filter1.Frequency, value);
      
      	if (Button1.getValue())
      	{
      		W2Freq.setValue(value);
      		 Filter2.setAttribute(Filter2.Frequency, 1-value);
      				
      	}
      };
      W1Freq.setControlCallback(onW1FreqControl);
      
      
      inline function onW2FreqControl(component, value)
      {	
      	Filter2.setAttribute(Filter2.Frequency, value);
      
      	if (Button1.getValue())
      	{
      		W1Freq.setValue(value);
      		Filter1.setAttribute(Filter1.Frequency, 1-value);
      		
      	}
      };
      W2Freq.setControlCallback(onW2FreqControl);
      
      inline function onButton1Control(component, value)
      {
      	if(value)
      	{
      		W1Freq.changed();	
      	}
      	
      };
      
      Content.getComponent("Button1").setControlCallback(onButton1Control);
      

      when I press the Button to link them it kills all the sound and I've to reload my project. Does anyone why this happens?

      A 1 Reply Last reply Reply Quote 0
      • A
        aaronventure @treynterrio
        last edited by

        @treynterrio you mean linking the the component properties?

        Having a link there bypasses the control callback. Could be related. Does it also blow up your interface? There's currently an issue where setting anything with a frequency parameter in scriptnode to undefined breaks the audio engine and sends a weird sub20hz signal at +24dB

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

        41

        Online

        1.7k

        Users

        11.7k

        Topics

        102.2k

        Posts