The ultimate noob

Topics: Getting Started, Newbie
Jul 12, 2013 at 10:35 AM
i wrote the below email to Mr Jaocobi but unfortunately he is going on holiday and cant reply, im hoping someone here can help me out:

I came across your gem of a project called VST.NET in my searches for a way to develop a VST in a language that I could familiarize myself with being from a PHP,Java,JavaScript development background. C++ was a whole different ball game but C# is a language i have started learning and love. With that said i am new to .NET development and also new to the Visual Studio environment. I got myself a C# book and Visual Studio 2012 express and have started from the bottom, developing small apps to learn the language, objects etc.

With that being said I love music, i am a producer and have an idea for a do it all MIDI VST, I know alot about midi and have developed vst's using flowstone but now i want to develop a vst from scratch hopefully with your gem VST.NET

I know you are busy and dont expect an instant reply but i am hoping for some guidance on getting going as i have been so frustrated reading all the jargon on your website and really being confused on how to get started. I know you mentioned you are working on a new documentation for VST.NET but what is most important to me is just to get going. Can you PLEASE, help me with the below points.

1) I have download VST.NET RTM.....this is the actual framework correct
FOLDERS in it (Code and Samples)
In code there is a CLR2 and CLR4, what is the difference here? 
How do i get started creating a new project for my VST using this framework in Visual Studio 2012 express. Please if you can explain to me like you are explaing to a new born baby :) because compared to your experience in .NET programming and Visual Studio my knowledge is like a new born babies
2) I downloaded the VST.NET.Samples.VS2008.Express
FOLDERS (Jacobi.Vst.Samples.CorePlugin,Jacobi.Vst.Samples.Delay,Jacobi.Vst.Samples.MidiNoteMapper,Jacobi.Vst.Samples.MidiNoteSampler)
I go into the Jacobi.Vst.Samples.MidiNoteMapper folder
and open this file: Jacobi.Vst.Samples.MidiNoteMapper.csproj
In the solution explorer It has all the projects open and Jacobi.Vst.Samples.CorePlugin is highlighted in bold
How do i build just the Jacobi.Vst.Samples.MidiNoteMapper VST, cause when i right click on it and say build i get this error:
Error 1 The command "copy "C:\Users\Documents\VST dev\VST.NET RTM\VST.NET.Samples.VS2008.Express\Samples\Jacobi.Vst.Samples.MidiNoteMapper\bin\Release\Jacobi.Vst.Samples.MidiNoteMapper.dll" "C:\Users\Documents\VST dev\VST.NET RTM\VST.NET.Samples.VS2008.Express\Samples.._SharedAssemblies\Jacobi.Vst.Samples.MidiNoteMapper.net.dll"
copy "C:\Users\Documents\VST dev\VST.NET RTM\VST.NET.Samples.VS2008.Express\Samples.._SharedAssemblies\Jacobi.Vst.Interop.dll" "C:\Users\Documents\VST dev\VST.NET RTM\VST.NET.Samples.VS2008.Express\Samples.._SharedAssemblies\Jacobi.Vst.Samples.MidiNoteMapper.dll"" exited with code 1. Jacobi.Vst.Samples.MidiNoteMapper

Ok, i think i have spammed you with more than enough noob questions for now. Basically i just want to get started, i want to create a new project, and just develop something simple that will recieve midi from channel 1 and print it out to screen on the vst

Thanks mr Jacobi!
Jul 12, 2013 at 4:21 PM
Edited Jul 12, 2013 at 4:22 PM
In code there is a CLR2 and CLR4, what is the difference here?
CLR2 is targeting DotNet 2.0
CLR4 is targeting DotNet 4.0
Since you're using VisualStudio 2012 (DotNet 4.5), CLR4 is better suited but you lose compatibility with DotNet versions before 4.0

I go into the Jacobi.Vst.Samples.MidiNoteMapper folder and open this file: Jacobi.Vst.Samples.MidiNoteMapper.csproj:
It's better to open a solution (sln) rather than a project (csproj), make sure all projects dependancy are OK.

In the solution explorer It has all the projects open and Jacobi.Vst.Samples.CorePlugin is highlighted in bold:
The highlighted project is the startup project.

How do i build just the Jacobi.Vst.Samples.MidiNoteMapper VST, cause when i right click on it and say build i get this error:
You can't build just the Jacobi.Vst.Samples.MidiNoteMapper VST if you haven't build the dependancy reference (dll from other csproj).

And I don't think you can compile all the projects in Vst.Net with a C# express edition:
I haven't look in a while but there should be some managed C++ and maybe even calls in the Platform SDK for DLL such as Jacobi.Vst.Interop.dll which bridges unmanaged code with C# through managed C++.

If you reference the compiled binairies for the DLL you can't build, you should be able to compile the samples project. (haven't tried it)
Just unload the project reference you can't build from the solution and include a direct path reference to the binary DLL.
Try to compile each project separately in the solution in the right build order, swapping reference you can't build until you can compile thje plugin sample.
Jul 12, 2013 at 5:17 PM
Oh yeah I should have mentionned the error you are getting are from the Post-Build commands in the projects, there is a command to copy all built assembly to a single folder. The reason this is not working is because the files can't be found in those location. Either fix the compilation errors, copy a pre-built binary in the designated folder or remove the post-build copy commands.
Jul 12, 2013 at 5:55 PM
Hi Yury

Thanks a mill man.
I think its starting to make sense now. Can i just run through some steps that i think i would need to do to build my new plugin.

1) Create new project in VS2012, name the project (must this project be a Class Library type? If so how do i create my GUI) Also in the end how do i generate the VST's dll
2) Add reference to the Framework dll and drop it and the core dll in the GAC (BTW when i try drop the files in the GAC nothing happens, or for the core one i get a access denied error)
3) create class that derives the StdPluginCommandStub and then create an override method of the CreatePluginInstance
4).... from here on im a bit stuck, where do i go from here
Jul 12, 2013 at 8:41 PM
Edited Jul 12, 2013 at 8:45 PM
I suggest you start by modifying an existing plugin in the samples like MidiNoteMapper which seems suited to your use case of a Midi Plugin.
The samples contains all the plumbing like StdPluginCommandStub, GUI etc...
You can copy the MidiNoteMapper project and change the name quite easily after you've confirmed it compiles and works in your DAW.

I use Vst.Net to create hosts not plugin, so I'm not sure what to do next. If I recall correctly theres one of the Vst.Net dll that you have to rename to something that matches somewhat your project name or you have to rename your plugin to something else. This Vst.Net DLL is a loader that will load your plugin, in your DAW I think you select the renamed loader. Sorry for the confusion on this last point I really don't remember much besides I had to rename a file after compilation.

The GAC should not be necessary if the DAW loads all DLL in the current directory.
Coordinator
Aug 3, 2013 at 6:38 AM
Yes, starting from a Sample plugin is the easiest way. Also try to load that sample plugin into the DAW you're using, so you know that is working before you start changing things.

If you download and install the VST.NET Visual Studio project templates, you can create a new project from scratch and still have a running plugin (either Audio or Midi) - in case you do want to start from scratch.

Hope it helps.