Propagate skew param range to the DAW

Hi,

I’ve configured a param this way:

juce::NormalisableRange<float> rangeCutoff{20.0f, 22000.0f};
...
addParameter(freqParam = new juce::AudioParameterFloat("freqParam", "Cutoff", 0.0f, 1.0f, 0.5f));
rangeCutoff.setSkewForCentre(1000.0f);
...
float cutoff = rangeCutoff.convertFrom0to1(cutoff);

So at the middle is 1000hz, min 20 and max 22000. It works nice, but if I watch the “value” on the DAW (i.e. on Browse Parameters), I always see the normalized values (i.e. 0.0 to 1.0), not the actual value.

How can I propagate the “real” value also to the DAW? So I can display it on DAW’s Hits?
Its ok to set “normalized” on DAW (i.e. middle = 0.5), but i just want to display the related value (i.e. 1000hz). Maybe with some precision (i.e. 1 digit after the dot).

Thanks for any tips.

There is a constructor that consumes the range, you have everything, just in the wrong order:

juce::NormalisableRange<float> rangeCutoff { 20.0f, 22000.0f, 0.1f };
rangeCutoff.setSkewForCentre(1000.0f);
...
addParameter (freqParam = new juce::AudioParameterFloat ("freqParam", "Cutoff", rangeCutoff, 1000.0f));
...
float cutoff = freqParam->get(); // get returns the un-normalised value

Hope that helps

2 Likes

Works very well man! Thank you so much!