1 on/of button controlling 2 effects
-
I want the on/off button to disable the 'RC20' effect I’ve created, as well as the vinylON effect. This is to ensure that the vinylON effect cannot play unless the 'RC20' effect is active. I’ve asked our good friend David Healey about this before, and I heard there’s a workaround due to a bug. However, I don’t understand how to implement it. Can someone help me? See the attachments for what I’ve tried to connect and an image of the effect.
inline function onVintageControl(component, value) { ButtonVintageON.setAttribute(ButtonVintageON.Bypass); VinylON.setValue(Bypass); }; Content.getComponent("VinylON").setControlCallback(onVintageControl);
-
@tiesvdam use setValue(0); when the effect should be bypassed and setValue(1); when it should be active
-
@tiesvdam
I don't really understand what you want to do, but if you want to control two effects with one button, you can do it this way. You could also script the values of the buttons (setValue
), but you don't have to if you put them in a RadioGroup like in my snippet. If you do want to script them, don't forget to use thechanged()
function after setting the value.Also set the buttons to “save in preset”.
Here is the snippet:
HiseSnippet 1048.3oc0V0yaabCFlmrYZN0OPMPGxTwAiNHWDXHYIGqffBoZIqTiFaKX45joFPwixhv2QdfGOmpT3w9iHa8uQ25Zm6XG6T15+f1Wd7juS1xtJBsEnZvvu78qG9vG9xquRRYwwRExo7IShXHmO.OXhPOtyXBWf1uKx4A3iDLucSzZovS+JoGazHFUGi1cRDINl4ibbV4olncbWEk96OZsKIfHnr7kPnSkbJ6Y7PtNe09s+ZdPPOhO6DdXgnazdepTzQFHS.jsBtJJhPOmbF6PhIrRXzWQhGib9bbcl+VMaR1tQ85zlOtIcGJoIiVa3NU2hLxudSl+P+Fa2ffbt2d9bsTMPSzrXnn6J8mLXr7UBaCNkGyGFvLF0PCfNaWF0YLOvu+TZJFgbVseNoshkz9D7Abe9UqmSdebpCu7LJRZNktKHU6c.RNEfzpVHsFd.Uwiz4dL348w6KzL0HBb1TDJ1XQk9rR3NRHBgdyPx4rdJv3pLp7npUenG7mMdR4xv4Sr1qyXoJI16K7REMadFSuWp5nx5VOqCgZi7X1EL0v4Eo0iIxxbQ.GDaiRDTMGjaRwobgFN2MfRICpPkgQRA.uG5cAIHgsQ4uurKeTkLCWvx014MiY5o6vJiHAwLnAtt1lMemWV1kA+6sVEsJ4VKxTeWV9RXeLkCgcYmoHtx5vdYRvQGt9FlLy1QcHAACAsckquU23IEXgCkZ1QhJo61xWV165tFMZt9xJU.SMW2l6bp6JwJhjvgLUQt1DHnwlU3duES3RsrRg.kh8Eb8QQrL6dx.eifz7+2TlixnUPvWJCgPn5T49GkI2syoPbnHt3LBGkB+himPKP5qgsFYGK4kA6jVkuY+tDMwb4KCV.TiXJM2vHNcYW.i6rWEcwcYwmqkQo3NSN.0YAP92kiZQ6I4FcaqH9b4SUxDnpXbsMMyEVjZeys0s0iucd83lCZfQbR+j.hd14dlWDxb.ZpYF1XFnHh45IEORdGFFV8NGFtnPbMbetlNd9XrzbvnQ18u.FydB4Cw14g4.bUbuWrruWb2s2oTg9+d19eerchWZquxnX6OF5ZFaztd8es0y495wYK7ye5O7as5wfWagYYECpKKfL647J+C8nG5XYhlKN6.hVwAML9vjvAv2KPY.EJDvjbyU0RlwFV6pSu5NfI7SM9S3WlyZFamLm0l5r34j6ISuRwCiBX12.xXqLiYXKoLb.+0SYre7Mu4ss5RBi.DmyO+dqmyzOCRNHOreoUW0jqs1amgrSWnmhwdMCTuE5vO8+L18+hdDRnJ4Ko148Fs+8SWA12hzukzEefw1q10ek.gBgOc6kT5rk5FIt0xlX8kMwFKahaurI9nkMwcV1Da92mn4Kq+xDsLzN8FgNn+doOI63rmf.p7z6gn+BGfWmK.
All the best
Oli -
@Oli-Ullmann Okay thanks! thats look like something i can use. 1 of the effects is maked true a LFO can i adjust the code to Synth.getLFO? of is it not working then?
const RC20 = Synth.getLFO("RC20"); const Vinyl = Synth.getEffect("Vinyl Crack"); //knob connect inline function onVintageControl(component, value) { if(value) { RC20.setBypassed(false); Vinyl.setBypassed(false); } else { RC20.setBypassed(true); Vinyl.setBypassed(true); } }; Content.getComp
-
@tiesvdam
With this command you get the reference to a LFO:const LFOModulator1 = Synth.getModulator("LFO Modulator1");
All the best
Oli