Use VST Plugin

Hi,

I’m new with fmod.
I would like to use a VST plugin, How can i integrate it ?
I’ve searched, but i don’t found a lot of information about that.

This plugin is in the .VST and .VST3 format and is to correct the frequency response of my speakers.

I’m not the develloper of the plugin, so i cannot adapt the code to have a .dll plugin (i see with the dev to have a licence to use it in my projet)

Thank you !

Hi Max,

You can load VSTs (not VSTi) into game code by using System::loadPlugin and then System::createDSPByPlugin. Please note that you will need the 32 bit and 64 bit versions if you are building different versions of your game.

https://www.fmod.com/resources/documentation-api?page=content/generated/FMOD_System_LoadPlugin.html

https://www.fmod.com/resources/documentation-api?page=content/generated/FMOD_System_CreateDSPByPlugin.html#/

If you wish to be able to use a VST within FMOD Studio application it will need to be built it in a specific way to work with FMOD Studio and to expose its properties.

https://www.fmod.com/resources/documentation-api?page=content/generated/FMOD_System_CreateDSPByPlugin.html#/

https://www.fmod.com/resources/documentation-studio?page=plugin-reference.html

Thanks,
Richard

Hi Richard,

I didn’t notice it before, but the plugin available in the VST2 directory is a .dll file, and in the VST3 directory is a .vst3 file. (it is the same effect, but in two format, excuse my question, because i’m also new in the vst world…)

Can I use both of them or only the .dll one ?

Other question, i need to be able to use two output at the same time and to be able to change the output (via the command setdriver), what is the best way to do it ?
1 - make an other script that initialize an other instance of FMOD,
2 - or modify the runtimemanager script directly ?

Thank you

Hi Max,

FMOD can only use the .dll and not the .vst3. Please keep in mind results may vary depending on how the VST was built.

In regards to the multiple output: you would actually modify the RuntimeManager script to startup and manage two systems which you will connect to two different drivers. Keep in mind this will load any sample data twice and you’ll need to keep the two systems synchronized manually.

Thanks,
Richard

Hi Richard,

It seems difficult to me to change the runtimemanager to manage two systems. I prefer make a copy of the existing runtimemanager and rename it runtimemanager2.

I also make the same think with differents scripts that use runtimemanager (studiolistener and studioeventemitter)

I can now manage two system in a personal script called outputmanager.
It is working like a charm… I can play to different sounds on two ouputs at the same time.

But…

If i load a scene, the first time, I can play event like it should be… until there no problem !

If i go back to my game menu, and reload the same scene, I have the error saying that the event cannot be found.
I check if the loadbank or unloadbank function in the RuntimeManager are not called twice and it is not the case.

Could you help me for that problem ?

Thanks a lot !!

Max

Hi Max,

Running two RuntimeManagers is something we don’t support. It would require a lot of work to get into a workable state, will have a lot of unexpected behaviour (such as what you’ve seen).

You can take a look at the “multiple_systems” example in our Studio API examples project to see a multi-system in use if that helps.

Thanks,
Richard

Hi Richard,

for information, after i make the change you propose modify only the RuntimeManager to manage two systems, I had the same problem…

I finally found the solution, with my first use of the RuntimeManager and RuntimeManager2. So using two RuntimeManager is possible ! (but you need to modify different stuff for that).

The problem was on my personal script :
I delete this function i wrote before.

//void OnDestroy()
// {
// Debug.LogError (“destroy”);
// for(int i = 0; i< CanalCount; i++) {
// var system = FMODStudioSystems [(Canal)i];
// if (system.isValid ()) {
// system.release ();
// system.clearHandle ();
// }
// }
// }

I didn’t think about that on the first time, because i have in the awake dontdestroyonload(); the object, so i thought the function OnDestroy() was not call.
I seems yes, I’ll check the unity documentation about that.

Thank you for all !

Hi,

I make my app made with unity using the last version of FMOD now. I use FMOD Lowlevel a lot in that app. I’ve made it work with a VST plugin that is an effect VST. There on problem, it seams i can use a stereo version of the VST plugin with no problem.
BUt when i tried to use the multichannel version of the same plugin (7.1) the sound comes from all the speakers when i use the left channel of the plugin. if i activate the other channel in the plugin i don’t have any sound.

The question is then, can i use multi channel vst plugin in FMOD ? or is this limited to stereo (if yes, i’m sure this can be a little change to make)

Can you help me please ?

FMOD’s VST support is quite old, and looks like it is based on VST2.4
From what I can see VST3 introduced multichannel, so it is probably mono or stereo only VST in VST2.4 right now.