I think you need to specify an audio input for the MIDI plugin; then you will get the correct sample rate.
I once wrote some code to calculate Sample Rate, but I no longer believe that’s a useful approach. Anyway, for more information on that and where in JUCE’s code this problem lies, see: