Simple introduction to VSTi3 and midi handling

I hope I am just using an incorrect terminology whilst searching forum/google for VSTi 3 SDK code examples.

I downloaded VST3 SDK and could fire up visual studio and build the audio based examples.
I could even download the MDA plugins, build and install them, and get my Cubase LE4 to accept them / work.
That is the audio events, and block processing, I can do. But I thought later VST frameworks added midi control?

I want to handle midi (specifically I want to design a gui to give me remote control from Cubase VST of a synth).
In the meantime I did what I wanted using MS winmm.dll but I would love to investigate how to achieve similar functionality within Cubase LE4 and VST3i.

Simply, I want to create a series of sliders/knobs/buttons/drop downs to send NRPNs to some of my synths.

Is there any docs on this anywhere in VST3i… what terms should I be googling for please?

I made the mistake of buying some VST3 books, that were infact nothing to do with the SDK - instead some branchline of the Cubase family.

Sorry if this has been asked 1,000 of times before, but I have searched these forums and google … nothing. I can only assume I am using the wrong terms; surely folks are routinely doing this? Or maybe they are, but not wanting to share the secrets?

I am sure the info IS contained in the SDK documentation, but would appreciate it if someone could help suggest where in the docs to find code snippets to handle midi.

Regards

Steve H

OK having been deafened by the silence (I would have accepted “you dolt … cant you just read XXX”) I worked it out.
So thanks all.

It took a lot of messing with the different toolkit aspects, but at least I can start to develop midi on this thing now.

Regards

Steve H

Better late than never…
I don’t know about vst3 but I found a project http://ctrlrv4.sourceforge.net/ that does exactly what you’re looking for.
If I ever get some extra time I’ll attend to look into it.
I’m looking that kind of controller for yamaha psr s-900.

Hi there

thanks, I had seen and built this locally.
Indeed it does “support” my particular synth too, but I didnt like it. Also I didnt like the layout chosen for my synth.
I already have written one in C# but I wanted to experiment with how to do this as a VST.

So I thought “heck why not just build my own via VST …”.
Well I can see roughly how to do it now, but it was a real pain to get the various sources in the right place.
I am using the VSTi3.5 now, which has more examples.

Took me a little while to find the output … but the fun thing is Cubase LE4 simply finds it :slight_smile:.

I had written “toy” audio vsts long time ago but never midi.

Still, I am most likely going to just buy a BCR 2000 and program up the NRPNs … much more tactile.

Regards and thanks for replying

Steve H

In my understanding there is prewritten source code for vsti’s allready. Since I have only basic knowledge of c++ (console application is not a problem, but I haven’t reached to useing libraries and windows level yet), I wanted to know if I’m getting this all wrong? At least there is a prebuilt vsti’s in download section.
Anyway, It’s really painful to own an instrument with some good voices without full control of it. All these channel EQ’s, effects and useful sounds in my psr s900 are not useful at all because I can’t control them from my sequencer. That’s why I’ve been looking controller like this for years.
I was hoping that this ctrlr will be something that I need to configure with some xml but it looks a bit more difficult than that for me even with detailed instructions.
At least I found that it should work and it knows how to change chosen numbers in sysex with controller change.

Regards,
Andres

Hi

Well I am a bit of a C++ whiz, except for double inheritance (I avoid this like the plague because I dont really understand it). Alas the Steinberg model uses this so I have some reading to do.

When i made the original post I was using an earlier “3” version of the SDK. The 3.5 version has more demo’s but I still had a lot of configuring to do to get the vst4gui example to build.

However, the resulting dll’s do not seem to be as robust as version 2 ones. I am getting a significant number of blue-screens on XP since playing with these beasts. The stand-alone C# program I wrote is looking more robust by comparison.

I am pretty convinced my way ahead is via a control surface. I already have a master keyboard, but it doesnt send NRPNs, and my kit ONLY responds nicely to NRPNs. Good luck with your project.

Regards

Steve H

I’m looking for a bit of help along these lines as well. I am not a C++/C# guy at all. I’m trying to do something that would probably take someone experienced all of 5 minutes to code. I was able to build the examples from the SDK and fiddle with them a little, but I am totally lost as to go about my goal:

I want to achieve a VST3 VSTi instrument that is basically a MIDI Thru patchbay. Since Cubase does not have MIDI busses, you cannot route the output of a MIDI track into the input of another MIDI track. What I want to do is write a VSTi that has a bunch of MIDI inputs and outputs (at least, say, 16 in and 16 out) and simply have the MIDI input of each be echoed out the corresponding MIDI output. And voila. It’s simply acting as a 16-port MIDI bus. Doesn’t process audio, and doesn’t even need audio ins or outs. And no GUI necessary. I know you can essentially replicate this behavior with a system MIDI Loopback driver (or IAC on Mac) but the problem is that those don’t work when you bounce non-realime in Cubase.

I successfully got 16 MIDI ins and outs by dropping this code in the Processor initialize section:

addEventInput (STR16 ("MIDI To Bus 1"), 16);
addEventInput (STR16 ("MIDI To Bus 2"), 16);
... etc ...
addEventOutput (STR16 ("MIDI From Bus 1"), 16);
addEventOutput (STR16 ("MIDI From Bus 2"), 16);
... etc ...

But I have no idea what to put in the Processor process section - or any other code required. Just to simply echo MIDI input (notes and CC data) directly back to the outputs.

Is anyone able to assist?

MIDI bussing VST… interesting Idea!

I already have a “proof of concept” by using Bidule as a VSTi in the VST rack. Internally, you just patch Bidule’s midi input to its midi output, and you’re done. But there are two big downsides:

  • Bidule is not VST3 and thus, you can only get one midi port “bus” per instance of the plugin.
  • Bidule is not 64-bit and crashes 64-bit Cubase

Is there a Way of Automation Parameter bussing? … Thinking…