juce::MPEInstrument Error with Recent JUCE Develop Branch

For the past few days, I cannot compile with JUCE/Develop and TracktionEngine/Develop.

On Windows 11, Visual Studio 2022, I get the error;

C:\SDKs\TracktionEngine\modules\tracktion_engine\plugins\effects\tracktion_FourOscPlugin.cpp(901,15): error C2819: type 'juce::MPEInstrument' does not have an overloaded member 'operator ->' (compiling source file ..\..\JuceLibraryCode\include_tracktion_engine_plugins.cpp)

line 901 of tracktion_FourOscPlugin.cpp

I do not even use the Internal plugins. So, I am baffled as to how I hit this code.

Using a slightly older version of JUCE compiles just fine

Please advise.

Looks like the issue is with this change here: Add KeyboardComponentBase class for custom MIDI keyboard components a… · juce-framework/JUCE@e0e8e85 · GitHub

std::unique_ptr<MPEInstrument> instrument; was changed to MPEInstrument& instrument;

I tried updating JUCE, but there were some other breaking changes that blocked me. I’ll try and get tracktion engine updated as soon as I get those resolved.

We currently don’t have an ifdef to disable building the internal plugins.

Thank you. I will await the update.

Updated on develop now.

I’ve just hit this error.

I get that references are generally better than pointers, but this change has required a bit of a refactor in some code as we have an MPESynthesiser that uses a custom MPEInstrument that references the MPESynthesiser… so I have a bit of a chicken and egg problem to solve. Before we were creating a new MPEInstrument e.g.

SimpleSynth::SimpleSynth() : MPESynthesiser (new CustomMPEInstrument (*this))

I’m not sure if MPESynthesiser was taking ownership of the pointer, so we may have had a dangling pointer issue there…

It looks good on my end.

Thank you very much!