2005.04_Audio Crossover-Playing Vst Audio Plugins in Linux.pdf

(616 KB) Pobierz
Audio Crossover - Playing VST Audio Plugins in Linux - Linux Magazine
Playing VST Audio Plugins in Linux
Audio Crossover
Dave Phillips
Professional digital audio was once the preserve of proprietary systems like Apple Macintosh, but Linux
audio has made great advances. Now you can even tap the vast reserve of VST audio plugins directly from
your Linux studio.
In the world of digital audio software, an add-on component that extends the core programs capabilities is
known as a plugin. A plugin might provide a special effect such as reverb, it might be a MIDI instrument such
as a multitimbral General MIDI synthesizer, or it might be an interface to a MIDI sequencer.
A host application and a potential plugin must agree on how, what, and when they will communicate. If
program and plugin agree upon a standard application programming interface (API), they happily do their
business. An API may be application-specific, such as the plugin APIs for the GIMP and XMMS, or it may be
more generally designed for a variety of applications.
Designing an application that accommodates a standardized plugin interface has much appeal to programmers.
Applications developers can focus on designing more robust and flexible core frameworks and engines, while
plugin developers can focus on the capabilities of their plugins without having to concern themselves with the
problems of fitting into a variety of hosts. Of course, users always benefit from this kind of synergy.
In the Windows and Mac music worlds, the Steinberg VST plugin API has become the most widely accepted
standard interface. Steinbergs VST (Virtual Studio Technology) plugin API was first released during the late
1990s; the current VST2 standard arrived in 1999. Its popularity with developers and users can be gauged by a
simple Google search for VST plugin . As I wrote this article, the search engine reported about 187,000 hits.
Interestingly, a search on free VST plugin resulted in nearly 95,000 hits.
The Linux world has its own audio plugin APIs. (See the box titled LADSPA and other Linux Audio
APIs.) However, despite the success of LADSPA and other native Linux alternatives, the sheer volume of
audio plugins available through the VST API means that Linux users who are interested in audio sometimes
encounter situations when they may really need to run a VST plugin in Linux.
This article shows how to configure your Linux system to support the vast collection of VST audio plugins
originally developed for Windows and Macintosh systems.
VST/VSTi
VST plugins have become expected components in the complete Win/Mac audio studio. Some high-end
plugins are now standard pieces of professional audio production, and the availability of excellent free or
inexpensive plugins brings high-quality (sometimes even pro-quality) audio processing to the desktop
musician and semi-professional studio.
The VSTi plugin API extends the VST plugin definition to allow the plugin to be an instrument (that is, a
synthesizer, sampler, or sequencer). As with the VST API, VSTi plugins have become standard components
of Win/Mac sound and music software. As shown in Figure 1, a typical VSTi instrument is a software
Audio Crossover
1
564427529.008.png 564427529.009.png
synthesizer, playable via MIDI, with realtime parameter control (manual or MIDI), and possibly multichannel
output.
Regarding Pd
Pd (Pure Data) is Miller Puckettes excellent graphic patching language designed for creating arbitrarily
complex audio synthesis and video processing systems. A/V components are connected via virtual wiring to
create a Pd patch, ultimately sending the patch output to your audio and video devices. Linux audio support
includes the ALSA and JACK systems, and 3D graphics are supported by the GEM library.
VST/VSTi support is now common in modern Win/Mac audio software. The number of compliant host
applications is simply too large to list here, and a Google search is again recommended. However, one
addition to this huge list is of special interest to Linux audio people: VST/VSTi plugins can now be used with
Linux sound and music software.
The ability to use VST/VSTi plugins under Linux was first developed by Kjetil Matheussen at NoTAM, a
Norwegian acoustics and music research center. Kjetil's initial endeavors led to his vstserver, the basis for a
client/server architecture for running VST plugins. The vstserver is based upon capabilities of the WINE
library, a part of the ongoing WINE project that aims to create an emulation environment for running
Windows applications under Linux. Kjetil also created two clients for use with the vstserver, an object for
the Pd synthesis/composition environment and a LADSPA plugin that acts as a host for VST plugins.
Recently he has added the vsti client to allow the use of VST instruments (VSTi) plugins. Thus, thanks to the
vstserver, it is now possible to run many VST effects and instrument plugins under Linux.
Figure 1: The Crystal VSTi played from an external keyboard.
Follow these steps to install a vstserver environment on your system :
·
Download, build and install Kjetils latest WINE package, which is available at [3].
·
Download, build and install the latest vstserver , k_vst~ , ladspavst , and vsti packages, which are also at
[3].
·
Set the VST_PATH environment variable, as explained in the vstserver documentation. (The
VST_PATH environment variable tells the server where to find your VST plugins).
·
Start the server from its source directory.
·
Invoke a client. You'll need Pd for k_vst~ and a suitable host (such as Kjetil's great version of the Snd
soundfile editor) for using the LADSPA VST host plugin. The vsti client is a standalone program I'll
describe later.
Each package includes complete details regarding compiling and installing the software. By the way, if you
want to use Kjetils system, you should download and build his modified WINE sources (available from the
vstserver site). The vstserver is critically sensitive about the version of WINE on your system, and other
versions may not work with the server at all.
Audio Crossover
2
564427529.010.png 564427529.011.png 564427529.001.png
Two minor notes: As indicated in the vstserver documentation, Step 2 requires the Steinberg VST SDK
(system development kit). Only two files are needed to build the server, and although the SDK is free, it is not
freely distributable and must be downloaded separately. Also, if your VST path is set correctly but vstserver
refuses to find your plugins, try linking the server and the vstservant.so object to the same directory pointed to
by your VST_PATH setting.
LADSPA
In the early part of the year 2000, developer Richard W. E. Furse proposed a first design for a simple Linux
audio plugin API. His proposal was stimulated and developed by discussions on the Linux Audio Developers
mail list, leading to LADSPA, the Linux Audio Developers Simple Plugin API [1].
It is important to stress the term Simple in LADSPAs name. LADSPA plugins do not strive towards the
same degree of complex interaction with their hosts as youll find in VST plugins. However, simple here
does not equate to feeble, and there are indeed many excellent and powerful LADSPA plugins.
Part of the simplicity of LADSPA is in the way it handles GUI issues: it simply ignores them. The hosts
graphics toolkit must provide a suitable basic widget set, but the plugin widget design is left to the GUI
programmer. Thus, in contrast to the VST world, a LADSPA plugin is likely to look different when run in
different applications, though its use and functions should be the same. By providing no GUI guidelines, the
API also makes it possible to use LADSPA plugins without graphics.
Figure 2: LADSPA plugins listed in Hydrogen.
Another welcome result of LADSPAs simplicity has been its ease of integration into new and existing
applications. The API was quickly adopted by developers, and over the past four years support for LADSPA
has become a matter of course for Linux music and sound tools. The variety of application types that have
adopted the API includes hard-disk recording systems, digital audio processors, audio/MIDI sequencers,
software synthesizers, soundfile editors, and multimedia players.
Realtime response of LADSPA plugins is generally excellent, given the requisite low-latency kernel and
ALSA or JACK system. LADSPA developers have accepted its essential simplicity, and the API itself has
seen few substantial changes since its 1.0 release. One notable extension is support for the Resource
Description Framework (RDF), an excellent mechanism for categorizing a plugin, setting its default values,
and providing additional presets. Figure 2 shows RDF at work with the LADSPA plugin list in the Hydrogen
rhythm programmer.
Audio Crossover
3
564427529.002.png 564427529.003.png
Figure 3: The TAP reverb in Audacity.
If youre using an audio-optimized Linux distribution, LADSPA is already installed and configured for your
system. Mandrake users can find the LADSPA SDK and plugin collections at Thacs site (see Resources).
But fear not, LADSPA holds true to its simplicity even during installation and configuration.
Obtain the source tarball from www.ladspa.org , unpack it in your home directory, and enter your new
ladspa_sdk directory. Read the README, follow its instructions, then enter the src directory. Edit the
makefile, run make to build the SDK, then become root and run make install . Now youre ready to install and
use some LADSPA plugins.
Check out some of the links at http://linux-sound.org/ladspa.html . Youll want to try Steve Harriss
collection, Tom Szilagyis TAP set, Fons Adriaensens excellent filters, the collections by Tim Goetze and
Mike RawesÖ well, just try all of them.
Figure 3 displays the TAP Reverberator opened and applied to a soundfile in the Audacity soundfile editor.
Linux also supports some other audio plugin APIs. David Olofsons Multimedia Applications Integration
Architecture (MAIA) was an attempt to address the shortcomings of LADSPA. It was designed as a general
multiplatform API, with particular emphasis on UNIX systems. Alas, MAIAs API did not find a niche with
developers, and the project has seen little development since early 2001.
The most recent entry in the Linux plugin arena comes from developers Chris Cannam (Rosegarden), Steve
Harris (SWH LADSPA plugins), and Sean Bolton. Their Disposable Soft Synth Interface (DSSI) is a
LADSPA for instruments, as the DSSI Web site states [2]. DSSI is designed to address a variety of
shortcomings in existing Linux softsynth support, especially with regard to MIDI control, and the interface
also provides a bridge for running VSTi plugins. So far, DSSI has been implemented only in the Rosegarden
sequencer, it remains to be seen whether DSSI will find favor with Linux audio software developers. In my
opinion it is a very useful API with much promise, and I urge interested developers to read the RFC (request
for comments) paper at the DSSI Web site.
Figure 4 shows Rosegarden running with an instance of Sean Boltons xsynth, a proof-of-concept DSSI
synthesizer plugin.
Audio Crossover
4
564427529.004.png 564427529.005.png
Figure 4: Rosegardens DSSI at work.
Server and Client
vstserver [3]is designed to listen for input from a client application. As I mentioned in the previous section,
Kjetil created two clients for use with the vstserver:
·
an "object" for the Pd synthesis/composition environment
·
a LADSPA plugin that acts as a host for VST plugins.
Ill describe these vstserver client options in the following sections.
Pd And The k_vst~ Object
Start the server by entering vstserver at an xterm prompt. You will see a brief message indicating that the
server is ready to receive data from clients. If you have the wonderful Pd [8] installed on your system, you can
start it with this command sequence to add the k_vst~ objects capabilities to the program :
pd -lib k_vst~
This command assumes youve opened Pd in your home directory. If you start Pd from a different directory,
include the complete path to the object.
Figure 5 shows a VST effects plugin utilized within a simple Pd patch. The patch routes an audio input
through the k_vst~ object (i.e., the VST plugin) and out through your soundcards audio Out port. You can
operate the VST plugin by controlling the effect parameters by moving sliders, turning knobs, and throwing
switches, just as you would if you were using the plugin under Windows or the Mac.
Details of the illustrated patch can be found in my tutorial at
http://www.djcj.org/LAU/quicktoots/toots/vst-plugins/ . Incidentally, I experienced the best audio response by
setting Pds audio I/O to JACK instead of ALSA. (See the sidebar entitled Regarding Linux Sound
Systems.) If you have trouble with sound breaking up under ALSA while you control your plugins, you
should try using JACK.
The ladspavst Client
Using a LADSPA plugin to run a VST plugin may seem weird, but with Kjetils ladspavst, we have a plugin
acting as a host for other plugins. Ladspavst itself is transparent to the user, but only its functions are
important anyway.
Figure 6 shows the NorthPole filter plugin, called from the LADSPA menu in my personally customized Snd
soundfile editor. As you can see, each VST plugin is listed as VST plugin [plugin_name.dll] available from
Audio Crossover
5
564427529.006.png 564427529.007.png
Zgłoś jeśli naruszono regulamin