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

Loading a Plugin

Topics: Audio, Host Development, Midi
May 23, 2014 at 7:13 PM
Edited May 23, 2014 at 7:14 PM

I'm trying to create a musical instrument that works with gestures using Kinect. I'm using Microsoft Visual C# 2010 Express and I want to load a guitar VST plugin for activate the musical notes.

I'm totally new here and I don't have any idea of how to start. I've seen the discussion in a preview post here: about how to load a plugin, but when I try to open the file Jacobi.Vst.Samples.Host with Microsoft Visual it appears the next message:

"The source control provider associated with this solution could not be found. The projects will be treated as not under source control.

Do you want to permanently remove the source control bindings from the projects?"

As I said before I'm a bit lost and I don't understand what it means, and how I'm going to do to achieve my goals. If anyone here could help me I would be very grateful.

Thank you very much.

May 23, 2014 at 8:06 PM
Yes you want to remove Source Control. The owner and contributor of this project uses source control and he publishes the same project as he is working on (including bindings to source control). However he doesn't give out the access to source control so you have to permanently remove it. In the same vain you would want to read on on how to remove signing and missing manifest references on this forum in order to compile the project.
May 24, 2014 at 9:28 PM
Edited May 24, 2014 at 9:28 PM
Thanks Yury!

I've found in another Thread this comment of yours:

"Make sure you remove missing files references: "AssemblyInfo.General" in every project.
Make sure you remove missing files references: key files (*.snk) in every project.
Make sure you remove key signing in every project configuration.

The samples should compile after following these steps. "

Ok, now I open Jacobi.Vst.Samples.Host and I say Yes, I want to remove Source Control. After I go to the Folder Properties Properties where I can find AssemblyInfo.General.cs and I remove it. I don't find the key files *.snk in the project, or the key signing, I don't know where they should be.

I look at the Jacobi.Vst.Core and Jacobi.Vst.Interop in Folder References and they have and exclamation symbol because they say that the referenced component could not be found, so I remove them and then add them again, but now a warning message appears.

"Warning 1 There was a mismatch between the processor architecture of the project being built "MSIL" and the processor architecture of the reference "Jacobi.Vst.Interop, Version=, Culture=neutral, processorArchitecture=x86", "AMD64". This mismatch may cause runtime failures. Please consider changing the targeted processor architecture of your project through the Configuration Manager so as to align the processor architectures between your project and references, or take a dependency on references with a processor architecture that matches the targeted processor architecture of your project. Jacobi.Vst.Samples.Host"

I have tried with all the Jacobi.Vst.Interop of the VST folder, CLR4 x86 and x64, CLR2 etc... but the warning persists. And if I try to compile I find this error:

Error 1 The type 'Jacobi.Vst.Core.Host.IVstPluginContext' is defined in an assembly that is not referenced. You must add a reference to assembly 'Jacobi.Vst.Core, Version=, Culture=neutral, PublicKeyToken=fa678e13c1efc859'. C:\Users\David\Downloads\vstnet-74520\Source\Samples\Jacobi.Vst.Samples.Host\PluginForm.cs 16 33 Jacobi.Vst.Samples.Host

Why is this happening??

May 24, 2014 at 11:15 PM
You should not remove assembly references which are under the references folder, theres probably a warning because you haven't build them. This might be because of your build mismatch problem, go into menu Build configurations and set everything to 32 bits. Remove files with the triangle warning which are not in the references folder like assemblyinfo, these are files not referemces. The key signing and snk files are found in the project properties, right click on the project and select properties. The exact location will vary wheter it's a c sharp or cplusplus project, you find them under names līke signing, keys or snk files etc..
May 25, 2014 at 9:33 AM
Here's some background:

The Interop assembly is what it seen as the plugin to an (unmanaged) host. It is loaded first and triggers the mechanism that auto-loads the .NET CLR. Bases on the properties of the Interop assembly (.NET platform and 32/64 bit) a different CLR may be loaded, setting the stage for all other .NET assemblies that are loaded into that process (your managed plugin assembly for instance). For this reason there are a number of configurations for the VST.NET solution that each build a little different (all combinations of Release/Debug and 32/64 bit). If you look at the Configuration Manager for the VST.NET solution, you can see that only the Interop project has a specific platform setting - the rest is all AnyCPU. That is because Interop is a C++ project.

The warning about the platform mismatch is because the sample projects are build with the AnyCPU configuration - which suggests a platform agnostic build - but you are referencing an assembly (Interop) that is NOT platform agnostic (in your case 32-bit specific). In most cases you can simply ignore this warning as long as you execute your plugin on the same platform the Interop assembly was compiled for.

The 'second' error is normal in .NET. You have to include the dependencies of any assemblies you reference. Important is the correct CLR version and .NET platform.

Hope it helps,
May 26, 2014 at 3:59 PM
Thank you very much for your answers! I will keep trying but for the moment I don't have so much time, I'll keep you informed.

Jun 5, 2014 at 6:32 PM
Hi Again,

It is possible that Jacobi.Vst.Samples.Host doesn't use snk files? Because I don't find them in any folder of the Sample and when I look at project properties, I click at Signing and I don't fin anything, just two checkboxes with: Sign the ClickOne manifest, and in the other one: Sign the Assembly.

Anyway when I try to execute appears the next error message:

Error 5 The command "copy "C:\Users\David\Downloads\vstnet-74520\Source\Samples\Jacobi.Vst.Samples.Host\bin\x64\Debug\Jacobi.Vst.Samples.Host.*" "C:\Users\David\Downloads\vstnet-74520\Source\Samples\Jacobi.Vst.Samples.Host\BuildResults\CLR2\x64\Debug\"
del "C:\Users\David\Downloads\vstnet-74520\Source\Samples\Jacobi.Vst.Samples.Host\BuildResults\CLR2\x64\Debug\Jacobi.Vst.Samples.Host.vshost.*"
copy "C:\Users\David\Downloads\vstnet-74520\Source\Samples\Jacobi.Vst.Samples.Host\bin\x64\Debug\Jacobi.Vst.Samples.Host.exe" "C:\Users\David\Downloads\vstnet-74520\Source\Samples\Jacobi.Vst.Samples.Host.._SharedAssemblies\Jacobi.Vst.Samples.Host.exe"" exited with code 1. Jacobi.Vst.Samples.Host

I don't know if it has something to do with the signing files. Sorry if I'm making silly questions.

Jun 5, 2014 at 6:50 PM
Can't verify this at the moment but I believe the Samples are not signed only the Shared library.

The error you are seeing is about the PostBuild (edit in project properties Build Events), you can search this forum about the PostBuild.
It tries to copy the Sample along with the share libraries in the same destination folder.

It's a standard DOS command so you can put it in a MS-DOS command shell to see what's wrong with it.
Since it's a post-build error, some have suggested removing the post-build copy command.
It can compile so you probably can execute the program at this point, just make sure you have all files together (library + samples).
Jun 5, 2014 at 8:06 PM
It works! Thanks Yury!