# SOLVED: VST MIDI Effect Plugin

**URL:** <https://forum.juce.com/t/solved-vst-midi-effect-plugin/51475>\
**Category:** General JUCE discussion\
**Created:** [May 18, 2022, 1:09am UTC](https://forum.juce.com/t/solved-vst-midi-effect-plugin/51475 "2022-05-18T01:09:49Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![mackemlad](https://avatars.discourse-cdn.com/v4/letter/m/8c91f0/32.png) [@mackemlad](https://forum.juce.com/u/mackemlad)\
**Post date:** [May 18, 2022, 1:09am UTC](https://forum.juce.com/t/solved-vst-midi-effect-plugin/51475/1 "2022-05-18T01:09:49Z")

</div>

_**[EDIT]** Oh, boy! I spent some time adding pictures to make sure I was crystal clear, but as a new user I’m restricted to embedding only a single image. I shall try to choose wisely and hope the post doesn’t suffer from removing the others…_

I am looking for some clarification regarding the ability (or otherwise) to create VST MIDI Effect plugins.

Starting with the _ArpeggiatorPlugin_ tutorial I have got so far with a pet project which, up to now, I have simply tested in debug mode by outputting to _MS GS Wavetable Synth_. All appears to be working just fine, although clearly the results don’t sound particularly impressive given how it is being rendered.

Now, though, when I try to use the plugin inside Cubase Pro 12, I am able to see the plugin, but only as what appears to be an Audio effect. In other words I can , for example, add the plugin as an insert effect of an audio channel in the mixer.

The plugin, compiled as a VST2, shows as an effect in the Cubase plugin manager. I have read much that indicates that VST3 does not support MIDI plugins. However, I started by creating a VST3 and had the same result. I have been careful to remove the VST3 before trying again with the VST2. The relevant settings in _Projucer_ currently look as follows:

![image](https://us1.discourse-cdn.com/flex026/uploads/juce/original/2X/f/fb76bf116e204ba7f892c5892f5c812a90ac724d.png)

I should note here that what I am experiencing appears to be very similar to what @giohappy experienced in this post:

> [@ArpeggiatorPlugin VST3 recognized as Aufio FX instead of MIDI FX](https://forum.juce.com/t/arpeggiatorplugin-vst3-recognized-as-aufio-fx-instead-of-midi-fx/43563):
>
> Hi everyone, I’m new to JUCE 6 so please forgive the dumb question. I’ve built the ArpeggiatorPlugin as a VST3 plugin (last version of JUCE 6) on Windows (VS2019). Everything went fine. I’ve double checked that inisde Projucer “MIDI Effect Plugin” is active. I’ve tried to load the plugin both in Reaper 6.18 and In Bitwig 3.3.1. Both can load the plugin but apprently they use it as an Audio Plugin. No MIDI runs through it, and if I place it before a synth I can’t get any note out of it. Here b…

Having read a lot of back and forth about VST3 and, of course, the licensing implications of VST2 I was on the verge of giving up until I came across this relatively recent post which seems to indicate that @sluijten has been able to successfully create a VST3 that works as a MIDI plugin:

> [@Midi Plugin using MidiOutput?](https://forum.juce.com/t/midi-plugin-using-midioutput/48812/12):
>
> Am aware of that. I added samplePos = 0 and all is fine. Just wanted to be able to send midi from the GUI. Latency is not critical for this plugin. Thanks

So my initial question is simple: can I create a VST MIDI Effect plugin (either VST2 or preferably, of course, VST3)?

If yes, the follow-on is the difficult question: can someone shoot me a couple of pointers as to what I may be doing wrong that means that Cubase is not properly recognizing the plugin?

With that out of the way, perhaps I should introduce myself since this is my first post. I spent some time about 6 months ago working with Juce to create an audio synth as part of another pet project. I enjoyed it so much that I even bought a Mac just so I could test plugins across operating systems (I primarily work in Windows). I saw something new that interested me recently but realized I could build something similar tailored specifically to my needs, which drew me back to Juce and this current conundrum about which I have posted. Being a professional developer with 30+ years experience, I recognize the challenges (and rewards!) of an endeavor of this scope and applaud everyone who has contributed to it.

Many thanks for all you and this community have done so far, and thanks in advance for any assistance that you can offer.

---

<div class="post-metadata">

**Author:** ![mackemlad](https://avatars.discourse-cdn.com/v4/letter/m/8c91f0/32.png) [@mackemlad](https://forum.juce.com/u/mackemlad)\
**Post date:** [May 18, 2022, 1:10am UTC](https://forum.juce.com/t/solved-vst-midi-effect-plugin/51475/2 "2022-05-18T01:10:29Z")

</div>

Here is the view of the plugin inserted as an effect on an audio track in the Cubase mixer:

![image](https://us1.discourse-cdn.com/flex026/uploads/juce/original/2X/4/4cbe649cef1868257503a3a4bb456503e48ccc90.png)

---

<div class="post-metadata">

**Author:** ![mackemlad](https://avatars.discourse-cdn.com/v4/letter/m/8c91f0/32.png) [@mackemlad](https://forum.juce.com/u/mackemlad)\
**Post date:** [May 18, 2022, 1:11am UTC](https://forum.juce.com/t/solved-vst-midi-effect-plugin/51475/3 "2022-05-18T01:11:03Z")

</div>

…and here is a view of the Plugin Manager screen in Cubase:

![image](https://us1.discourse-cdn.com/flex026/uploads/juce/original/2X/6/6e3c8b7c90281ea1481125ae5c7d825409c74605.png)

---

<div class="post-metadata">

**Author:** ![leehu](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/leehu/32/3280_2.png) [@leehu](https://forum.juce.com/u/leehu)\
**Post date:** [May 18, 2022, 8:46am UTC](https://forum.juce.com/t/solved-vst-midi-effect-plugin/51475/4 "2022-05-18T08:46:00Z")

</div>

You’ll want the following settings for your plugin to appear in most DAWs, as most DAWs don’t handle MIDI FX plugins.

 ![image](https://us1.discourse-cdn.com/flex026/uploads/juce/original/2X/6/6fe007f4d252fde2fdc9d0c6c7ba66a8a6555f0d.png)

That said, if you want the plugin to appear in Logic as an actual MIDI FX plugin you’ll need:

 ![image](https://us1.discourse-cdn.com/flex026/uploads/juce/original/2X/d/de203b98d62a4a44526d485780931b0396d71bad.png)

---

<div class="post-metadata">

**Author:** ![Qfactor](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/qfactor/32/14921_2.png) [@Qfactor](https://forum.juce.com/u/Qfactor)\
**Post date:** [May 18, 2022, 10:55am UTC](https://forum.juce.com/t/solved-vst-midi-effect-plugin/51475/5 "2022-05-18T10:55:30Z")

</div>

> [@mackemlad](#):
>
> So my initial question is simple: can I create a VST MIDI Effect plugin (either VST2 or preferably, of course, VST3)?

Quoting one of Steinberg developers in their forum: “your frustration comes from the misunderstanding that you can build MIDI plug-ins with VST”.  
(see [VST3 and MIDI CC pitfall - #16 by Arne\_Scheffler - VST 3 SDK - Steinberg Forums](https://forums.steinberg.net/t/vst3-and-midi-cc-pitfall/201879/16))

If you think that this is a missed opportunity, you’re not alone.

---

<div class="post-metadata">

**Author:** ![mackemlad](https://avatars.discourse-cdn.com/v4/letter/m/8c91f0/32.png) [@mackemlad](https://forum.juce.com/u/mackemlad)\
**Post date:** [May 18, 2022, 1:29pm UTC](https://forum.juce.com/t/solved-vst-midi-effect-plugin/51475/6 "2022-05-18T13:29:56Z")

</div>

Thank you, @leehu - that’s interesting info. I shall give it a whirl shortly and let you know how it goes.

---

<div class="post-metadata">

**Author:** ![mackemlad](https://avatars.discourse-cdn.com/v4/letter/m/8c91f0/32.png) [@mackemlad](https://forum.juce.com/u/mackemlad)\
**Post date:** [May 18, 2022, 1:38pm UTC](https://forum.juce.com/t/solved-vst-midi-effect-plugin/51475/7 "2022-05-18T13:38:33Z")

</div>

Thank you, @Qfactor. I have seen much discourse on this forum and Steinberg’s about how the shift from VST2 to VST3 had affected the ability to write MIDI effect plugins. However, I had not yet seen such an unequivocal statement that VST was never intended to provide that capability.

That it does, but can no longer be used and it’s successor does not, seems counter-intuitive given the empirical evidence in the market that this capability is both useful and sought-after.

I will doggedly persevere a little longer, but may end up shrugging my shoulders as others have done. Thanks again for providing that clarification.

---

<div class="post-metadata">

**Author:** ![mackemlad](https://avatars.discourse-cdn.com/v4/letter/m/8c91f0/32.png) [@mackemlad](https://forum.juce.com/u/mackemlad)\
**Post date:** [May 18, 2022, 4:58pm UTC](https://forum.juce.com/t/solved-vst-midi-effect-plugin/51475/8 "2022-05-18T16:58:13Z")

</div>

@leehu - That was exactly what I needed, thanks. Well, that and a couple of other forum posts:

> **[inserting a 3rd party MIDI effect?](https://forums.steinberg.net/t/inserting-a-3rd-party-midi-effect/672849)**
>
> How do I do this. I have an instrument track and I want to use a pizmidi vst plugin called midiChordAnalyzer and cannot figure out how to do this in Cubase 9.0.1. help greatly appreciated. Greg K.

> **[Cubase - VST MIDI Output Routing?](https://vi-control.net/community/threads/cubase-vst-midi-output-routing.86259/#post-4447633)**
>
> Hey Guys,
> 
> I am totally new to Cubase and have a little difficulties finding my way around this DAW. Anyone knows how to load a VST3 plugin on a track and rout the MIDI output from the plugin to another track?
> 
> Thanks in advance,
> /Hans

Your advice makes sense, although not intuitively. However, if we think of my VST as an instrument and not an effect, it becomes more obvious. Like a VST synth, I accept MIDI input and do some processing on that input, although that processing doesn’t produce any audio output. However, like instruments may, it does generate MIDI output and, of course, that MIDI output can be used as an input to another instrument.

So for my future self, and for others asking the same question, my resulting setup in Cubase is:

1. Add the VST as a Track instrument:  
 ![image](https://us1.discourse-cdn.com/flex026/uploads/juce/original/2X/6/6c0f3af5377f15fcb123214ef3f32bfe862383eb.png)

2. Route the appropriate MIDI input device (in my case _Keylab 88_) to the input of the ArpeggiatorPlugin instrument:  
 ![image](https://us1.discourse-cdn.com/flex026/uploads/juce/original/2X/a/aa649c79ad1746599e421cd90b5bcc1f907a923a.png)

3. Route ArpeggiatorPlugin instrument’s MIDI output to the input of the relevant instrument(s):  
 ![image](https://us1.discourse-cdn.com/flex026/uploads/juce/original/2X/2/211e0c0a217bd484f58c1df8f983a6085e49c029.png)

In the above case, I am routing the output to three separate instances of Halion. As it happens, I could route the output to a single instance since my plugin outputs across 16 MIDI channels, but the use case I wanted to prove out here was to go to separate instruments so that I’m not tied to a single multi-timbral instrument.

It sounds fantastic! - much better than _MS GS Wavetable Synth_ 🙂 - and consequently I am encouraged to continue with this to flesh it out into something that others may find equally interesting.

Thank you so much, @leehu, for setting me on the right path.

---

<div class="post-metadata">

**Author:** ![mackemlad](https://avatars.discourse-cdn.com/v4/letter/m/8c91f0/32.png) [@mackemlad](https://forum.juce.com/u/mackemlad)\
**Post date:** [May 18, 2022, 6:00pm UTC](https://forum.juce.com/t/solved-vst-midi-effect-plugin/51475/9 "2022-05-18T18:00:43Z")

</div>

Never satisfied, I built the VST3 version again and tried that with no dice. The VST2 version works exactly as expected, but VST3 remains silent - I presume because it is not generating any MIDI output. I plugged a MIDI Monitor effect into the Halion instrument and that is what I observed: messages flowing through when using the VST2, and no messages when using the VST3.

I’ve read a lot (both here and at Steinberg’s forum) about how MIDI is treated differently between VST2 and VST3, but haven’t come across anything that specifically states this isn’t possible - in fact quite the opposite, such as here:

> **[Sending midi CCs in VST3](https://forums.steinberg.net/t/sending-midi-ccs-in-vst3/201785/10?u=mackemlad)**
>
> Hi, since this topic came out 3 years ago, we have added the possibility for a plug-in to generate MIDI-CC Output events. See https://developer.steinberg.help/display/VST/\[3.6.12\]+Legacy+MIDI+CC+Out+Event

…which specifically discusses MIDI CC events, whereas I’m currently only concerned with the simpler note events.

Any thoughts on what I may be missing that means no MIDI events are being output from my VST3 version?

**UPDATE**  
The answer was already here right on this forum. My issue (noted in my first post) was that I’d started with the Arpeggiator tutorial. This example expressly omits all audio inputs, which are apparently needed for _processBlock()_ to be called in a VST3. The specific answer I’m referring to was here from @stephenk (thank you! - worked first time):

> [@VST3 (midi) and JUCE](https://forum.juce.com/t/vst3-midi-and-juce/31100/22):
>
> I don’t know why they don’t fix that, but you just need to add an audio input and then it works: Arpeggiator() : AudioProcessor (BusesProperties().withInput("Input", AudioChannelSet::mono(), true)) // seem to need for sampleRate // : AudioProcessor(BusesProperties()) // add no audio buses at all - Original, doesn't work { addParameter (speed = new AudioParameterFloat ("speed", "Arpeggiator Speed", 0.0, 1.0, 0.5)); } processBlock() will not be called wi…

I am now a very happy camper. I’ll let this community know if/when I finalize something useful. Thanks again to everyone I’ve quoted above.

---

<div class="post-metadata">

**Author:** ![asi2015](https://avatars.discourse-cdn.com/v4/letter/a/a3d4f5/32.png) [@asi2015](https://forum.juce.com/u/asi2015)\
**Post date:** [January 29, 2023, 11:30pm UTC](https://forum.juce.com/t/solved-vst-midi-effect-plugin/51475/10 "2023-01-29T23:30:24Z")

</div>

@mackemlad: I’ve been unable get a JUCE (v7) VST3 plugin to accept MIDI CC. Can you provide a very basic code example (AudioProcessor) and the relevant configuration (JucePluginDefines.h) settings? I’ve been able to generate notes and fill the MidiBuffer and pass through successfully to the host, but I cannot get the CCs to do the same. In fact, as soon as I insert any plugin with WantsMidiInput and ProducesMidiOutput configured, I lose all incoming CCs from my hardware MIDI keyboard.

My example:

```auto
void NewProjectAudioProcessor::processBlock (juce::AudioBuffer<float>& buffer, juce::MidiBuffer& midiMessages)
{
    buffer.clear();

    // this works
    {
        auto msg = juce::MidiMessage::noteOn(1, 72, juce::uint8(100));
        midiMessages.addEvent(msg, 0);
    }

    // this does not work
    {
        auto msg = juce::MidiMessage::controllerEvent(1, 1, 100);
        midiMessages.addEvent(msg, 0);
    }
}

```

With this config:

```auto
#ifndef JucePlugin_WantsMidiInput
 #define JucePlugin_WantsMidiInput 1
#endif
#ifndef JucePlugin_ProducesMidiOutput
 #define JucePlugin_ProducesMidiOutput 1
#endif

```
