FX knobs scaling



  • Hi everyone! Please I've done my first Fx plugin. But I've noticed a strange problem that consisto of knobs and values. For instance: The knob linked to the volume of the modules container is set half away, but the volume instead of being half away as well (-50 db) its maybe 1/4 from the beginning or 3/4. I know there's the scale factor (0.1 , 0.001 and 1.0) I tried to deal with that with trial and error but it's not working and syncing correctly. Can someone help me please?



  • @nesta99

    You need to convert the decibel to a gain factor using the function Engine.getGainFactorForDecibels();.

    If you're subscribed to my patreon page I just posted a video about this.



  • @nesta99 scaleFactoris related to a filmstrip size



  • @ustk Oh yeah sorry not scale factor but step size.



  • @d-healey Thanks a lot David!!



  • @d-healey @ustk Hello Guys!

    I'm trying really hard to sort this out but now It's not even working. This video can show everything. Can I kindly send you guys the snippet? Thanks.



  • You just need to convert the decibels to a gain factor using the Engine.getGainFactorForDecibels(); function. I covered this in my tutorial video on Patreon last week. You have to use a control callback, you can't do this with parameter/processor ID.



  • @d-healey Ok, thanks man!



  • @d-healey Hey man! HiseSnippet 1885.3oc6Z8taaTrEe1jLPrgTA8Vg.IPZUDB4JJQwo7mHAn3X6XpoIstwos2q3Cgw6N1dHimYY2YSZnpWUoKe.wmtOB22jxi.R7BTdC5a.bl8Odm0w0wwkhZtp9SYNyblyuyb9yblylV9RGZPfzGYUXui8nHqWG29Xgpes9Dl.0rNxZQ7tzCo9cPUO1iDDPcQVVy+U5YsJr.J52S1nJgSDNzLRHzcjLG51rALUF0VUtNiyaPbo6wFXr5OtRSGonljKCAjLOdUjGw4.RO5MH5kMGFY8Ja4xTR+1JhhFfrVnpz8318kGIhW+cXArNbpdPYTaXihI2Pxc0HVSEUqOi61JUiCPHKbqL8e9X8+R3cXtrgzyNGdinIry3v77vZtIAuxlva0oGdVFvagX38l31N9LOU1LZr8Z3lBE0uKALAlvJdsn41cNbMIrBgZkAjCnM7gAC4nz5e5pWwdsxexk+7kJtTQvPDnrOj3aC.pWORr029Ksi7KVoGUEAznQkV1bMKq2fL12gcu1bWfwTQqYUNvSJfAkVNd5kiE5REYBN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9Ta8yoEPh1iMaKxyk1BLsv8MwsXJm9iGuyMF7BE797FuIMYYI7Vc6RcTYfcAbi+4y+NpXBkEeJ86ZjKsmPWudzT10KuotqWVy+7nKWK7BcWtdYz24fnu4mNnbJsXMoEyWD2RxO1quTvbZv35hXiaz71xipEplPHGbigO86CoBmrCte52pbKSq9Nw0tlLd4J2Jjvy6X7npLOIm3OUFg4mt1ZcJgcSxS4svCUJ6yQt2ZKy4G79N3Dits9v97Ctu.9VuXA1IGCWDeMn7M6ydTLbY3Dhhe+Qhhe3s5s4luLJ9kQwuLJd1.6ESqDnlTbnjGFAqm5W6st+wiFAeWpZTRaCXMWHMB0bfWHOftMUzyrKHOYiDnzT3EpLoe6.ZUhyA87kgB2856SItl6WKepKkSxIiqwpYrGP0.0IC7X5leajuowdI8qOizvVnu7XZgt9HH9Y.qbD4v31igsz7E0vNr0WeOKDWJ8.KjuJcNMgsDtoyOZ07ybRHztRvBI5sCAd2pV72.dBK7nAGJ3hIDTt9orVyo+rGwiWMEQsoB2nA+A7KYxx5wVISVNcRSuiWK9vBd8dzgs1uH8uy4VnoneRy1ztFVw2txvI1MeuttTkFTpq9ScZvQkqd0eaiT5lLDMATRXKPf5vcSa70XmfJpdkcXFMS8warGcfmDdcmStPqyqFkWM8KN0pOIfB0qGeea5IWNKyvqhJadA6PpqkiZ5FXd6KKWWo+K6Lab+GML1DlWLVKeAHo4eGV4+eQFCHN9x8ch+zqZy8hQTfyVQTl1B3czisKm9MWw3Ui93Ctr8cbzOC8iJiPimm0lAdt5LvyGOC77Iy.Oe5LvymMC7r9D4Q2rmMCUxAwwX.gVaE8susr1RPfnknvMzeB0qhDdC

    I've done what you said by converting the decibels using that function. But It is not working. Maybe by kindly looking at this snippet you'll find something strange or a mistake that I made but cant find. Thanks



  • You can't use processor/parameter ID and a callback. It's one or the other.



  • @d-healey
    Hey man. tried with the inline functions but it's not working. It says :API call with undefined parameter 0.
    What am I mistaken please?
    Thanks!

    //KnobsLinkingDynamics
    const var Dynamics = Synth.getEffect("Dynamics");
    const var Threshold = Content.getComponent("Threshold");
    
    inline function onThresholdControl(component, value)
    {
      local dValue1 = Engine.getDecibelsForGainFactor(1.0-value);
      Dynamics.setAttribute(Dynamics.Threshold, dValue1);
    };
    
    Content.getComponent("Threshold").setControlCallback(onThresholdControl);
    
    


  • I'm assuming you're getting the error on this line Dynamics.setAttribute(Dynamics.Threshold, dValue1); ? If so it's telling you that Dynamics.Threshold is undefined.



  • @d-healey yes , it is the right line. But then, why its undefined? I've created the generic script reference. So I don't kmow what I need to do again.



  • @nesta99 Check the module browser, does the dynamics effect have a member called Threshold?



  • @d-healey Ok I will check, maybe I should Just rename the module. Thanks for this insight!



  • @d-healey Hey man! Working still on this same problem.

    As you can see on the video everything is right. But the knobs goes contrary to one on the module. Is there any reason ? Thanks



  • @nesta99

    Change The Min Max
    For Threshold Min Should Be -100
    Max 0
    And Middle Position Is -50



  • @Natan Tried. Not working. Sending the snippet

    4443.3oc6b07aabbEeojVaKYKamzjhf9AvBhhBJT8AEkksiSRMkDIsYiTLCorcSLhcWwcH0BubWpcWJSkDiDTTTzdsnnn8Rfu1a8V6oBidpnG5k7Ofy8hfbO.Q8MyreL6ty9gnksrBBsgM4LyaleuOl27lYd61vznMxxxvTH2jatWejPtyH1ZOc6sWaaYUcg5UfxEahrMMpMTX085KaYgTDxka7qgqN2jSH37YUYMY81H1htkgZaz5p8Ts8KsQ42VUSqlrBZS0dLs9Bkq21PeMCMiA.TFWrnPe412WtK5cjwMaLQgbmnphpsgYKaYajkPtIV0PYuVaa7.cZ6ukpk5VZH7OVTnEzQzhqYnofQLtTg01VUSogKKaIHjSrgu.Xbp.3UD2PUQ0qbeAw4IUH4SAq7H2XIAuEYgWwrCubLvaBJ7dIwVsMU6a6WCFamVrttMxriLnBXgEssBisdAwomZMCnM51y2S99nZlvO7novkKVbVoKVr3LuwzSM8TKrvZlHYaU8tRqnoIcy5RVn11pF5RMj0QZVSOEnrrrk1U1Dp7ZlFC5K8V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QOr7tto.XtwYsHdkjSxEhQ5m4Zj9DvHMrE3OHhE3FCW0lX4EHDIn69kACM5Dhji8A+HTRxWyFF8wIuwIEWYKicQbb0907b0t+9bMw5fKMCAH9o2Ix9iuSYLjvobwpFCwxqdFJN4rCIiUE5w9l178dbO4.AkDWTWkdr0fNcTGhEEJql0aCnA2Hv9y+1foaPzCwHDWd8xBQeyUddwMvOhyx1AeoZh0JNUfY.12dk3WGYvzM68XyQqmIuoMyJbeIwFp1s2lOdGiCdwI5wyX757dKcZQ5yesOXIyAdl+RJkEJmJl2grQPxH95iUHlWerPHigd8wla7mxWWrE489XchWnecw9cy4NdOmaDMDEcSxy0FXtKp5NNuPf8dwPD.NPTCzzrxxc2H0pso6ICigan4MimM3xQZQeeuzcCYXIQ755vH2Bld1FABKc7qVRL.FCmArzeWzEPsP5JjefiQyoxEw+NmSkK5VIqF4zTovIoI+.QF39cV9OXNg3Yx7ZkCkyDd07JkCjQANOTAKszme0fW2NSEqa7fFv.VyDsiW+7697xWWMRoBUJiS.IliJwOOcXm9cbUo7xtSSff32EhMkL6k9RE24sPRPkiykPxDsi6s0wL4dcPHn2Nv78585O.BBecjdW1sz7UW0AK006Ovls7aZgvY5QWSiA5J3CJSVgs+fMYnPSAN+xtt5ZL8AnOqH2quJNqZ8aCLWxYxneQdo75XhzP4nBTRXbzupYXzuE94olsfp5Jt+73t5eJwJ6oK2SssEQ2G3zKCFTfMxyUjuDDWr+YYFpBmSYmQ0hK08pVXNpH+wjyPv6PScdvYpJdkGG9jjYFsHm2OyScTzq9goRRjMHdfwoFtrrScQ4ZmJhv3+jxQtHlncWzJNdYx8skwnmbaSi60l9DgfWl+TjR.YqNwCxjhaf+szhtOMHhhEmuHdKfp2qcabvGysnf.eZJMBzrzHPyEFAZVdDn4hi.MWZDn4xIRCND+UFXaPeaVCJzMZTkl444XBpR3+C9TYbD
    


  • @nesta99 said in FX knobs scaling:

    Snippet Doesn't Work Fo Me 😕



  • @nesta99 You missed off HiseSnippet from the beginning.

    I took at a look at your snippet, it's massive and won't load properly on other people's systems because you're bringing in external files that we don't necessarily have. Give us a simple snippet to work with, one knob, one effect. Then we can see what the problem is and fix it quickly.


Log in to reply
 

13
Online

1.2k
Users

3.9k
Topics

34.4k
Posts