Bug: Midi input does not work properly with VST3

Juce 6.1.6

Bug 1:
When I enable ‘Plugin MIDI Inut’ in the Projcuer the Automation Parameters exposed to the DAW do not work properly. AudioPluginInstance::getParameterText and several other functions are not called for the Parameters with index>10. There seems to be some buffer overflow.

Bug2:
‘Plugin VST Num MIDI Inputs’ always generates 16*128 Parameters, even if it is set to 1.

Notes:
I am using a plugin with over 1000 parameters.

Fix:
in juce_VST3_Wrapper.cpp

change
enum { numMIDIChannels = 16 };
to
enum { numMIDIChannels = 1 };

First, please test with the develop branch, or JUCE 7.0.1, before reporting issues. We are no longer updating JUCE 6. Please also provide the platforms and hosts that you’ve tested.

I don’t see this with the AudioPluginDemo. I tried modifying the parameter creation like so:

    static auto createLayout()
    {
        AudioProcessorValueTreeState::ParameterLayout layout { std::make_unique<AudioParameterFloat> (ParameterID { "gain",  1 }, "Gain",           NormalisableRange<float> (0.0f, 1.0f), 0.9f),
                                                               std::make_unique<AudioParameterFloat> (ParameterID { "delay", 1 }, "Delay Feedback", NormalisableRange<float> (0.0f, 1.0f), 0.5f) };

        for (auto i = 0; i < 2000; ++i)
        {
            layout.add (std::make_unique<AudioParameterFloat> (ParameterID { "parameter" + String (i), 1 },
                                                               "Parameter " + String (i),
                                                               NormalisableRange<float>(),
                                                               0.5f,
                                                               AudioParameterFloatAttributes{}.withStringFromValueFunction ([i] (auto value, auto)
                                                               {
                                                                   return "Param " + String (i) + ": " + String (value * 100);
                                                               })));
        }

        return layout;
    }

    //==============================================================================
    JuceDemoPluginAudioProcessor()
        : AudioProcessor (getBusesProperties()),
          state (*this, nullptr, "state", createLayout())

In REAPER on macOS 12.4, all 2000 additional parameters display using the custom stringFromValue function. For us to debug this further, please provide a minimal code example that demonstrates the problem.