• SliderPack always round up

    Solved General Questions
    3
    0 Votes
    3 Posts
    151 Views
    VorosMusicV

    @d-healey
    Perfect, thank you!

  • 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); }
  • 0 Votes
    10 Posts
    2k Views
    Dark BoubouD

    Well yeah I opened it, it works but not when I insert it in my code, but I'm sure it's about onctrol.
    I have found another solution!

    Add knob, speed LFO knob. When you select 'not sync button' (position 1), the knob has range 0 to 50.
    Until here that's the same as before.
    But if I insert this condition:

    inline function onBUTTONControl(component, value) { KNOBHERTZ.set("visible", value); }; BUTTON.setControlCallback(onBUTTONControl);

    And then add a second knob, with value 0 to 1 for synchro, then add this similar line:

    inline function onBUTTONControl(component, value) { KNOBSYNC.set("visible", !value); //Inverse value of the other knob }; BUTTON.setControlCallback(onBUTTONControl);

    And then it switches btw the two knobs, but we don't see it! :D

    I go try it, I hope it works :P