Hi !
I may have a similar problem.
I am using in a very simple plugin (5 sliders) the following code for one of the slider:
parameters.createAndAddParameter ( "l1Volume", // parameterID
"Volume", // parameter name
"", // parameter label
NormalisableRange<float> (-1010.0f, 12.0f, // range
[](float start, float end, float gain) { return (float)cv01todB((float)gain); },
[](float start, float end, float dB) { return (float)cvdBto01((float)dB); }),
-6.0f, // default value in dB
[] (float p) { return dBToStr(float(p)); },
[] (String str) { return (float)dBstrToDbl(str) ; });
The functions cv01todB and cvdBto01 are very simple functions that convert the [-1010 +12] range to [0 1] and reciprocally.
I added a trace to these functions, and a counter to know how many times they were called. I also generated the application with JUCE v5.3.2 and JUCE v5.4.1.
Here are the results (number of calls):
- launching the standalone plugin:
JUCE v5.3.2: cvdBto01: 2 times, cv01todB: 2 times
JUCE v5.4.1: cvdBto01: 279 times, cv01todB: 7 times
- clicking on the widow title bar, then clicking in an other application:
JUCE v5.3.2: cvdBto01: 0 times, cv01todB: 0 times
JUCE v5.4.1: cvdBto01: 6 times, cv01todB: 0 times
- clicking somewhere in the slider:
JUCE v5.3.2: cvdBto01: 4 times, cv01todB: 1 times
JUCE v5.4.1: cvdBto01: 25 times, cv01todB: 5 times
- clicking in another slider or hoovering the mouse over the slider:
JUCE v5.3.2: cvdBto01: 0 times, cv01todB: 0 times
JUCE v5.4.1: cvdBto01: 6 times, cv01todB: 0 times
Each time, the pattern is the same in 5.4.1: there is 1 or more sequences of 3 calls to cvdBto01:
[200000441] dB->01 -0.545465 --> 0.556425 ~~ -0.545465
[200000442] dB->01 0 --> 0.672414 ~~ 0
[200000443] dB->01 0 --> 0.672414 ~~ 0
One call for the actual position of the slider (here, at -0.545 dB, corresponding to the physical position 0.556425 in [0 1]), then 2 calls to convert value 0 dB (corresponding here to the physical position 0.672414). Note that 0 dB is not the default value for the slider, the default being -6 dB. (the trace displays the # of calls so far, 441 to 443 in this case).
So I imagine, if I had a hundred of such sliders, each one with a function being called a dozen times, that the interface may become quite slow…
Hope this simple example may help finding the bug in 5.4.1.
Regards.