IMidiMapping and SingleComponentEffect

I have got IMidiMapping working with distributed VST3, but for some reason I cannot get it to work with a plugin derived from SingleComponentEffect. If I make the following changes to AGainSimple, the getMidiControllerAssignmentmethod doesn’t get called, even though VST3TestHost reports that the plugin implements IMidiMapping. Anyone know what could be the problem? It has a MIDI input bus. The result is no assigned CCs to params.

thanks,

oli


diff --git a/samples/vst/again/source/againsimple.h b/samples/vst/again/source/againsimple.h
index 3552a44e70944ae33b24e801b024bde4ea4c96cd..60c718f7d83f91ae9a32d3692698308c612e7a40 100644
--- a/samples/vst/again/source/againsimple.h
+++ b/samples/vst/again/source/againsimple.h
@@ -55,7 +55,7 @@ class AGainUIMessageController;
 //------------------------------------------------------------------------
 // AGain as combined processor and controller
 //------------------------------------------------------------------------
-class AGainSimple : public SingleComponentEffect, public VSTGUI::VST3EditorDelegate
+class AGainSimple : public SingleComponentEffect, public VSTGUI::VST3EditorDelegate, public IMidiMapping
 {
 public:
 //------------------------------------------------------------------------
@@ -100,6 +100,16 @@ public:
 	void setDefaultMessageText (String128 text);
 	TChar* getDefaultMessageText ();
 
+	tresult PLUGIN_API getMidiControllerAssignment(int32 busIndex, int16 channel,
+		CtrlNumber midiControllerNumber,
+		ParamID& id /*out*/) SMTG_OVERRIDE
+	{
+              // NEVER GETS HIT
+		return kResultFalse;
+	}
 
 	//------------------------------------------------------------------------
 	template <typename SampleType>
@@ -131,6 +141,12 @@ public:
 		return vuPPM;
 	}
 
+	OBJ_METHODS(AGainSimple, SingleComponentEffect)
+	DEFINE_INTERFACES
+		DEF_INTERFACE(IMidiMapping)
+	END_DEFINE_INTERFACES(SingleComponentEffect)
+	REFCOUNT_METHODS(SingleComponentEffect)
+
 //------------------------------------------------------------------------
 private:
 	// our model values

I believe there is a bug with VST3TestHost that means it doesn’t properly respect IMidiMapping for SingleComponentEffect plugins. The MIDI mapping works in Reaper and Cubase.

IMidiMapping is working fine for me and SingleComponentEffect.

IMidiMapping is working fine for me and SingleComponentEffect.

IMidiMapping is working fine for me and SingleComponentEffect.

in VST3TestHost?

Not the test host.

What I was trying to state was that nothing appears to have been broken between the last SDK and this one, regarding that combination. Apologies for the vague post.