AudioProcessorParameters displaying only Normalized values

Hi to everyone :)

     I'm new to Juce and I'm making some test with the AudioProcessorParameters of Juce4. In my audio plugin I created a couple of params using the createAndAddParameter function with a custom range and ValueToText function:

auto CustomTextValue = [](float val)->String
{
    String vRawString = String::formatted("%2.1f", val);
    vRawString.append("dB", 2);
    return vRawString;
};

NormalisableRange<float> vdBRange = NormalisableRange<float>(-20.f, +20.f);

mpValueTreeState->createAndAddParameter(
    "dBParam", 
    "dBParam",
    "dBParam",
    vdBRange,
    vdBRange.snapToLegalValue(0.f),
    CustomTextValue,
    nullptr);


Everything seems working fine but when I change the parameter through an automation or a widget i see only the normalized value in the DAW Automation section or in the Widget ValueText; I expected insted to see of the value in the vdBRange (-20.f - +20.f) formatted with CustomTextValue I passed to parameter constructor.

Someone can tell me what I'm doing wrong?

Thank you so much :)

 


 

Which host is it? It's up to the host whether it actually chooses to call the value->text conversion function, and probably some of them don't.

Hi Jules, thanks for writing, I'm testing on REAPER; anyway I don't think it's related to DAW since all other VST plugins loaded in Reaper show not-normalized range with pre and postfix where needed.

They might use VSTXML to scale the ranges. Surely setting a breakpoint in the relvant getParameter and getParameterText (or the AudioParameter equivalents) methods will show you if Reaper calls them?

Results are inconsistent but it seems JUCE is working as expected.

I've tried Waves, NI, Xfer Records with VST and AU.

I've seen the value returns depends on internal implementation.

- So I did get for example values such as 600.0 for Threshold for Waves plug-in as AU

- Xfer Records OTT however showed for depth value of 100.0 for depth for example under AU, but for VST i got values between 0.0 - 1.0

I've never seen textual representation during dragging. only for static states.

So it seems best would be to ask Cockos (REAPER) to improve their readings ;)