VST Plugins


Introduction

VST (Virtual Studio Technology) is a program that can input midi or audio or both, process it, and output midi or audio or both. The most high-end plugins and DSP processors are distributed as VST plugins. You can think of a VST as a program that accepts data and returns data, modified depending on what the VST does or the parameters you have set. Turbo Play supports both VST 2.x and VST 3.x in both x86 and x64 versions.

A VST has a number of midi input ports, midi output ports, audio input ports and audio output ports. VSTs that input audio and output audio are also known as VST Effects ; VSTs that input midi and output audio are also known as VST Instruments; however Turbo Play does not distinguish between them. For Turbo Play, a VST is just a DLL that has a number of input/output midi/audio ports. A VST has a sample rate and a bit resolution which may be different than the sample rate of your ASIO driver and/or other tracks. Turbo Play automatically converts the data as needed to be processed by the VST.

Turbo Play x64 can load 32-bit VSTs using external hosting, as discussed below.

Because VSTs are applications (and trust me there are very bad VST plugins out there), they might crash TP. TP has a lot of options for you (from a simple exception handling to complete sandbox options) to manipulate the VSTs safely.

In this document you wil llearn about VST Loading, External Hosting, Remote Hosting, Advanced Load Options, VST Editing, VST Sandboxing, VST Learning, VST Freezing, VST Profiling and VST Debugging. VSTs can be also manipulated from Scripts.

Loading a VST

You can load a VST in the following ways:

Using the Ctlr+Shift+L dialog also allows to specify separation features:

If you load a new VST, it will prompt you to choose between a local and a remote vst (for more, see Remote VST Plugins), and choose between the list of known VSTs (From VST Explorer) or from a list of local favorites. A VST can be marked as a favorite in the Device List.

After you have loaded a VST, you can use the Visual Linker to connect it with your other devices.

VSTs in the Device Bay

Loaded VSTs can be configured using the Track Manager's Device Bay. Right cliking on the VST allows you to:

Editing a VST

Most VSTs have an editor which can configure them. For a VST that inputs audio, you usually setup audio effects, and for a VST that inputs midi, you configure the midi channels to load the instruments.
In the device list , double click on a VST to open the VST Editor. Here is the editor for the well known Miroslav Orchestra synthesizer:

If the VST you are editing does not have its own GUI, Turbo Play displays a list with all configurable properties for that VST.

The editor has the following controls:

Most VSTs allow you to save/load some state. This state can be global or partial. The state buttons in the editor allow you to load or save a global or partial state to either a XML file, or to the drop down list in the editor. All these states you will configure are stored in the TP project file.

A VST cas "programs" , which are just places to store various states. The effect above has only one program, when more programs are available, the editor has another drop down list of all the available programs.

You can dynamically change VST states either from this dialog, or from a script. Editing a VST can occur at run time as well.

Note: Not all VSTs allow you to configure their parameters automatically, and not all allow you to save full or partial states. Indeed, some only support editing via their GUI interface. In addition, not all VSTs provide programmable "programs". You can use the "Parameter List" button to see/edit all the programmable parameters.

Reloading

Because VSTs are applications, and because they are loaded in the Turbo Play's context, they have access to it and they can crash or trash TP if they are buggy, and the worst thing is that may happen during a sequence . For this reason, TP provides two mechanisms to protect you from a buggy VST:

Separated thread

This loads the editor in a separated thread. If your VST is buggy or a resource hog and it blocks the processing when manipulating the parameters, try this option. However some VSTs will not like it and therefore you should use this with caution. Normally the VSTs run their own threads to prevent blocking, but in case you encounter something really buggy, try this.

 

Delayed Loading

This loads any VST parameters in a separated thread after the project has opened. This allows a project to open faster and let you work on it while the VST parameters are loaded. Note that as long as any VSTs are loading the parameters, Turbo Play cannot save or discard the project.

 

External Hosting

External hosting is the TP capability of loading a VST outside its own address space. This is mostly useful in 64-bit, but it is also useful when you want to protect TP from a buggy VST that may crash. The TP wrappers are COMVST32.EXE and COMVST64.EXE. For more, see Security and Remote VSTs. The external loader supports both VST 2.x and VST 3.x

You can load a VST as an external process using the devices menu. Your preference to load the VST externally is saved to the TP project file. Trying to load a 32-bit VST from the 64-bit TP causes vst32.exe to take command as well.

Apart from these details, there is no other difference than loading the VST normally.

Note: In Windows Vista and later, Windows do not give maximum (realtime) priority to applications unless they are run with administrative privileges. If you plan to use external VST hosting, you will gain in performance if Turbo Play is run as administrator.

Sandboxing

Enabling this option causes TP to load the VST externally as a "Low Integrity" process (Vista or Windows 7) . That ensures that the vst can *never* harm your system, but some VSTs that like to write wherever they like might not work. Use this to test your own VST's security. For more, see Security.

 

Multicore

VSTs are generally cpu-hungry. Most of your troubles in sequencing will be to find a good way to use as many as VSTs you can without slowing down your PC. TP has a feature, if your CPU supports it, to take advantage of a multicore system and assign VSTs to separated threads, so the processing will be done simultaneously instead of serially.

For more on this feature, see Router.

Note: VSTs can also take advantage of multicore cpus independently. At the time of this writting, there is no such VST known, but later there might be, and there might also be a standard way to identify such a VST. Turbo Play allows you to restrict VST into one thread (using the Affinity option) and so, let the VST itself use threads to enhance its performance.

 

Debugging

Note: The following information is only useful for a VST developer only . if you are not a VST developer, this information will only be useful for educational purposes since the files generated by TP will not have any meaning for you.

At the VST configuration dialog, you can enable VST debugging by pressing the debug icon. From that point on, any exception thrown by the VST (either user or a crash) will be caught by TP and written to a mini dump file, which will be saved to your temp dir (you will get the file name information by a tray message and a beep). TP will not unload or reload the VST, but it will keep saving mini dump files until it saves a maximum number of 10.

Loading these dump files to your debugger will help you detect where the problem might lie.

 

Learning

This feature allows you to press a VST control with your mouse and at the same time move a MIDI slider. These two items are then combined in a controller map automatically.

Note: Not all VSTs allow you to map their controls.

 

Presets

A VST can save its full (global) or partial (state) information in a preset. Turbo Play allows you to save/load presets:

Note that most VSTs do not have 'state' presets. Although you can load a preset at run time using a Script, usually the VST will delay the DSP thread and your entire sequence when doing that.

 

Profiling

Enabling this option causes TP to measure the VST performance in milliseconds in the Effect list. The results are visible in the Profiler.

 

Freezing

A freeszing process means that the audio output of a VST is cached before actually running the sequencer, instead of being calculated at runtime. This, as long as you do not want to change VST parameters at run time, will reduce cpu usage.

Note: At this time, freeze handles are not saved when project is saved.

To manipulate freezing processes, right click the VST at the Device Manager. You can add an unlimited number of freezes and select the freeze you want to be used. TP saves as many audio caches as the number of VST audio outputs for each Freeze preset.

Note: You may change the "current" freeze at runtime, but Turbo Play performs some caching to the loading and it might have some lag when switching freezes. It is recommended to switch a freeze at a time when there is no "output" from the VST.

Note: Do not attempt to freeze a VST that is processed more than once in the same routing loop. For more, see Router and Visual Linker.

 

Remote Hosting

VST Remote Hosting allows a VST to be accessed over TCP/IP to either the same PC running TP or to a remote PC in your LAN. For more, see Remote VST.