Access and set "Saturation" parameter of Sine Wave Generator through scripting
-
Guys,
is there a way to set the "Saturation" parameter (1-100%) found on the module's GUI through scripting?Thanks!
-
use a Saturation effect...?
const var MySat = Synth.getEffect("MySat"); inline function onMySatAmtControl(component, value) { MySat.setAttribute(MySat.Saturation, value); }
-
@Lindon Thanks, Lindon. Another way I thought and will test now is to add a knob, link it to the saturator control, then set the knob value through scripting. It is a bummer not being able just to access the parameter directly.
-
Why would you think you can't control the saturation with a script?
HiseSnippet 948.3ocyW0saaaCElz1rX1cqXcnXXWJTrKbFxBr255FPvP9wwtvXMIFQoc6tBFpisIhDoFEU1LF16xdG1KxdT5av1gRNQxMBdNZsEyWDHd9Q7imy24SLSLZAjjnMDZ6yWDCD5Gx7WnryGLmKUjwGQnOfcLOwBFubSGtHlmj.ADJs4ybFnsaQx9858NjGxUBnvDg7RsT.OWFIsEVmr+OHCCGwCfykQkh9I6OVnUCzg5TDOMY8Hwbwk7YvIbWXMXD58FFHsZiukagDLlC0AK7mq+EUd7uTlHuHDbK5S7wWTtYxf4xvfIWeVSHDJaRwIuY9I+QrikAxarWTA93LGdEYTtFParNH0+N.IZIH0JGROj4KLxXagGGdtOarBaHS4XotLTxikzHfxFnwHT1ch3WBiL3haxn6S60aaO7OasamNcv5ch06JtwyWpfejeE7LPAFNdf5688dYTgclA1Lzlsp6icQ54B0qH1G6da29UrSBXOvZMxKRsP2J76yso3iRs5fHcpxts2wbbGMbUfNp6Vas6zTkv41SqNQagSUc2pyu0ocmeui2a5Z5zJ84JEFcXHXpzsiBZVWhcUoQW.lswpTXJbSfXOZ0F+81rFuHuyTJPsZrRZOMFVtdjNLv0PcOeaZBYYqEe5EiOha4NlyRaXbwfwJcvgdDbEN5kyiZyNBRtzpiwguaQxP5sNHMz0PJy4cC2Kcf0iUHZNxjJQZWTd3+NLHzasCBaJDeHahzJlWMFaTAFwJ06BLtT93iXCmNED1B.1hM5mpqVwlu8OHe6uOyMdkMhls4eJqp4z0He+Wap7c7FKeepvha+43zbRrNYkWrODIOWqbUgBiuHAEqfe9LW2rr8AZtoRWuduQ3grxbdSkkk99ic+h+bOZyU6Cs1rQ2UmHJEeEh4sdW88kVaFm4eQD4++p.q74v1WiQeYTbHLTcEDhRcYX7SPsso7zP60VWkjerVoimqURQY1wY.9QoYy.SYrW4AB+7EdIjBKOZ+yfPfWlM+46+bjExMXcBpYs3te0fJ6WeFKGtdtISu+K8s2qzr0pj2biTxeqi25qp+1AJmoSsR0L75PF4uh2W8jzHeTXU.HRTJHD2HFsgSbLecO25bkUUP1h+F+szYe2Z5Rm8u146k8HhKL5WIxuKkiK+AYVvysJ6V8sw+8BbsWeR18qv7X81oGIBUDekP3J2eIVepNmupF4700HmmTib9lZjySqQNeaMx46VaNtOFcPpUGkOJhFlLL6hlT5PEGYxYrdx+PUTUM8
-
@Lindon I add a knob, connect it to the saturator of the Sine Wave generator and when moving a knob, it alters the saturation. I can print the value in the console to see that the value of the knob is registered and changes with the change of the knob.
However, I am not able to set the value of the knob and for the value to reflect on the GUI. I use:
SineSat1.setValue(0.50);
The Console.print now outputs this value, but it is not applied to the knob either visually nor sound-wise. What am I missing here?
-
@Christoph-Hart thank you. I didn't see your answer. I shall try it in a minute.
Some days everything is flowing smoothly and I surprise myself with things I understand and come up with. Other times it seems i know nothing and am back to square one -
@Christoph-Hart That worked wonderfully. Thanks for saving the rest of my day!
It would be nice to have such an example in the Docs area for anyone with often amnesia days like me :beaming_face_with_smiling_eyes: -
-
@d-healey Oh, that's a whole new world I'll have to tackle