# MIDI Plugin in VST Format?



## Hans Adamson (May 24, 2019)

Is it possible to create a VST plugin that intercepts the MIDI signal coming from the DAW and processes it before playing back instruments in Kontakt? Like a multiscript, but in VST format.

Thanks,
/Hans


----------



## angeruroth (May 24, 2019)

Yes, at least using the SDK provided by Steinberg.
You can also do it with .net and other language specific wrappers.


----------



## tack (May 24, 2019)

This should be something JUCE would make relatively easy. (Relative to using the VST SDK directly, anyway.)


----------



## henrik242 (May 25, 2019)

Hi,
Would that really work? As far as I know, daw's generally only allow one instrument per channel.


----------



## d.healey (May 25, 2019)

Yes MIDI out is part of the VST spec. I'm eagerly waiting for MIDI out to be added to HISE :D Not too long I hope.


----------



## henrik242 (May 25, 2019)

Cool, but how would you route the midi output from one instrument to another if the channel can only hold one instrument?


----------



## Lukas (May 25, 2019)

Depends on the DAW. Cubase for instance supports MIDI plugins as a MIDI insert effect. Other DAWs like Studio One need to load the MIDI plugin as an instrument and route its output to another track/instrument.

For example I'm heavily using the free pizMidi plugins that are available for Win and Mac. I use them in Studio One and in Gig Performer for transforming velocities or controller data or for getting an chord hold behaviour for live gigs. Works great.


----------



## EvilDragon (May 25, 2019)

henrik242 said:


> Cool, but how would you route the midi output from one instrument to another if the channel can only hold one instrument?



Not in Reaper


----------



## henrik242 (May 25, 2019)

Ok, so you're talking about midi plugins written as VST'?


----------



## Dewdman42 (May 25, 2019)

Lukas said:


> Depends on the DAW. Cubase for instance supports MIDI plugins as a MIDI insert effect. Other DAWs like Studio One need to load the MIDI plugin as an instrument and route its output to another track/instrument.
> .



Cubase also requires you to setup some nutty routing in order to do this. The midi inserts in Cubase are NOT vst, they are a closed set of proprietary plugins.

Can you please elaborate a bit on how you setup midi VST plugins in S1 in order to feed into other instrument plugins?


----------



## brenneisen (May 25, 2019)

Lukas said:


> Cubase for instance supports MIDI plugins as a MIDI insert effect.



only the factory ones


----------



## Lukas (May 25, 2019)

Oh sorry. I haven't used Cubase for 8 years... I thought they had implemented VST plugins for its MIDI insert slots. Okay then it requires some routing action.

*In Studio Studio it works as follows:*

- Drag the VST MIDI plugin from the browser (will be shown as VST instrument) to the arrangement to create a new instrument drag
- The track's "out" is now going to the MIDI plugin (in my case it's midiChordHold), the "in" is set to your master keyboard or "All inputs"
- Again add a new instrument track with the instrument you want the receive the MIDI data
- The "out" of the new track is now set to the instrument (in my case Omnisphere). *Now change the "in" to your MIDI plugin (instead of your master keyboard)*
- The signal chain is now: Master keyboard -> VST MIDI plugin -> instrument
- Important: You need to enable "Monitor" for both tracks in order to have them both receive and play MIDI data (the right button in the track controls)





I hope it helps. Of course you can chain more MIDI plugins that way or have more than one instrument receive the output of a MIDI plugin.


----------



## Lindon (May 26, 2019)

tack said:


> This should be something JUCE would make relatively easy. (Relative to using the VST SDK directly, anyway.)


JUCE is a "little" curly in its not obvious(or as obvious as is usual in JUCE) how you make a "MIDI out based plugin - but yes very very possible.


----------



## rrichard63 (May 26, 2019)

I believe that Blue Cat Audio's Plug'n Script can also do this.


----------



## Dewdman42 (May 26, 2019)

Protoplug can do it also, for free. https://www.osar.fr/protoplug/


----------



## Hans Adamson (May 26, 2019)

Do you think it would it be possible for me to create a VST plugin with any of these tools having only experience from Kontakt script programming? If there were tutorials, that would be great. I want to convert a Kontakt multiscript to a VST plugin.


----------



## d.healey (May 26, 2019)

Hans Adamson said:


> Do you think it would it be possible for me to create a VST plugin with any of these tools having only experience from Kontakt script programming?.


Yes it's possible and your KSP experience will give you good knowledge of programming logic, but you'll have to learn C++. Or have some patience and wait for HISE to implement MIDI out then you'll just need to learn HISE script, which is easier than C++ 

Another option is Cabbage which does have MIDI out apparently and uses CSound which is much simpler than C++ - http://cabbageaudio.com/docs/using_cabbage/


----------



## Hans Adamson (May 26, 2019)

d.healey said:


> Yes it's possible and your KSP experience will give you good knowledge of programming logic, but you'll have to learn C++. Or have some patience and wait for HISE to implement MIDI out then you'll just need to learn HISE script, which is easier than C++
> 
> Another option is Cabbage which does have MIDI out apparently and uses CSound which is much simpler than C++ - http://cabbageaudio.com/docs/using_cabbage/


Thanks David,
Will cabbage allow me to create a custom interface, using the images (Wallpaper, switches etc.) that I have created for the multiscript?

Hmm, it seems the user will have to install CSound to use the exported VST plugins?


----------



## Dewdman42 (May 26, 2019)

check out ProtoPlug: https://www.osar.fr/protoplug/

Protoplug uses Lua, its way way easier then C++. It will do both midi and audio. its free. Check it out. Its about as hard or easy to program as LogicPro's Scripter, but has better GUI support then Scripter, though still not great. It can also do audio processing if you want to. 

if you want a little more sophisticated GUI, then BlueCatAudio's is the next step and not free. 

After that it's JUCE. I don't recommend JUCE until you learn C++ which is not a quick process.

VST spec definitely provides for midi in and out. The scripters just make it easier to do simple tasks. If you need a more sophisticated plugin with a nice GUI, then I'd go JUCE all the way, but its going to be a longer project. I plan to learn JUCE this year, but I have many years experience with C++ already.


----------



## d.healey (May 26, 2019)

Hans Adamson said:


> Thanks David,
> Will cabbage allow me to create a custom interface, using the images (Wallpaper, switches etc.) that I have created for the multiscript?



Yes



> Hmm, it seems the user will have to install CSound to use the exported VST plugins?


Yes, Cabbage recommends you include CSound in the installer you provide to your users. - http://cabbageaudio.com/docs/distributing/


----------



## d.healey (May 26, 2019)

Dewdman42 said:


> check out ProtoPlug: https://www.osar.fr/protoplug/


Oh this looks really useful, will check it out!


----------



## Dewdman42 (May 26, 2019)

The author doesn't have it yet, but if you need an AUMFX version to use in LogicPro, lemme know, I built it from his source and have it posted somewhere... I think he's going to look into adding that to his distribution since i did it, but I don't think he's done it yet.

here: https://www.logicprohelp.com/forum/viewtopic.php?f=45&t=141805


----------



## angeruroth (May 26, 2019)

C++ is a bit harder to learn, but if you have the time, it would let you do everything you want and more, and it should run faster, cause latency is important.
It would also allow you to use the best UI framework possible, if you learn got to use it. And you coul even make a TCP server to control all your plugin instances from a central window.
But yeah, it would take time and effort.
If you are not sure, maybe the best option is to use one of the tools previously mentioned.


----------



## Dewdman42 (May 26, 2019)

The scripters mentioned will not add any latency. Yes C++ runs faster then Lua or Javascript, but Lua and Javascript both run perfectly fast enough for midi processing, its not a concern. In any case, they will not add any latency at all period. The worst that can happen is that they might increase CPU usage and/or eventually might be doing something so radically complex that midi events get dropped or something, but latency would not be effected AT ALL.

I have done some LogicPro Scripter scripts in Javascript that are literally thousands of lines of javascript code...granted, I'm being careful not to do anything stupid, but they do not even register even one extra percent of cpu usage...its really not a concern for most people. 

The main advantage of C++ is that you can build a real GUI with it. But do not under-estimate the amount of effort required to learn C++.


----------



## Hans Adamson (May 26, 2019)

angeruroth said:


> C++ is a bit harder to learn, but if you have the time, it would let you do everything you want and more, and it should run faster, cause latency is important.
> It would also allow you to use the best UI framework possible, if you learn got to use it. And you coul even make a TCP server to control all your plugin instances from a central window.
> But yeah, it would take time and effort.
> If you are not sure, maybe the best option is to use one of the tools previously mentioned.


Thanks Angeruroth, I have had a C++ book on my bedside table for many years, but there has always been something more important than to go through the chapters one by one and do the exercises. So I have only started. I want to do it, but realistically I may have to find an easier way. My goal is to create a VST plugin (as well as plugins in AU and RTAS format) based on the multiscript I have already written, that I can sell commercially. So I don't want to include proprietary software from another company, or be dependent on open source material in the final product. ATM I am exploring my options and trying to figure out the shortest way to get there.


----------



## Dewdman42 (May 26, 2019)

if you are going to sell it, I recommend C++ then. All the way.


----------



## Hans Adamson (May 26, 2019)

OK the book I had started with is "Programming in C" by Stephen G. Kochan, so it is not about C++. Would reading the book be a first stage to learn C++?


----------



## Dewdman42 (May 26, 2019)

yes, somewhat. But really C++ is big step in a new direction from there, you are better off finding a C++ for beginners.


----------



## Hans Adamson (May 27, 2019)

I just want to make sure I am understanding the MIDI signal chain correctly when using a VST plugin. Can a multiscript for processing the MIDI signal (Port A, 16 channels) be ported to a VST plugin and function in the same way. I.e. after port A's 16 MIDI ch are processed by the plugin, the various processing results for the different channels may be distributed to individual tracks containing instruments designated port A midi channels 1-16? That's the way my multiscript is working at the moment. I want it to work the same way also when the multiscript is replaced by a VST plugin.


----------



## EvilDragon (May 28, 2019)

MIDI routing is completely up to the host, not the plugin.


----------



## Lukas (May 28, 2019)

...but of course it's possible to process multiple MIDI channels in one plugin. The DAW only has to route it this way (which should work in any contemporary DAW).


----------



## neblix (May 28, 2019)

Use JUCE (C++) or HISE (JavaScript) frameworks for building VST's. They have a lot of professional support.


----------



## Hans Adamson (May 28, 2019)

JUCE looks interesting to me. Anyone created plugins with custom interfaces using it?


----------



## EvilDragon (May 28, 2019)

Sure, UVI Falcon, Modartt Pianoteq, Valhalla everything, Madrona Labs everything...


----------



## Hans Adamson (May 29, 2019)

I am trying to install/open Juce, but it is just impossible. A page opens directing me to join "Roli" before I can use Juce. When I try to enroll in "Roli", I receive a message that I need to activate java script in my browser (Chrome). I check the Chrome settings, and java script is already enabled. I test it on several java testing web sites that verifies that java is on and working. "Roli" still won't let me sign up and tells me I have to enable java script. Then I start all over and get back to the same result. What should I do?
I am on a PC running Windows 7.


----------



## Hans Adamson (May 29, 2019)

It gets weirder. I tried to post a question about my problem on the Juce Forum, and I was immediately directed to join "Roli", which I did successfully. Happy, I try to open Juce again, but once again it refuses me to get beyond the "enroll in Roli", enable java script routine, etc.... :(


----------



## d.healey (May 30, 2019)

Unfortunately, as happens too often with "successful" free software companies, Roli have hidden away their free software lineage so that most new users are completely unaware that... Roli has a github page where you can download the latest source and build JUCE yourself - anonymously https://github.com/WeAreROLI/JUCE


----------



## Hans Adamson (May 30, 2019)

d.healey said:


> Unfortunately, as happens too often with "successful" free software companies, Roli have hidden away their free software lineage so that most new users are completely unaware that... Roli has a github page where you can download the latest source and build JUCE yourself - anonymously https://github.com/WeAreROLI/JUCE



Thanks David, I'll try and download from github. I am confused about the requirements on the page though:
*Building JUCE Projects*

macOS: macOS 10.11 and Xcode 7.3.1
Windows: Windows 8.1 and Visual Studio 2013 64-bit
Linux: GCC 4.8
*Minimum Deployment Targets*

macOS: macOS 10.7
Windows: Windows Vista
Linux: Mainstream Linux distributions
Does this mean I must have Windows 8 and anyone that will use the plugin must have the "Minimum Deployment Targets"?


----------



## d.healey (May 30, 2019)

I assume those are the minimum requirements. It definitely runs on newer versions.


----------



## Light and Sound (May 30, 2019)

Hans Adamson said:


> Thanks David, I'll try and download from github. I am confused about the requirements on the page though:
> *Building JUCE Projects*
> 
> macOS: macOS 10.11 and Xcode 7.3.1
> ...



For juce development you just need juce and a c++ compiler. For stability I recommend visual studio, if you're on Windows you can run it. Juce has a tutorials page and a few guides on YouTube including setting up from scratch, should be enough for anyone looking to get started.

The requirements for users are based on setting set within the juce producer prior to starting a project (and the compiler/system requirements will be project dependant anyway)


----------

