Built-in gain helpers

hi,

is there any built-in gain helpers in JUCE such as:

  • i can set min/max db value
  • i can set bending ratio

so I got a param that goes from normalization values 0.0f/1.0f to -70.0/6.0db, with some bending setting that can be adjust as needed?

thanks

By bending Iā€™m guessing you mean a skew? As in for your range of -70 to +6, you want the mid-point to be something other than -32?

Using juce::NormalisableRange you can do:

juce::NormalisableRange range{-70.0f, 6.0f};
range.setSkewForCentre (0.0f);

const auto decibels = range.convertFrom0to1 (normalisedValue);
2 Likes