VST3 MIDI CC mappings show up as automatable parameters?

Using a VST3 plugin, the MIDI CC parameters that we have mapped show up as automatable parameters. That is happening because StudioOne ignores the fact that some parameters are listed as non-automatable, which we already knew.

But WHY are all of these parameters created at all? They are created in initialiseMidiControllerMappings(), along with storing mappings in an array.

In VST3 (without JUCE), all you have to do to get MIDI CCs mapped to existing parameters is to implement getMidiControllerAssignment() in the effect component, returning the desired mappings. That function is there, but it draws from the array created in initialiseMidiControllerMappings(), rahter than allowing us to respond with our own mappings.

Why are all these parameters created? Why can’t we just implement getMidiControllerAssignment() with the mappings we care about?

you can #define JUCE_VST3_EMULATE_MIDI_CC_WITH_PARAMETERS 0 in AppConfig.h to prevent JUCE from dealing with MIDI CC using parameters.

In VST3 (without JUCE), all you have to do to get MIDI CCs mapped to existing parameters is to implement getMidiControllerAssignment(

The hack is to allow MIDI CC’s to be handled in in the audio callback, it’s been a common practice (outside JUCE) since VST3 was released. Plenty of KVR/Steinberg forum threads on it. The 3.6.12 SDK added IMidiLearn interface back in December to support real time MIDI CCs.

3 Likes

All I want is to not add the MIDI CC as an actual parameter. I can do that if this single call is skipped, without having to do anything else:

                parameters.addParameter (new Vst::Parameter (toString ("MIDI CC " + String (c) + "|" + String (i)),
                                     static_cast<Vst::ParamID> (p) + parameterToMidiControllerOffset, 0, 0, 0,
                                     0, Vst::kRootUnitId));

That allows getMidiControllerAssignment() to still function as expected.

I don’t get why these are being added as parameters in the first place. For what case is that needed?

If you add that define to your AppConfig.h then initialiseMidiControllerMappings is never called in the VST3 wrapper, which should solve your problem.

I don’t get why these are being added as parameters in the first place. For what case is that needed?

It’s in order to handle MIDI CC like MIDI CC (dumb values delivered in real time, like in VST2 and AU). Before 3.6.12 it was the only interface you could use to get MIDI CC in your plugin. Using CC’s as parameter controls is just one use, a lot of plugins relied on using CCs as modulation sources in their own right.

Oh, ok, I see. Another programmer here already added the code to use the processBlock function to get the MIDI CC commands. I did not know he had done that. I was trying to implement this the old way, not knowing about that code having been done.

Setting that define to 0 fixes the problem. Thanks, all!

Unfortunately, while that removes all of those parameters, it prevents us from processing MIDI CC, sine VST3 hosts apparently do not send MIDI CC along with the Note On and Note Off data. That list of “hidden” parameters is a hack we don’t want. I’ve posted a new post that I didn’t realize was related to this one, about not getting those messages. I’ll follow up there.