Confusing issue with scripting simple knob for AHDSR Envelope Knob
-
Here is what I have and it compiles ok, but the knob instead switches back and forth from monophonic to polyphonic mode on the envelope. Im sure someone knows what I am doing wrong. Thank you :)
//FILTER ENV ADSR KNOB
const var AHDSREnvelope1 = Synth.getModulator("AHDSR Envelope1");
const var KnbAttackEnv = Content.getComponent("KnbAttackEnv");
inline function onKnbAttackEnvControl(component, value)
{
AHDSREnvelope1.setAttribute("AttackTime", value); //I've tried "Attack" as well};
Content.getComponent("KnbAttackEnv").setControlCallback(onKnbAttackEnvControl);
-
Nevermind, I got it with this...
inline function onKnbAttackEnvControl(component, value)
{
AHDSREnvelope1.setAttribute(AHDSREnvelope1.Attack, value);
}; -
@maxtownsley why are you scripting it instead of using processor/ property ID?
-
@d-healey because I am actually linking the one knob to 3 different envelopes
-
@maxtownsley Can you use the macro system?
-
@d-healey Actually I just remembered I made a script for this exact purpose, and it's public domain so you can use it in your project - https://codeberg.org/LibreWave/RhapsodyBoilerplate/src/branch/main/modules/AhdsrController.js
-
@d-healey Amazing, thanks!!