I have been testing and I have come to the conclusion that it is not convenient to call the getValue functions repeatedly, for example in a loop, hundreds or thousands of times. Since the drop in performance can be dramatic to the point of consuming all the time available for the audio block.
These functions that I am referring to are
parameter->getValue (2 times slower than getRawParameterValue)
apvts->getParameterAsValue (4 times slower getRawParameterValue)
One solution is to save the pointer to atomic float at the beginning of the application and access it directly during the process. But since we are repeatedly accessing a value that is being modified simultaneously, I think it is a better idea to save the value in a variable at the beginning of each block.
But this is just my impressions, Maybe I’m wrong about something
oh i see. in my own parameter class i implemented getValue() to just return the normalized value by simply loading from the atomic float in the class. juce’ parameters have the denormalized value in there apparently. i’d advice rolling your own thing then. if you ever plan to add a parameter modulation system you have to start all processes with normalized values anyway