Page 1 of 1

Midi input

Posted: Fri Mar 22, 2019 3:18 am
by jared
Hello.

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?

Re: Midi input

Posted: Fri Mar 22, 2019 7:56 am
by Arne Scheffler
Hi,
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:

Code: Select all

	//---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,
Arne

Re: Midi input

Posted: Fri Mar 22, 2019 11:35 pm
by jared
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.

Cheers,

Jared