How to manage VST effects |
|
Steinberg's Virtual Studio Technology (VST) is an interface for integrating software audio synthesizer and effect plugins with audio editors and hard-disk recording systems. VST and similar technologies use Digital Signal Processing (DSP) to simulate traditional recording studio hardware with software. Thousands of plugins exist and VST is supported by a large number of audio applications. The technology can be licensed from its creator, Steinberg.
Audio Sound Editor API for .NET gives access to VST effects through a set of methods of the EffectsMan class; VST instruments and VST MIDI effects are not currently supported.
VST effects are available inside external dynamic-link library (DLL) files so the first step is to load the VST effect into the control through the Effects.VstLoad method which will receive the filename or the absolute pathname of the external DLL file containing the VST effect and will return a 32 bits unique identifier that will identify the loaded VST effect from now on: calling this method is quite similar to calling the LoadLibrary Windows API.
Once we have successfully loaded the VST effect and obtained its unique identifier, we can gain access to other VST related available features.
• | Generic information about the VST effects can be obtained through the Effects.VstGetInfo and Effects.VstGetInfoString methods. |
• | Available programs implemented inside the VST effect can be enumerated through the Effects.VstProgramsGetCount method and respective programs names can be obtained/modified through the Effects.VstProgramNameGet and Effects.VstProgramNameSet methods. |
• | The current program can be obtained through the Effects.VstProgramGetCurrent method and selected through the Effects.VstProgramSetCurrent method. |
• | For each program there is the possibility to enumerate the number of available parameters through the Effects.VstProgramParamsGetCount method and to obtain generic information for each of them through the Effects.VstProgramParamGetInfo method. |
• | Each parameter has a default value that can be obtained calling the Effects.VstProgramParamGetDefaultValue method. The current value can be obtained through the Effects.VstProgramParamGetValue method and modified through the Effects.VstProgramParamSetValue method. |
• | Most VST effects come with their own user interface, also known as "editor": you can know if a loaded VST effect has its own editor through the Effects.VstEditorGetInfo method. |
• | If an editor is available, you can integrate it and show/hide it on your application's user interface through the Effects.VstEditorShow method and move it through the Effects.VstEditorMove method. |
Once you have modified VST effect's parameters through the embedded editor or through calls to the Effects.VstProgramParamSetValue method, you can apply the VST effect to the sound under editing using the Effects.VstApply method.
Once the VST effect is no more needed, it can be discarded from memory using the Effects.VstFree method.