I have a detune issue with AU plugin inside Logic Pro X for certain sample rates.
So when playing with 44.1k sample rate and all other multiples of that sample rate then there are no issues with plugin being detuned - playing note C3 is correctly produced as C3.
If I change sample rate to 48.0k then playing note C3 produces C#3 - half step detune.
Now this only happens with AU build on the plugin inside Logic Pro X.
I have tested with REAPER and Live and no issues at all - for both AU or VST3 builds.
Are you checking for sample rate changes in prepareToPlay or in the processBlock method. The sample rate can change.
A good test maybe is to change the sample rate in reaper and see if your plugin still have the right pitch. Really hope this isn’t a JUCE bug. What version of JUCE are you using?
Yes, I am checking sample rate changes and JUCE version is 4.3.1.
I have already commented that I have tested in REAPER and LIVE and no detune issues for both AU and VST builds no matter what is the sample rate - pitch is correct. So only when I am using AU build with Logic Pro X and having sample rate 48k or multiple of that (96k etc) I am having detune issue - half step pitch deviation.
I think no one can help if you are running such an old JUCE version. The best would be to update your project to version 5 or even 6 and verify if the problem still exists.