Hi, I want to grab the display name of a parameter:
I’m doing this
AudioProcessorParameterWithID* par = paraTree.getParameter(nameID);
jassert(par != nullptr);
Which is fine. But I can’t use ‘getName’ because it’s marked as private!
Which is a bit odd to be honest. Anyone know why?
I wondered the same thing. Seems backwards for the member to be accessible but its getter is private. I usually do it the other way around.
Bump. Can someone tell me why this isn’t dumb?
Edit: because processor.getParameterName(id) exists, apparently. Derp.
Just ran up against this myself.
AudioProcessor::getParameterName(id) is now deprecated.
So, could any JUCE admins explain why
getName is private?
Assuming you’re talking about
AudioProcessorParameter::getName() then It isn’t private!
Following @DaveH’s example from above, I was talking about
Although, when I had written up something similar, I had used
auto, like so:
auto param = paraTree.getParameter("devFloat1");
Which I believe returns the parameter as a
getName is still private in that case.
So then, following up on your post, I tried this:
AudioProcessorParameter* param = paraTree.getParameter("devFloat1");
getName is at last accessible.
Looks like it’s over-riden as private in
Ah… hmm, it’s odd that the subclass is overriding it like that - looks like a mistake to me. We’ll have to have a look, thanks! (But yes, just casting it to the base class is a quick fix)
Haven’t updated to JUCE 5.4.5 yet, but looks like those 3 getter methods have now been moved to north of the
private line in AudioProcessorParameterWithID.