This project has moved and is read-only. For the latest updates, please go here.

Hard starting..please help with understanding VST

Topics: Getting Started, Midi, Newbie
Mar 2, 2012 at 3:15 AM

Hello peoples..

First, thanks obiwanjacobi for writing this VST host..

I have "small" troubles. I am writing my bachelor project and i need use VST. I am writing "simply" project which will be used like VST plugin in programs like Fruity loops, etc. I need know informations about midis. In short words someone will record some midis, turn on my VST plugin and i need then get those midis and informations about them.

Last 3weeks i am trying establish your codes (samples) but without some results. So i spoke with some peoples and i readed some links about VST. And i know that for this action i need call ProcessReplacing method and then ProcessEvents method. In processReplacing method i can get whole buffer with midis and in processEvents method i can handle midi and there i can get informations about them.


When i am trying write some DLL (i dont know exactly if VSThost will "call"-start .exe file or if this need to be .dll file). But this is not the main problem. VSThost 100% invoke .dll files, and for example in Jacobi.Vst.Samples.MidiNoteMapper you have .dll files, so i started VSThost and i wanted load your MidiNoteMapper. Nothing happend. I wroted "simple" DLL where are only ProcessReplacing and ProcessEvents methods. Those methods only open console and show there some text. When i wanted load this my VSTplugin, again, nothing happened.

I am really at an end, i dont know what to do. My "logic" brain say myself that i am doing something bad :D.. If my DLL use for example your Jacobi.VST.Framework, the framework need to be "visible" (in same directory) but how can i do that, in 99% are VST plugins only 1dll file.

I dont know where i can start and what i can do.

Or maybe is possible that i understand totaly bad whole your "projects" and that the project is something like VSThost. I thought that your VST.NET is something like SDK to write VST plugins. Maybe is possible that i understand whole project bad. And that i need only write the processReplacing and processEvents method and when i give it for example in FLstudio, the FLstudio will send my informations about midis etc.. I am really at an end..

Please will you (or someone else) explain me starts with VST.NET or say me that i am totaly stupid and i dont need the VST.NET and to guide me on right way?

Last 3weeks i readed whole your documentation. I readed millions articles about VST, i spoke with my profesor what control my project, but still i dont understand the problematic in VST. Program problematic i understand (i need call processReplacing and processEvents methods)..but others i dont understand..


Big thanks for answer, help, whatever.

Best regards piggy!

Mar 2, 2012 at 10:10 AM

I'll try and offer a few words of wisdom, although my experience is in writing a vstHost. When you say vstHost  do you mean the VstHost in the solution, or this one  The VstHost in the solution is a demonstation an as such is  incomplete regarding getting a syth plugin to make any sound.  The purpose of the VstHost in the solution is to provide a starting point for people who want to write their own vstHost in .Net which I am doing.  If you are developing a plugin I would recommend using the host in the link, athough the host in the project may help with debugging.

I would start with the Coreplugin in samples. This will compile to a dll, although , if memory serves me correctly get renamed to Coreplugin.Net.vstdll.

The Jacobi.Vst.Interop.dll will be renamed to Coreplugin.dll.  If for some reason this does not happen you will need to do this manually.

I had also to compile all project as x86.

Be aware that when you load up the dll in your host you should load Coreplugin.dll and NOT Coreplugin.Net.vstdll. Coreplugin.dll is interop layer which allows unmagaged hosts (typically written in C / C++)  to talk to you .Net dll.

Regarding MIDI the host will call your dll with PluginContext.PluginCommandStub.ProcessEvents(ve) where ve is VstEvent containing MIDI  data

I hope you find this useful.

Mar 2, 2012 at 12:28 PM
Edited Mar 2, 2012 at 12:29 PM

Hallo tfish, thanks for your usefull post. The coreplugin i didnt renamed and maybe some problem was there so i will try that again in few hours (now i need to go out)..

The VSThost by hermann seib i am using but i am not able to set that and on internet i dont see any tutorial on it. Sometimes when i add keyboard there, sometimes play that, sometimes no. And when i it played and i added there some plugin, all the time that played only the "input" and the signal didnt went throught the plugin and the signal wasnt "modulated"..i tried there all combinations of midi inputs/outputs, but probably i am really a little but stupid on this problematic.

In the last 3weeks i have dreams only about the VST :D..maybe not dreams but nightmares :D

Mar 2, 2012 at 6:33 PM

If I understand correctly you want to build a vst plugin that processes incoming midi events. What does it output? Audio (samples) or something else?

Perhaps a good place to start is the Visual Studio 2008/2010 project templates I made. Install those on your machine and you will have two VST.NET project templates: one for an audio plugin and one for a midi plugin. Just compiling the code should give you a working plugin (an audio delay or a midi gain/transposer).

I have tested all the VST.NET sample with vsthost.exe (by Hermann Seib) so they should all load and work well. I do remember however also fumbling with getting the signal flows to work correctly. Head over to Hermann's forum for any specific questions about vsthost.exe. As tfish said, browse to the plain [plugin].dll when opening the plugin in vsthost.exe, not the any of the other files.

All files should be located in the same folder. So you have the [plugin].dll (renamed from Jacobi.Vst.Interop) the [plugin].net.vstdll - the actual managed plugin assembly and there should be Jacobi.Vst.Core and Jacobi.Vst.Framework (all in the same folder).

So lets try to get those samples working in vsthost.exe first. If we have that, you know at least how to test any code you'll program later on. ;-) Try to be a specific as possible when you report back with errors or issues.

Hope it helps,

Mar 2, 2012 at 9:36 PM

Output is "nothing" (ouput is same like input, i need get only informations about midis, i know, that possible way is write only simple midi parser and decode midi, but my supervizor wanted that i do that with VST) :) i will save wav file from PRAAT on disc..maybe in next versions it will be WAV file with vocals included in the program..(i am writing simply "hip hop" and "electro" vocalizer..)..

ASK on VSThost..i know that i will ask on other forum and that this is not forum on this ask, but maybe someone will help maybe. How i wroted the VSThost dont work how i think that he must work. When i load some plugin and when i click on keyboard, must I set something to "activate" plugin? if i want "change" the input in VSThost and when i want play the changed sound? bcs when i am loading some plugin and when i click on keybord, i can get all the time only the "classic" output (like without plugin)

Mar 3, 2012 at 11:48 PM

ok, if someone will have troubles with VSThost like me (all what i should get was "original" sound)..

so i solved that with VSTi plugin. I ignore now 0:{In} and instead of that i am using VSTi plugin and the jacobi's delay sample work fine.

So now i am going to try do what you all wroted here and try write new plugin in C# :)..thanks you guys ^^

Mar 4, 2012 at 10:29 AM

That's great to hear. 

Good luck on your project and have fun with VST.NET.

Mar 6, 2012 at 3:11 AM
Edited Mar 6, 2012 at 6:27 AM

one ask more.

If i understand good what you wroted

==>All files should be located in the same folder. So you have the [plugin].dll (renamed from Jacobi.Vst.Interop) the [plugin].net.vstdll - the actual managed plugin assembly and there should be Jacobi.Vst.Core and Jacobi.Vst.Framework (all in the same folder).

So I am trying now to "rewrite" your Delay plugin (i downloaded it from 0.8 version bcs in new 0.9 version i dont see project files i see there only debuged dll and vstdll files)

And now when i rewroted something and when i want test it i need get too VSTDLL files. But i am sure that visual studio cant build in VSTDLL files..And now if i understand good what you wroted i need rename something in VSTDLL..Is that mean the Jacobi.Vst.Interop?

I am really sorry for "hard work" with me maybe i am really a little bit stupid :)..

really thanks for all answers


EDIT: ok..i am really stupid i downloaded bad file :D so i installed the templates so i am getting to understand it..but still i dont understand how can i build VSTDLL file..??

EDIT2: i tried rewrite the VstNetMidiPlugin to easy "form"-when some midiEvent is catched i will show windows console with some output..but problem is that the plugin doesnt show in VSThost when i load it (therefore i am asking if vstdll is important bcs when i am trying to load SAMPLE delay and when i have not .vstdll there VSThost shut down when i am starting it with error..When i copy in folder with Jacobi.Vst.Delay.dll, VSThost start without problem..So i am thinking that .vstdll file is important and i dont know where can i build this file)

EDIT3: :D maybe i will end on EDIT3289038139012 :D..ok..i searched some topics about vstdll..and i see..when i have for example VSTplugin solution (project). i will build VSTplugin.dll..then i need rename Jacobi.Vst.Interop.dll in VSTplugin.dll..and the "old" (my builded) VSTplugin.dll in i am still stuck on loading this plugin. When i do all those actions and renames and i am trying to load this plugin, VSThost doesnt load anything. I didnt rewroted code so much. I tried add there only some lines for opening console. Maybe is there important rewrite parameters like version, name of plugin, etc. but i am not sure and i think that it is not important.. So if someone will a little bit more help me i will be really lucky. I still trying to "decode" all informations :D

Mar 7, 2012 at 3:24 PM

The Jacobi.Vst.Interop assembly contains code for an unmanged C++ native plugin. Any Vst host will recognize it as a (native) Vst plugin. But Jacobi.Vst.Interop doesn't DO anything so the first thing it does is looking for a .net.vstdll with the same name. That is the managed plugin, the one you build. That is why you will get an error if the Jacobi.Vst.Interop cannot find it. That is also why you have to rename Jacobi.Vst.Interop to your plugin name because it looks towards it own name, to find the managed assembly. After the managed plugin has been loaded, all Jacobi.Vst.Interop does, is call into the managed plugin when it receives a call from the (native) vst host -or- call into the the umanaged host, when the managed plugin tries to call it.

Jacobi.Vst.Interop references Jacobi.Vst.Core and the managed plugin assembly also references Jacobi.Vst.Core. So that assembly should also go in the same folder. And unless you're building a core-plugin (a plugin that only uses Jacobi.Vst.Core) you should also put Jacobi.Vst.Framework in the same folder. So a typical managed plugin folder will contain at least 3 usually 4 files.

The renaming of the assemblies is usually done in the After-Build event in your plugin project. With a couple of (x)copy operations it is easy and automated, so you don't have to think of it or do it by hand. Make sure you're not renaming already renamed assembly files!

I hope I have explained this in a way so you will understand. If you have any questions, just ask - but please, keep them short. ;-)

Hope it helps,

Mar 8, 2012 at 8:30 AM

this helps..but i readed it moretimes. But how i wroted. (short version :)). If i rename Jacobi.Vst.Interop on "my_plugin.dll" and builded my_plugin.dll rename on "" and i am trying to load this plugin in VSThost. Nothing happend. So question. Do i the renaming process right?

Jacobi.Vst.Core.dll is in my_folder
Jacobi.Vst.Framework.dll is in my_folder
Jacobi.Vst.Interop.dll renamed on my_plugin.dll is in my_folder
my_plugin.dll renamed on is in my_folder
in VSThost i click on File->Set PlugIn path and search there my_folder and click OK. File->Rescan plugins And i dont see the plugin in there. When i try File->New Plugin and load that plugin. Nothing happend..

I am a little bit confused of that..

Mar 8, 2012 at 9:12 AM

What is in the Post-Build Event in the project-settings of the project you use to build the plugin?

Mar 18, 2012 at 1:23 AM
Edited Mar 18, 2012 at 7:14 AM

sorry, i had no time last few days (i worked on other project) i have time on next work on my bachelors the Post-Build Event in the Project settings is:

copy "$(TargetPath)" "$(TargetDir)\$(TargetName).net.vstdll"
copy "$(TargetDir)$(TargetName).pdb" "$(TargetDir)\$(TargetName).net.pdb"
copy "$(TargetDir)\Jacobi.Vst.Interop.dll" "$(TargetPath)"

ok, i see that i dont need rename builded .dll files..But without renaming i have same problem.

how i said:
When i try build it and when in VSThost i set "Set PlugIn Path" on the folder, no plugins are there in VSThost to load..:-/ (the same when i build the templates what you did with renamed $safeprojectname$ on VstNetAudioPlugin)..Build is without error but i am not able to load the plugin in VSThost.

But when i set "Set PlugIn Path" on downloaded VST.NET (where are Binaries/Debug and Binaries/Release, or when i copy the files from there somewhere and set the path on that folder)..In VSThost plugin load without problem. Do I need something more to compile and build the templates codes that they can be loaded in VSThost?

i am really confused of that..
its not working for me and i have no idea why..without that i am lost..


EDIT: ok, next view..I tried that all on my macbook with VMWare emulated Win7 32bit..and all work fine..Builded plugin i can load and work fine. On my desktop PC i use Win7 64bit, so what is problem? are the VST.NET not compatibile with 64bit systems? it is little big problem i think today, fast 99% of PC on the world use 64bit systems (if that is the problem)

Mar 18, 2012 at 1:10 PM

I always use the New Plugin... menu option from the file menu in vsthost.exe to open a new plugin. Browse to the <myplugin>.dll file (the renamed Jacobi.Vst.Interop.dll). That always works for me.

You only need a 64 bit version if your host is 64 bits. So did you start the 64 bit vsthost.exe? then you need to use the 64 bit version of Jacobi.Vst.Interop. The managed code is interpreted by the CLR so that does not (really) matter.

Hope it helps,

Mar 18, 2012 at 1:21 PM

soory obiwan, was about 7hours A.M. what i wroted that and i didnt slept and now i see what i wroted for nonsence :D.. it cant be because of VST.NET is not compatible with 64bit system but i see problems with VSThost by hermann seib with 64bit systems (i am not able to load there something)..and i searched it on forums too that people have problems with 64bit maybe i will write it and test it on 32bit system on macbook..and then in my system for example in fruity loops..

thanks you very much for your help!!!!

Best Regards, piggy.