Midi input


I’m trying to get Midi input into the helloworld plugin example. Just note on / off messages, not CC for automation. I have searched far and wide in the documentation and examples and am somehow unable to find any explanation of how to do this. I must just be missing it somehow.

Does all midi input have to go through my controller class? I tried inheriting IMidiMapping like in the AGain example, but am unable to compile due to a very obscure error. Is there some setting somewhere I have to change (that isn’t in my plugcontroller.cpp or plugcontroller.h)?

Is there no example of a basic VSTi?

you don’t have to add anything to AGain to let it receive note events. It already has an event input bus declared.
See AGain::initialize:

	//---create Event In/Out buses (1 bus with only 1 channel)------
	addEventInput (STR16 ("Event In"), 1);

To actually use the events you have to change the AGain::process method. The notes are in the ProcessData structure in the inputEvents member.

And the simplest Instrument example is the note_expression_synth in the SDK.

I hope this helps,

Great, thanks!

I was trying to just set up the helloword project like Again, but I was missed that part in Again::initialize!

I should be able to work it out from here, I just wanted to check I was moving in the right direction before spending too much time on it.