[noob] - Redwood Tutorial - Slider Problem



I'm very  much a noob  when it  comes to  audio plugins so I  followed the excellent  Redwood Tutorial to  make the stereo widener thingy. I  managed to  get  it  all to work too, so thank you  Redwood Audio.

When I  tested it  in  a couple of DAW's I  ran into a problem. It  worked fine in FL Studio. When I  tried in  Bitwig, I  ran into an issue. If  I  tried to  set  the width above 1, it  would keep resetting to  1. This is  a problem as the range is between 0 and 5. 

Am I  right  in thinking  that  all parameters must  be in the range of 0 to  1, hence the reason why  Bitwig was resetting?  Also what  is the best  way  to implement this? 

If I  modify the setParameter to multiply  the value by  5 and divide in the getParameter, then I  can get the pluging  to work, but the slider values don't  match. If I keep the range between 0 and 5 then I  can only  use the first 1/5th of the slider, but  changing the range to  0 and 1 then I  can use the full range of the slider but the text  box doesnt  show the required valuess.

Can some guru help me out as I  seam to  be chasing  my  own tail here :)





Bump. I too am curious about this. I can set the range of sliders from say 0 to 60 but if i set the audioparameterfloat range from 0 to 60 I get the slider value multiplied unless I leave the audioparameterfloat as 0.0 to 1.0, but then in bitwig the values show as such.


Hello Amy,
Glad you mostly enjoyed my tutorial - sorry for the few loose ends. I originally intended it for more dirty prototyping of audio algorithms as VSTs. It is absolutely true that if you want to deploy in a more serious way or use other DAWs you will want to normalize your parameters 0-1. In larger projects, I would use my own parameter mapping functions but for my typical workflow it was never much of an issue, so it lingered as an oversight in the tutorial.

I just published a new draft version covering the shifts in Juce 4.x and am recommending a shift to the new AudioProcessorValueTreeState (or the other new parameter classes). These will automatically handle the normalization for you and have some other handy features - especially around tying in to simple GUI types (which will be displayed correctly) and you can change the range without trips back to the slider properties in the Projucer.

If you are sticking with the older version of JUCE - what you wanted to do was keep the Slider range for what you wanted, but normalize it when getting or setting between the slider control and plugin parameter. What gets sent to the plugin parameter should be 0-1 which will align with a generic editor of some DAWs. Then inside your plugin you can unnormalize the value before using it. If you do that a lot, it is better to make a linear and Log mapping functions for easy use - but again, the new versions of JUCE will do this all for you :wink:

Hope that helps, but please let me know if you notice anything else.
Best regards,
Redwood Audio