button to override values recalled by preset



  • im trying to figure out a way to have a button that when clicked overrides a specific recalled value when a preset is changed.

    for instance each preset would be returning a different value of parameter A. 1.3, 0.13, 6.2 etc

    but when the button is clicked it overrides the value to 0 for that given parameter even when a new preset is recalled and stays that way even when presets are changed unless the button is disengaged.

    i have the first half done by making a button control callback that if=0 and it changes the paramter to 0 when clicked..as of now however when a new preset is recalled the value is recalled from the preset

    i disabled saveinpreset for the button so that isnt affected when switching presets but the values obviously are still pulling from the preset unless the button is clicked again

    const var Effect = Synth.getEffect("Effect");
    
    
    inline function onOverrideControl(component, value)
    {
        if(value)
        {
    		Effect.setAttribute("0","0");
        }
        else
        {
                    
        }
    };
    Content.getComponent("Override").setControlCallback(onOverrideControl);
    

    this solves the first part of overriding the value but im not sure how to code a way to make a getvalue or something to make it so it checks to see if the button is engaged when a value is recalled from preset



  • @mwplugs dont use " while defining module

    for example

    inline function onOverrideControl(component, value)
    {
        if(effect.getValue() == 1)
        {
    		Effect.setAttribute(0, 25);
        }
    };
    Content.getComponent("Override").setControlCallback(onOverrideControl);


  • @arminh well its working and in the latest scriptnode does not having "x" quotaties around it affect the recall?



  • @arminh yeah that broke it. clicking the button is not setting the value to 0 now



  • @arminh said in button to override values recalled by preset:

    inline function onOverrideControl(component, value)
    {
    if(effect.getValue() == 1)
    {
    Effect.setAttribute(0, 25);
    }
    };
    Content.getComponent("Override").setControlCallback(onOverrideControl);

    yeah unfortunately that just broke everything. getValue() shouldnt it be referring to something? it seems like its pulling from nothing. should there be something in the getValue() parenthesis? because as is this just broke the override button and makes it so it doesnt change the value any more and im getting a function not found error on that line



  • any ideas anyone? thanks in advance



  • Sounds like you want something like this



  • @d-healey like what i dont see anything lol



  • @mwplugs "this" is actually the link

    here's a solution that uses an external file to store the "Reset button state" (because you don't want it to be saved with preset obviously)

    HiseSnippet 1315.3ocsWstaaaCElxIJq1ctaEXO.L9OyFH00dqsaXCE0MNIatsIwHNKX+X.EzRz1rghzPjJqFAAXOh6QXOB6MX6PJIK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qSo1AszYyuUlOleWqqUBaYac6qHQI4P3xxJIrCrpsWU9njqJGwY9zPDCv3m4ZOMEYiMYib7muBspv0Sum0jusx9.23b+pBCO+xfCHZh4B6D3.PbNMTyLAZmCnWAS+De8cU2CnpK0x4P9XYMG79+Ih+3RC9G7dKxV7ldnb5Ymhf21Oj.93dib5AGjWO+VOJTdPrU.PL.ZdLvIeyCJugbKB38sGFXszW3VnmMmA6k2f+keOEb76.wPK6FidGNRIYAPutNuDzzByKX3kqRqfc1ZEUWAc6Aofw4j9Qbht3LdlgYSH.sUEFlxLvjPwzKxOr6mvfecJcvutkUUeOg6icGxzdyJGuUJAul1j+mwaxXz0cObxDpmNCra6dzutoyL+I.kyjQZlX5wD31bSMxIQAifujviBHQ.UNJS4REyIGwq6XVahLinBe6h+AdRH10r1IgX2Thn.hWn78dwGYXFT+A1c.LIreiRU3ikf03kmU351ocGT.78Cu2yyDJdBf8xk4a1.Y91MPlmsAx77MPlWrAx7cafLe+cJi4S2dcjVFD2l.aL7P6Y1NNGJLm5YqHQ+KmwEOgB
    


  • @ustk said in button to override values recalled by preset:

    HiseSnippet 1315.3ocsWstaaaCElxIJq1ctaEXO.L9OyFH00dqsaXCE0MNIatsIwHNKX+X.EzRz1rghzPjJqFAAXOh6QXOB6MX6PJIKIG4rTCL4.DQdt8ctQdzvPoGUojgHmpmuXNE474tiVHzy5OivDnAGfbdj6wDklFhi2Z+EyIJE0G43r0OY1vo51H6ye+p8IbhvilsEBcgj4QeGKfoy1cXu2x37iH9zyYA439Y8F3IE8kbYDfmsb6flS7tjLkdBwvVEWjyNG5yzxvQZhlp.d1W5uXzL4uKh4+BlhMlSMK5hFAJJdaT+YLt+vTeUgPNaOLyy2J1y+J2iY9rk6mEA9RKAblD4iANUJBosK.otqCRGI49FErF34jCdaGCuG6NxKjMWmQwfsG5NP.ImIDHrmGVw7hp3riaeIvgP2NfbI8nPXwRIZ9hNc1C+7NcZ8i0qArojbZaONkD1zri4GjPTZ7UjP76Hio7t3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yjQZlX5wD31bSMxIQAifujviBHQ.UNJS4REyIGwq6XVahLinBe6h+AdRH10r1IgX2Thn.hWn78dwGYXFT+A1c.LIreiRU3ikf03kmU351ocGT.78Cu2yyDJdBf8xk4a1.Y91MPlmsAx77MPlWrAx7cafLe+cJi4S2dcjVFD2l.aL7P6Y1NNGJLm5YqHQ+KmwEOgB

    ok ill mess with this


Log in to reply
 

10
Online

556
Users

2.1k
Topics

16.6k
Posts