One slider pack controls two modulators?



  • Hello
    Is there a way to control 2 different LFO modulator's Step shape with just one slider pack at the same time?
    Ths code didn't work...

    inline function onPhaseModSliderPackControl(number, value)
    {
      PHASERLFO1.setAttribute(PHASERLFO1, value);   
      PHASERLFO2.setAttribute(PHASERLFO2, value);
    }
    PhaseModSliderPack.setControlCallback(onPhaseModSliderPackControl);
    


  • @orange PHASERLFO1 isn't the name of an attribute.



  • @d-healey It is just a modulator name



  • @orange setAttribute(PHASERLFO1... what attribute do you want to change πŸ˜‰



  • @d-healey Yes I know after PHASERLFO1 there must be a comma and it must continue with an attribute. But, in this case what should it be? I can't see the attribute from Parameter Properties panel. There is just processor ID and ID is PHASERLFO1 ...

    So what is the attribute for that Step shape?



  • @orange Not quite, if you have a look at the API reference you need to include the index of the attribute you want to change as the first parameter. I don't know what the attribute index is for step shape but what I do is just try numbers starting at 0 going up until it changes the parameter I want. Some modules like envelopes have predefined constants like envelope.Attack but I don't know if there is one for the LFO.

    So just try PHASERLFO1.setAttribute(0, value); and see if it works. If not try 1, then 2, etc.



  • @d-healey I've tried from 0 to 11. it doesn't work.



  • @orange That probably means it's not set up. I assume you've saved the PHASERLFO1 in a constant variable?



  • @d-healey Yes I've declared

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



  • @orange Well I'm not sure what you're doing wrong but it works here. I realised you can get the index from the parameter id dropdown in the interface designer. I set it to 0 and that moved the frequency knob so going through the dropdown I figured that waveform type must be 2.

    HiseSnippet 1309.3oc6X0saaaCElxIrKwqIqcqWtKDBv.RQ5BrcyOsHXnNwItHnwwFQYsKaWTvHQaSDIRMJpj4NLf8Fr61KvdA5ivdj5av1gT9GoDuDqr01.r3KLzg77Q9wye5P0RJboQQBIxZ1C6ERQV2E6ziq5VqKgwQ6tMxZdbCRjhJsSFZqdgjnHpGxxZpmqGvZ1oQleu6YaQ7IbW5ngPnWJXtz8XAL0nQCq9BluechG8PVPJsWo5ttBdMguHF3yT3RnPh6IjNz8IZ0JfQV3c7XJgz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umxOx+n0gG1qWSP1Yo2.O9Dl+Q9m0768Op9Rl4mLY8VszxW3cySMYd0qvSdYQdegwoNz8ocu2va4IgwCistgv3KjsburYKUtMc41zkaSW9Wemlo9e+cZtLS278uQiMr6R0Mb+7cwlVUs0k39XQ0CDwJnVXChRxzeq.3RKNvE0boou5RA80gRjKokMkQobOiveA+5OY4A2yQOY4AShbGrTvYq+yIkFmhNnbqUAe3FT9oCoifqCpoDzPNJx3TCzMQOs1xAi4.EjSt2WBe9GuyWClaKAXLg7HcER7FeXNzADWo30tIeXI8QeFyH.C3lus6r3FZY6geQIsyJ.ZO+0tt5rputLBMdDUxMhGmaDqjaDqlaDqkaDqmaDO4RPnuKzlwv61SpwhP+MwpSURAοΏ½
    


  • @d-healey Ok thank you for the fix.

    But I mean a "SliderPack" (not Slider knob) that controls only the STEPS shape.
    I've done waveform selecting with a combobox.



  • @orange Oh you mean you want to control each of the step waveform? I don't think that's possible at the moment



  • @d-healey
    Yes exactly. When we tweak the step bars from a SliderPack, the both of two modulator's steps waveform will be controlled.



  • @orange Actually I think I've thought of a possible way. Create two hidden slider packs that are set to control lfo1 and lfo2, then create a visible slider pack that controls the two hidden ones. I'm not sure if this is possible but it might be worth trying. I have to go out now otherwise I'd try it myself. Good luck!



  • I think it is possible with only arrays, not float values. But I can't find a way...



  • Try using one global LFO and connect the SliderPack to it. I've never come across the need of connecting a slider pack (or even a table) to multiple elements (and it would require a lot of rewriting to allow this because it messes with the ownership concept of the data models).



  • @Christoph-Hart @d-healey
    Ok, I understand. I will solve this with an other option, disabling/enabling second modulator.

    I have 2 tables, 2 modulators, 1 combobox, 1 button.

    Combobox selects waveshapes of 2 modulators at the same time. Button bypasses between modulator 1 & modulator 2.

    When combobox selects table waveshape; it should check the button value (0 or 1) and it should decide which table to show. I've used a local variable for this. but it doesn't work 😞 (value == 6 is table waveshape of the combobox selection.)

    	...
    if(value == 6)
      {
    	    	
          local button1value = TableChanger.getValue();
    
    	
    	  if(button1value == 0)
    	                {
    			   Table_For_LFOMod1.showControl(true);
    	                   Table_For_LFOMod2.showControl(false);
    			        }
    			        
    	  if(button1value == 1)
    	                {
    			   Table_For_LFOMod1.showControl(false);
    	                   Table_For_LFOMod2.showControl(true);
    			        }
    			        
    			        
    	}	
    		
    		
    };
    
    

    This is the snippet:

    HiseSnippet 1851.3oc6Zs0TabCEVKfRvFnkb4g9PeXm7joIwi20WvLYnwfARbCDbiIjzzGXVuV1VC6Em0xbIYnS9AzY5eo9VeMu2+D4ePqzpcWq0WVeoAJYlHRvHctnOcNGoUmy5xN15n1ssc.RKbv4sP.oEgUN2hzrXSMrEnzV.oaBKqYgL.addKs1sQ0.RRy9DFQoXyAbae5wapYnYoi5ND.bnMVGsK1DS5NZqBOCaXriVMzAXSAtyTnjtsUQaC6NTfLKLEnkl9wZMPOWiw1LPvIXzosARofoUS5brR02sQRZ6cmc5a1q7poT1ciWt5oU1YqjIeZwjmvH85sY+Fn2wwAYQNjJNPBJ8OzlDb6ZXhsSEhFAQ04baZW67JMsO0hO0GhaiqZfXcT.UnXhO7N1F0XKd1nfhMwF0J6a6ZCnZobWK4rbK4cg6gqgCFuqEcYWBxckPzzJMSTvSQDdoFe3II.u43v6VvJ5N3VjtTXXaAXIKBxotF0aJBKNufY96EgEsobXQRZpcLZGGZm.IRjKUpGHmMUpUdzRw4+P8qsIxmn4H6FEoHutru7MPjh1lsrsncRbON46wjrGYTiVF0AIS5nkI8fjISzxjYPxjMZYx1iLT5Us2z9rgaFB3nGIOPi5zogPVMPNCUXQlFj7GsisyQ6ty96YWSIZkHx4Hzj5XqItmRTW7w6XnQC3YHx8nGlVBFMw8BwSOXQjl5XHuOB59C1x.agjq2wRmfssjssDMhr0kisQBc+E0CnSqQGzJKE+8KEODxR1FQ72vjfyziByhZHVTdX.SWrTbwIkwl2DWTyvnJ8nvDCDVhqk9WGAQRQuHh02pXCBwAWsCAkHLoWocBh5LMYGe3qhG0iBTGtBTGpBn+CWmayjWecYEJvhwPVL9YBIaSO8ye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12L38WfMaYfdhOTVxa.Y2QF9aw..1BYnEx98Jdfp+.+RgA7dNjlM7Ba1wagMhWgPzABLfKeIE3NAV+YD.7hb.CYaYcQYumwLRLtiC5scPV5BCJWf8thJ00IU3OJv10W2eWufeXWTC5DIpvCPzCtpbtktHaULssIMwVMB+FntaghcZSrM809zdA1JDTK2aKJ8qvbYRd4z5ae8zGyMyXFycGl2TNvuwB9tlebIGwAAUWSP7H1lnNpyzuZ1l7oGO1aS97ji0W2170sMSKhuMz841xewbQtaCcuWwWN.dYVhRWCf6Kr6PnGIsmFwAyxY64cLqPyuR2MeVZlbrJ1IMCKCUd+Tr9tOzGYUKk+2+COhJr9RdDU7IdkLGlZ5N1GoyK0E63j4cGgttsb+9tDCtGqubPw0X1FSbM7Q55rqV+Pp0YvRnNwRjdhkHyDKQ1IVhbSrDqNwRjOBIXe+b1nC8Ac73c.3ewRFZhF
    


  • Your code needs some work. Give me a few minutes πŸ˜›



  • Okay, here's a version that works. I made it so the button hides/shows the tables, not sure why you wanted their visibility set by the dropdown menu, the button made more sense to me so that's what I went with. I've used the onControl callback rather than a separate callback function but you can do it which way you prefer.

    HiseSnippet 1890.3oc6Zs0bSbCEVaRDDavTt8PenOrSdxg.Id8kDmIkhIIDHkDhKNEnkgIy5cks0vtqL6JGHCS5vOfNS+K025q7Sg+AsRq1KZ80XCIMLC6.wQ5bQe5bNR64bbp5RLPddDWfRp8OpMBnbYXsibns1nkN1Ar8l.kKBqp6fr.qeTacOOjIPQY5GxIpjZFf+ymt255V5NFn3o.fmQvFncv1XZ7rsq7Xrk0V5ln8w1RbWrx1FDmMHVjNLfLMLGnstwq0ahdhNmsof.E3CLwThaMpNE4ATlYch4Q0ZQdqif+mg8v0sP7AZfZLEIldKhkIGw7YAazBaYVMbC6AXZoZ71eZw1+lvcwl3n4iMCW0mfZrDx1CkoFF7zjgWtSN7Tjf2LB3cMXMCWbaZLEN1tDbaGJxsgNyEHCKAufopdY3FDFGNzEs0eMZKW1fHIxtbtb2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CpUdUvawlzV9CxWFzBga1hxYoPdfsNiYnxEX6ULEYy.xsDMyPKs3MXhOJH9nn3iRoCLidUs5zD6TU2U2FwJVlsMlBHA3YSZ7EcIgi1YCVj.nlmC0YfqVVFoqHgzUVATm3ZhbeptItim3nxggmfTlVdQSOhEM+m0hVuYXSXtLTqXwbqVr3pZk7MdgDtDrb9bEJWpToUmTLV.36V9Ilag6DUpy9kIGk4KuLCMqn0MJysb4hZkKLPK4ENIm+eWz4kOfqbTzfJ+dkP.q7A13P.CU9AwcDmXaQwSeaQpK7mW5i+CGWSn+pzYAF+3Guzvv3riysswdMPUIu1e+hXu1ejvq8XdyICemy1Ls9cvD8r.zN7R.Nwq.k6.QB2cpw4BYofq8jf4GlTXlenvT1v1aiEuJLRMx87j2n2.BrzdRzbQdCDc7vzijaD7oRiPOov8Zvp7FO1e7NUevK6sUm13MnsxYfOnQCjAMFry.25ESZOj6eKtyMpdHewnN7isaagdXHTxDLgp+LCtO+.vlHK8D1umKBTCm32pzmuI.koStwl9jswFQ+5Gdf.G3pmRAtig0eJI.mQ.XH+HqOJ69NlQhwsbQuoCxwPZR0J7uMksicRU9qJ7S8MBO0Kk56NnlrERVg6iXWbU6HGCY2UMaBg1B6zL42QyMqrCgz9AN7awLkUxFc7nD6vEcRyosFE01OARkWBWt3hmNO8bbexCEm5DFJdCtSVMxcxiIOmeKp.wQwZmSP7HN8jeTW0e1b54S26y8zyWlpw91ooucZZRQ70g9ukW8qlz9tNzOKjud.7U4kUcN.tOkzgxtoZWcpKlWg2S5XWiUMlgeOz4e0y7ZNlhWOqXbN9X+TDPNl9C9W1S.QM9Xk.hZgDOSVCacCWxAFhlhwuNYV+YX6aG++9QRA2kOVMpMbbaiM1DefgAOQ76vrN8Wh7isDEFaIJN1RTZrkX4wVhUFaIJODI3+oyb+NrWzIh2Af+yxYRsZ
    

    Tips...

    You have some horrible code πŸ˜›

    Stuff like this:

    Panel1.showControl(false);
    Panel2.showControl(true);
    Panel3.showControl(false);	
    Panel4.showControl(false);	
    Panel5.showControl(false);
    

    Whenever you find yourself repeating the same code like this you need to either be using a function or a loop. In this case I'd have changed it to a loop (using an array). I've actually not touched the panel show/hide code as I don't know what it's for but I have created the array πŸ™‚

    const var TableChanger = Content.getComponent("TableChanger");
    TableChanger isn't a very good name, it tells us what the control does but not what the control is. In your small example it doesn't matter too much but in a larger project it could cause a headache. I've renamed it to btnTable it's a button that does something with the tables πŸ™‚



  • @d-healey wow thank you so much πŸ™‚ πŸ‘ You are a great coder πŸ™‚
    Selector shows only tables (not Panel1, Panel2...etc relatively they are selected). But how can we show only this function when combobox selects table?


Log in to reply
 

11
Online

517
Users

1.9k
Topics

14.6k
Posts