Loading VSTs with FMOD_DSP_TYPE_VSTPLUGIN

Hello all,

I’m interested in knowing how I might go about loading VSTs and other various DSP plugins with DSP types lke FMOD_DSP_TYPE_VSTPLUGIN and FMOD_DSP_TYPEWINAMPPLUGIN. Would I call System::loadPlugin() and then create the DSP by type? And if so, what parameters would I set?

That’s right, you would just use System::loadPlugin() like a regular plugin. Take a look at the DSP examples in the API examples VS project for more information on setting it up and setting parameters.

I’m not sure what you mean by “DSP plugin API examples”. Would you mind elaborating? Unless you mean the output_mp3.cpp stuff, and fmod_gain.cpp, fmod_noise.cpp, fmod_distance_filter.cpp, and output_mp3.cpp files under plugins in the lowlevel examples folder?

My mistake, I was thinking of DSPs not plugins. You can read more about loading plugins using this documentation:

https://fmod.com/resources/documentation-api?version=1.10&page=content/generated/overview/plugin_api_dsp.html

OK… so let me write down the steps I believe I need to do to get a VST to work:

  1. call System::loadPlugin() to load the VST as a DLL FMOD plugin.
  2. call System::createDSPByPlugin and pass it the acquired plugin handle
  3. Use it like any other DSP
    Is that right?

That is correct. You do need to make sure your VST format matches your FMOD format (eg. x86 VST must be built with x86 FMOD, etc.).

Wow, I never thought it would be that simple, I thought the process was all drawn out and all that since there’s no documentation in the manual about it. Correct me if I’m wrong but I assume that applies to all other plugin types as well for DSPs? If so, thank you – this just brightened my day and made my life a hole lot easier! :slight_smile:

It’s not a very common function to use since VSTs aren’t very portable.

Can you let me know what you mean by “other plugin types”? Theoretically you could load most plugins but it’s recommended to use FMOD-specific plugins for portability and reliability.