That was exactly my point. In ProTools this one works:
void MidiSidechainAudioProcessor::processBlock (AudioSampleBuffer& buffer, MidiBuffer& midiMessages)
/* calculate your value as you like, I used RMS of the audio */
MidiMessage message (MidiMessage::controllerEvent (midiChannel, ccNumber, (int)floor(value * 127)));
midiMessages.addEvent (message, timestamp);
I can add an instrument track and in the input selector I can select the plugin as source of midi events. But I found no way in Cubase to select a plugin as midi source. But you see, I’m completely unexperienced on Cubase.
Just seeing Jules simultaneous post… seems to be the case…