Next  |  Prev  |  Top  |  REALSIMPLE Top


Generating a VST Plugin via Faust

This section describes generation of a Windows VST plugin starting from Faust code, again using the constant-peak-gain resonator example.

The VST (Virtual Studio Technology) plugin standard was developed by Steinberg Media Technologies (makers of Cubase). It enjoys wide usage on Windows and Macintosh platforms. The Faust distribution contains the make-file /usr/lib/faust/Makefile.vstcompile for compiling and installing VST plugins using Xcode on a Mac OS-X machine. For our example, however, we'll create a Windows-format VST plugin (.dll file) using Microsoft Visual C++. The example was tested on a Muse Receptor.16

Because the Receptor does not support mono plugins, the process line in the Faust source in Fig.7 was modified as follows to make it stereo-compatible:

  process = + : firpart : + ~ feedback <: (_,_)
This version was named cpgrui_vst.dsp. To generate a VST plugin, we simply use a VST architecture file:
  faust -a vst2p4.cpp cpgrui_vst.dsp -o cpgrui_vst.cpp
Next, the file cpgrui_vst.cpp was copied over to a Windows-XP machine with Microsoft Visual Studio Express installed (including Visual C++ 2008). The programming sample ``again'' from the Steinberg VST-2.4 SDK was copied to an adjacent directory cpgr and trivially modified to create a compilable C++ project. (Specifically, replace again.cpp by cpgrui_vst.cpp, rename again.vcproj to cpgr.vcproj, and change all occurrences of ``again'' to ``cpgrui_vst'' in cpgr.vcproj, and change ``Gain'' to ``CPGR'' to rename the plugin. Finally, double-click on cpgr.vcproj to launch Visual C++ on the cpgr project.) Selecting the menu item ``Build / Build cpgr'' creates cpgr/win/Debug/cpgr.dll (the VST plugin itself). To test the plugin, it was copied into the ``Unsupported Plugins'' folder on the Receptor, and installed by clicking the ``1 installs'' button on the Receptor's Setup page. After that, the plugin could be instantiated on a Receptor ``Mix'' channel, as shown in Fig.13, and Fig.14 shows the automatically generated edit window of the plugin.

Figure 13: Screenshot of the Receptor Remote Control program, showing the ``Mix'' view. The constant-peak-gain resonator (named cpgr) is instantiated as a plugin processing the ``Piano'' source signal.
\resizebox{4.3in}{!}{\includegraphics{\figdir /ReceptorRemoteControl.eps}}

Figure 14: Screenshot of the upper-left corner of the parameter-editing window of the Receptor's remote-control program showing the constant-peak-gain resonator parameters.
\resizebox{3.5in}{!}{\includegraphics{\figdir /ReceptorParamsScreenShot.eps}}



Subsections
Next  |  Prev  |  Top  |  REALSIMPLE Top

Download faust.pdf

``Signal Processing in Faust and PD'', by Julius O. Smith III,
REALSIMPLE Project — work supported by the Wallenberg Global Learning Network .
Released 2010-07-29 under the Creative Commons License (Attribution 2.5), by Julius O. Smith III
Center for Computer Research in Music and Acoustics (CCRMA),   Stanford University
CCRMA