5 An API for audio analysis and feature extraction plugins.
7 http://www.vamp-plugins.org/
9 Vamp is an API for C and C++ plugins that process sampled audio data
10 to produce descriptive output (measurements or semantic observations).
12 The principal differences between Vamp and a real-time audio
13 processing plugin system such as VST are:
15 * Vamp plugins may output complex multidimensional data with labels.
16 As a consequence, they are likely to work best when the output
17 data has a much lower sampling rate than the input. (This also
18 means it is usually desirable to implement them in C++ using the
19 high-level base class provided rather than use the raw C API.)
21 * While Vamp plugins receive data block-by-block, they are not
22 required to return output immediately on receiving the input.
23 A Vamp plugin may be non-causal, preferring to store up data
24 based on its input until the end of a processing run and then
25 return all results at once.
27 * Vamp plugins have more control over their inputs than a typical
28 real-time processing plugin. For example, they can indicate to
29 the host their preferred processing block and step sizes, and these
32 * Vamp plugins may ask to receive data in the frequency domain
33 instead of the time domain. The host takes the responsibility
34 for converting the input data using an FFT of windowed frames.
35 This simplifies plugins that do straightforward frequency-domain
36 processing and permits the host to cache frequency-domain data
39 * A Vamp plugin is configured once before each processing run, and
40 receives no further parameter changes during use -- unlike real-
41 time plugin APIs in which the input parameters may change at any
42 time. This also means that fundamental properties such as the
43 number of values per output or the preferred processing block
44 size may depend on the input parameters.
46 * Vamp plugins do not have to be able to run in real time.
52 This is version 1.1b of the Vamp plugin Software Development Kit.
53 Plugins and hosts built with this SDK are binary compatible with those
54 built using version 1.0 of the SDK.
56 This SDK contains the following:
60 The formal C language plugin API for Vamp plugins.
62 A Vamp plugin is a dynamic library (.so, .dll or .dylib depending on
63 platform) exposing one C-linkage entry point (vampGetPluginDescriptor)
64 which returns data defined in the rest of this C header.
66 Although the C API is the official API for Vamp, we don't recommend
67 that you program directly to it. The C++ abstraction found in the
68 vamp-sdk directory (below) is preferable for most purposes and is
69 more thoroughly documented.
73 C++ classes for straightforwardly implementing Vamp plugins and hosts.
75 Plugins should subclass Vamp::Plugin and then use Vamp::PluginAdapter
76 to expose the correct C API for the plugin. Plugin authors should
77 read vamp-sdk/PluginBase.h and Plugin.h for code documentation, and
78 refer to the example plugin code in the examples directory. Plugins
79 should link with -lvampsdk. [*NOTE: this has changed from vamp-sdk in
80 previous versions, to avoid conflict with the use of hyphens for
81 library versioning schemes on some platforms.]
83 Hosts may use the Vamp::PluginHostAdapter to convert the loaded
84 plugin's C API back into a Vamp::Plugin object. Host authors should
85 refer to the example host code in the host directory. Hosts should
86 link with -lvamphostsdk. [*NOTE: this has changed from vamp-hostsdk
87 in previous versions, to avoid conflict with the use of hyphens for
88 library versioning schemes on some platforms.]
92 Additional C++ classes to make a host's life easier (introduced in
93 version 1.1 of the Vamp SDK).
95 Vamp::HostExt::PluginLoader provides a very easy interface for a host
96 to discover, load, and find out category information about the
97 available plugins. Most "casual" Vamp hosts will probably want to use
100 Vamp::HostExt::PluginInputDomainAdapter provides a means for hosts to
101 handle plugins that expect frequency-domain input, without having to
102 convert the input themselves.
104 Vamp::HostExt::PluginChannelAdapter provides a means for hosts to use
105 plugins that do not necessarily support the same number of audio
106 channels as they have available, without having to worry about
107 applying a channel management / mixdown policy themselves.
109 The PluginLoader class can also use the input domain and channel
110 adapters automatically to make the entire conversion process
111 transparent to the host if required.
115 Example plugins implemented using the C++ classes. ZeroCrossing
116 calculates the positions and density of zero-crossing points in an
117 audio waveform. SpectralCentroid calculates the centre of gravity of
118 the frequency domain representation of each block of audio.
119 AmplitudeFollower tracks the amplitude of a signal based on a method
120 from the SuperCollider real-time audio system.
121 PercussionOnsetDetector estimates the locations of percussive onsets
122 using a simple method described in "Drum Source Separation using
123 Percussive Feature Detection and Spectral Modulation" by Dan Barry,
124 Derry Fitzgerald, Eugene Coyle and Bob Lawlor, ISSC 2005.
128 A simple command-line Vamp host, capable of loading a plugin and using
129 it to process a complete audio file, with its default parameters.
130 Requires libsndfile (http://www.mega-nerd.com/libsndfile/).
132 If you don't have libsndfile, you may want to edit the Makefile to
133 change the default build target from "all" to "sdk", so as to compile
134 only the SDK and not the host.
137 Plugin Lookup and Categorisation
138 ================================
140 The Vamp API does not officially specify how to load plugin libraries
141 or where to find them. However, the SDK does include a function
142 (Vamp::PluginHostAdapter::getPluginPath()) that returns a recommended
143 directory search path that hosts may use for plugin libraries, and a
144 class (Vamp::HostExt::PluginLoader) that implements a sensible
145 cross-platform lookup policy using this path. We recommend using this
146 class in your host unless you have a good reason not to want to. This
147 implementation also permits the user to set the environment variable
148 VAMP_PATH to override the default path if desired.
150 The policy used by Vamp::HostExt::PluginLoader -- and our
151 recommendation for any host -- is to search each directory in the path
152 returned by getPluginPath for .DLL (on Windows), .so (on Linux,
153 Solaris, BSD etc) or .dylib (on OS/X) files, then to load each one and
154 perform a dynamic name lookup on the vampGetPluginDescriptor function
155 to enumerate the plugins in the library. This operation will
156 necessarily be system-dependent.
158 Vamp also has an informal convention for sorting plugins into
159 functional categories. In addition to the library file itself, a
160 plugin library may install a category file with the same name as the
161 library but .cat extension. The existence and format of this file are
162 not specified by the Vamp API, but by convention the file may contain
165 vamp:pluginlibrary:pluginname::General Category > Specific Category
167 which a host may read and use to assign plugins a location within a
168 category tree for display to the user. The expectation is that
169 advanced users may also choose to set up their own preferred category
170 trees, which is why this information is not queried as part of the
171 Vamp plugin's API itself. The Vamp::HostExt::PluginLoader class also
172 provides support for plugin category lookup using this scheme.
175 Building and Installing the SDK and Examples
176 ============================================
178 To build the SDK, the simple host, and the example plugins, edit the
179 Makefile to suit your platform according to the comments in it, then
182 To use an IDE to build a plugin or host using the Vamp SDK, simply add
183 the .cpp files in the vamp-sdk directory to your project.
185 Installing the example plugins so that they can be found by other Vamp
186 hosts depends on your platform:
188 * Windows: copy the files
189 examples/vamp-example-plugins.dll
190 examples/vamp-example-plugins.cat
192 C:\Program Files\Vamp Plugins
194 * Linux: copy the files
195 examples/vamp-example-plugins.so
196 examples/vamp-example-plugins.cat
200 * OS/X: copy the files
201 examples/vamp-example-plugins.dylib
202 examples/vamp-example-plugins.cat
204 /Library/Audio/Plug-Ins/Vamp
210 This plugin SDK is freely redistributable under a "new-style BSD"
211 licence. See the file COPYING for more details. In short, you may
212 modify and redistribute the SDK and example plugins within any
213 commercial or non-commercial, proprietary or open-source plugin or
214 application under almost any conditions, with no obligation to provide
215 source code, provided you retain the original copyright note.
221 Sonic Visualiser, an interactive open-source graphical audio
222 inspection, analysis and visualisation tool supporting Vamp plugins.
223 http://www.sonicvisualiser.org/
229 Vamp and the Vamp SDK were designed and made at the Centre for Digital
230 Music at Queen Mary, University of London.
232 The SDK was written by Chris Cannam, copyright (c) 2005-2007
233 Chris Cannam and QMUL.
235 Mark Sandler and Christian Landone provided ideas and direction, and
236 Mark Levy, Dan Stowell, Martin Gasser and Craig Sapp provided testing
237 and other input for the 1.0 API and SDK. The API also uses some ideas
238 from prior plugin systems, notably DSSI (http://dssi.sourceforge.net)
239 and FEAPI (http://feapi.sourceforge.net).