• 0 Votes
    4 Posts
    268 Views
    trillbillyT

    @d-healey Hey David, Im doing something wrong here.

    The knobs that control the FX work correctly. The Master has no effect at all on anything EXCEPT the linked Saturator knob. All it does is turn it back to 0 instantly.

    Can you spot what Im doing wrong here?

    //MAIN EFFECTS const KnobsMax = [1, 1]; //Knobs Being Controlled const knobs = []; for (i = 0; i < 4; i++) { knobs.push(Content.getComponent("knb" + i)); knobs[i].setControlCallback(onknobControl); } //Link Buttons const btns = []; for (i = 0; i < 2; i++) { btns.push(Content.getComponent("linkbtn" + i)); } //Linked FX const var SatLink = Synth.getEffect("Saturator1"); const var ChorLink = Synth.getEffect("Chorus1"); const var PhaseLink = Synth.getEffect("PhaseFX1"); const var BitLink = Synth.getEffect("BitCrusher"); //Linked Knobs Callbacks inline function onknobControls(component, value) { local index = knobs.indexOf(component); KnobsMax[index] = value; setSaturator(index, value); setChorus(index, value); setPhaser(index, value); setBitCrusher(index, value); } //Master Knob const MainFXknb = Content.getComponent("MainFXknb"); MainFXknb.setControlCallback(onMainFXknbControl); inline function onMainFXknbControl(component, value) { for(i = 0; i < knobs.length; i++) { if(btns[i].getValue()) { knobs[i].setValue(knobsMax[i] * value); setSaturator(i, knobsMax[i] * value); setChorus(i, knobsMax[i] * value); setPhaser(i, knobsMax[i] * value); setBitCrusher(i, knobsMax[i] * value); } } } inline function setSaturator(index, value) { SatLink[index].setAttribute(Saturator1[index].WetAmount, value); } inline function setChorus(index, value) { ChorLink[index].setAttribute(Chorus1[index].Rate, value); } inline function setPhaser(index, value) { PhaseLink[index].setAttribute(PhaseFX1[index].Mix, value); } inline function setBitCrusher(index, value) { BitLink[index].setAttribute(BitCrusher[index].Quant, value); }
  • Server API and Controller bugs

    Bug Reports
    1
    2 Votes
    1 Posts
    148 Views
    No one has replied
  • CC to velocity

    Scripting
    9
    0 Votes
    9 Posts
    450 Views
    d.healeyD

    Yep the delay technique works, thanks! Now I just need to fine tune it.