bypassed to 2 buttons



  • How can I bypassed an fx with 2 buttons.

    ex: when I pressed (a) button (b) button gets pressed as well bypassing the fx


  • administrators

    Scripting is the solution.

    const var SimpleReverb = Synth.getEffect("Simple Reverb");
    const var Button2 = Content.getComponent("Button2");
    
    inline function onButton1Control(component, value)
    {
    	Button2.setValue(value);
    	SimpleReverb.setBypassed(!value);
    };
    
    Content.getComponent("Button1").setControlCallback(onButton1Control);
    

    Example:

    HiseSnippet 984.3ocuV0zaaaCFlz1Zq1ctaEnG2AUexAqyv1oeLfhA6Z63AiljFDmktaEzRzwDQhTfhJoNEEn+M5s92X+D1uicY81NsqauTTJRNUMH5vpN42Od36ie4CeIOPJbnggBIBe6iVGPQ3uwZ9ZtZ03UDFGMaBBeGq8HgJpz13Zz5.RXH0EgwU+EsCb8Zn3u+dvHhGg6PybgPGKXNzcY9LUl2fgOm44Mk3ROh4mK6GNblifOV3Ih.9T0pKJf3bJ4D59DcZUrPmwnmGhvcs1teG4o8Vbwy5bkue3Ii1sSmka5G4DIkTt5X.NBag+W3CasiKSIjyUDEEVypiDtqmuRbN2T5iYgrEdTsQOzbfSF2nwqXdtGj11BQHbsCxZhUMMw6YsGykco+rl42EGvNCQ91ItxlTp1FTp2miRSEdt5E3yPObN5UyPu6ZM2QxBTYQzb61Vy3v97RBrClmVlbQU9Gr0XAjAW0wmbJcpDLtDQ6G2s6CreT2ta8zlMZ1.1GCU1mQj1yY9AdzComQkKr+Y6XwUmSnpcVtj5nZ2xD21jPKM5LrihTJAuO.Ksv.vwB+.AGLZ2JIdKSMYbOFmZuLh6nXBtsfah2SCVJ7Z6jh7Avp6EQ2pYi2zrQ8jUoSHUcr1caSPXMqmm753osk12+xbdabsuN90q0VZrIrXLwyaAHqaeU5oWrbbeegh9Bd6sZ7lF0a71OIxxkEEJYo7nxhhpOsIuFXs4Q9KnxztSRdfpYSY4WcyjkNlVRtDE7Ybl5EAzD6LgauBDtnjdJHgqjPPHUUr.9NIBXSGDwfEotUR6DEy97yfPk.d+Bf+qylPTD8QoDJAzLfJULc2.OgdFLhybvpt0DZ3oJQPLmSzAH7WeCX8qyJ4NCWmY77gmybUqzisdGXthxNYkRa88fEKbOgOTBhDPfqfJUM6qqoE9uf0Ys9GOE9QIp0mNVAFtIbi7HpMm3oukHI.H21Xzhd7AOjoVm+VjRLFragiAKTMcCo6csNfobVULeqT.e0xy+m4axkJMsLyLyHaMqo+1W3aPpeTprJ2nwXx7sVaLJei91gBg+b1EoGq9v6e+GGLg3Gv3mj3Z31a+mCdIUsK.1KKs+XvD45q36iCdoQkl4XpjRufBaZ4pvuO.W85thu2M+JdzghHEv08HJISenY+H+4viTbnvdAmS8B0GRpnmzXr6ps0Zi4Tta2zmbjDrm1FmDrWZvuH0vm3HEuxwLNTu0dqXOv+ad7SrpCu0CrsubHpte3CuX4UNNZ41OBR0hQzuzH1tzHdXoQ7nRi3wkFwSJMhe5ZPned3yhTBeyvGD5+vosHCW
    


  • @christoph-hart That's good but I one both of them to do the same thing. So that it doesn't matter which one get pressed.



  • @christoph-hart Thanks to david a long time ago I got something like this working for something else, I reused but it didn't work in this case.

    // ******************** Knobs(Sliders) Mappings ********************//
    const var knobs = [];

    // 1st Parameter Mapping (fx_enabled (bypassed)//
    knobs[0] = Content.getComponent("fx1Knob1");
    knobs[1] = Content.getComponent("fx1Knob2");

    knobs[0].setControlCallback(knobCB);
    knobs[1].setControlCallback(knobCB);

    inline function knobCB(control, value)
    {
    for (i = 0; i < 2; i++)
    {
    if (control == knobs[i]) continue; //Skip the knob that triggered the callback
    knobs[i].setValue(value);
    }

    //Dynamics.setAttribute(setBypassed, value);
    Dynamics.setBypassed;
    

    }


Log in to reply
 

3
Online

343
Users

1.1k
Topics

7.1k
Posts

Looks like your connection to Forum was lost, please wait while we try to reconnect.