To check out this repository please hg clone the following URL, or open the URL using EasyMercurial or your preferred Mercurial client.

Statistics Download as Zip
| Branch: | Tag: | Revision:

root / README

History | View | Annotate | Download (9.78 KB)

1 14:b63909cbbf57 cannam
2
Vamp
3
====
4
5
An API for audio analysis and feature extraction plugins.
6
7 44:ce61ad9b9159 cannam
   http://www.vamp-plugins.org/
8
9 14:b63909cbbf57 cannam
Vamp is an API for C and C++ plugins that process sampled audio data
10 18:b4043af42278 cannam
to produce descriptive output (measurements or semantic observations).
11 14:b63909cbbf57 cannam
12 539:15a89a89aa9b Chris
This is version 2.10 of the Vamp plugin Software Development Kit.
13 256:3d98dd2ba0d6 cannam
14 78:6bf198e06d72 cannam
Plugins and hosts built with this SDK are binary compatible with those
15 423:8c45dee08a95 Chris
built using any version 2.0 or newer of the SDK.
16
17
Plugins and hosts built with this SDK are binary compatible with those
18 256:3d98dd2ba0d6 cannam
built using version 1.0 of the SDK, with certain restrictions.  See
19
the file README.compat for more details.
20
21
See the file CHANGELOG for a list of the changes in this release.
22 78:6bf198e06d72 cannam
23 215:a5a54b60e82e cannam
A documentation guide to writing plugins using the Vamp SDK can be
24
found at http://www.vamp-plugins.org/guide.pdf .
25
26 239:cc467e52da4c cannam
27
Compiling and Installing the SDK and Examples
28
=============================================
29
30
This SDK is intended for use on Windows, OS/X, Linux, and other POSIX
31
and GNU platforms.
32
33
Please see the platform-specific README file (README.msvc, README.osx,
34
README.linux) in the build/ directory for details about how to compile
35
and install the SDK, how to build plugin libraries using it, and how
36
to install the example plugins so you can use them in a host.
37
38
39
What's In This SDK
40
==================
41
42 78:6bf198e06d72 cannam
This SDK contains the following:
43 14:b63909cbbf57 cannam
44 239:cc467e52da4c cannam
45
vamp/vamp.h
46
-----------
47 14:b63909cbbf57 cannam
48
The formal C language plugin API for Vamp plugins.
49
50
A Vamp plugin is a dynamic library (.so, .dll or .dylib depending on
51
platform) exposing one C-linkage entry point (vampGetPluginDescriptor)
52
which returns data defined in the rest of this C header.
53
54 78:6bf198e06d72 cannam
Although the C API is the official API for Vamp, we don't recommend
55 239:cc467e52da4c cannam
that you program directly to it.  The C++ abstractions found in the
56
vamp-sdk and vamp-hostsdk directories (below) are preferable for most
57
purposes and are more thoroughly documented.
58 14:b63909cbbf57 cannam
59 239:cc467e52da4c cannam
60
vamp-sdk
61
--------
62 14:b63909cbbf57 cannam
63 237:3ad28b1e2150 cannam
C++ classes for implementing Vamp plugins.
64 18:b4043af42278 cannam
65 78:6bf198e06d72 cannam
Plugins should subclass Vamp::Plugin and then use Vamp::PluginAdapter
66
to expose the correct C API for the plugin.  Plugin authors should
67 239:cc467e52da4c cannam
read vamp-sdk/PluginBase.h and Plugin.h for code documentation.
68 18:b4043af42278 cannam
69 239:cc467e52da4c cannam
See "examples" below for details of the example plugins in the SDK,
70
from which you are welcome to take code and inspiration.
71
72
Plugins should link with -lvamp-sdk.
73
74
75
vamp-hostsdk
76
------------
77 14:b63909cbbf57 cannam
78 237:3ad28b1e2150 cannam
C++ classes for implementing Vamp hosts.
79 64:9d3272c7db60 cannam
80 239:cc467e52da4c cannam
Hosts will normally use a Vamp::PluginHostAdapter to convert each
81
plugin's exposed C API back into a useful Vamp::Plugin C++ object.
82 237:3ad28b1e2150 cannam
83
The Vamp::HostExt namespace contains several additional C++ classes to
84 239:cc467e52da4c cannam
do this work for them, and make the host's life easier:
85 64:9d3272c7db60 cannam
86 239:cc467e52da4c cannam
 - Vamp::HostExt::PluginLoader provides a very easy interface for a
87
 host to discover, load, and find out category information about the
88
 available plugins.  Most Vamp hosts will probably want to use this
89
 class.
90 64:9d3272c7db60 cannam
91 239:cc467e52da4c cannam
 - Vamp::HostExt::PluginInputDomainAdapter provides a simple means for
92
 hosts to handle plugins that want frequency-domain input, without
93
 having to convert the input themselves.
94 64:9d3272c7db60 cannam
95 239:cc467e52da4c cannam
 - Vamp::HostExt::PluginChannelAdapter provides a simple means for
96
 hosts to use plugins that do not necessarily support the same number
97
 of audio channels as they have available, without having to apply a
98
 channel management / mixdown policy themselves.
99 64:9d3272c7db60 cannam
100 239:cc467e52da4c cannam
 - Vamp::HostExt::PluginBufferingAdapter provides a means for hosts to
101
 avoid having to negotiate the input step and block size, instead
102
 permitting the host to use any block size they desire (and a step
103
 size equal to it).  This is particularly useful for "streaming" hosts
104
 that cannot seek backwards in the input audio stream and so would
105
 otherwise need to implement an additional buffer to support step
106
 sizes smaller than the block size.
107 125:24859c958732 cannam
108 239:cc467e52da4c cannam
 - Vamp::HostExt::PluginSummarisingAdapter provides summarisation
109
 methods such as mean and median averages of output features, for use
110
 in any context where an available plugin produces individual values
111
 but the result that is actually needed is some sort of aggregate.
112 64:9d3272c7db60 cannam
113 239:cc467e52da4c cannam
The PluginLoader class can also use the input domain, channel, and
114
buffering adapters automatically to make these conversions transparent
115
to the host if required.
116 14:b63909cbbf57 cannam
117 239:cc467e52da4c cannam
Host authors should also refer to the example host code in the host
118
directory of the SDK.
119 14:b63909cbbf57 cannam
120 239:cc467e52da4c cannam
Hosts should link with -lvamp-hostsdk.
121
122
123 397:14b34e85523b Chris
vamp-hostsdk/host-c.h
124
---------------------
125
126
A C-linkage header wrapping the part of the C++ SDK code that handles
127
plugin discovery and library loading. Host programs written in C or in
128
a language with a C-linkage foreign function interface may choose to
129
use this header to discover and load plugin libraries, together with
130
the vamp/vamp.h formal API to interact with plugins themselves. See
131
the header for more documentation.
132
133
134 239:cc467e52da4c cannam
examples
135
--------
136
137
Example plugins implemented using the C++ classes.
138
139
These plugins are intended to be useful examples you can draw code
140
from in order to provide the basic shape and structure of a Vamp
141
plugin.  They are also intended to be correct and useful, if simple.
142
143
 - ZeroCrossing calculates the positions and density of zero-crossing
144
 points in an audio waveform.
145
146
 - SpectralCentroid calculates the centre of gravity of the frequency
147
 domain representation of each block of audio.
148
149 242:7f3a806ed1df cannam
 - PowerSpectrum calculates a power spectrum from the input audio.
150 244:8042ab66f707 cannam
 Actually, it doesn't do any work except calculating power from a
151
 cartesian complex FFT output.  The work of calculating this frequency
152
 domain output is done for it by the host or host SDK; the plugin just
153
 needs to declare that it wants frequency domain input.  This is the
154
 simplest of the example plugins.
155 242:7f3a806ed1df cannam
156 239:cc467e52da4c cannam
 - AmplitudeFollower is a simple implementation of SuperCollider's
157
 amplitude-follower algorithm.
158
159
 - PercussionOnsetDetector estimates the locations of percussive
160
 onsets using a simple method described in "Drum Source Separation
161
 using Percussive Feature Detection and Spectral Modulation" by Dan
162
 Barry, Derry Fitzgerald, Eugene Coyle and Bob Lawlor, ISSC 2005.
163
164
 - FixedTempoEstimator calculates a single beats-per-minute value
165
 which is an estimate of the tempo of a piece of music that is assumed
166
 to be of fixed tempo, using autocorrelation of a frequency domain
167
 energy rise metric.  It has several outputs that return intermediate
168
 results used in the calculation, and may be a useful example of a
169
 plugin having several outputs with varying feature structures.
170
171
172 290:c97e70ed5abc cannam
skeleton
173
--------
174
175
Skeleton code that could be used as a template for your new plugin
176
implementation.
177
178
179 239:cc467e52da4c cannam
host
180
----
181 14:b63909cbbf57 cannam
182 16:61887dda7fe0 cannam
A simple command-line Vamp host, capable of loading a plugin and using
183
it to process a complete audio file, with its default parameters.
184 14:b63909cbbf57 cannam
185 250:a8c8fe602eec cannam
This host also contains a number of options for listing the installed
186
plugins and their properties in various formats.  For that reason, it
187
isn't really as simple as one might hope.  The core of the code is
188
still reasonably straightforward, however.
189
190 40:ae3e47e76d2d cannam
191
Plugin Lookup and Categorisation
192
================================
193
194
The Vamp API does not officially specify how to load plugin libraries
195
or where to find them.  However, the SDK does include a function
196
(Vamp::PluginHostAdapter::getPluginPath()) that returns a recommended
197 75:0f8524203677 cannam
directory search path that hosts may use for plugin libraries, and a
198
class (Vamp::HostExt::PluginLoader) that implements a sensible
199
cross-platform lookup policy using this path.  We recommend using this
200
class in your host unless you have a good reason not to want to.  This
201
implementation also permits the user to set the environment variable
202
VAMP_PATH to override the default path if desired.
203 40:ae3e47e76d2d cannam
204 75:0f8524203677 cannam
The policy used by Vamp::HostExt::PluginLoader -- and our
205
recommendation for any host -- is to search each directory in the path
206
returned by getPluginPath for .DLL (on Windows), .so (on Linux,
207
Solaris, BSD etc) or .dylib (on OS/X) files, then to load each one and
208
perform a dynamic name lookup on the vampGetPluginDescriptor function
209
to enumerate the plugins in the library.  This operation will
210
necessarily be system-dependent.
211 40:ae3e47e76d2d cannam
212
Vamp also has an informal convention for sorting plugins into
213
functional categories.  In addition to the library file itself, a
214
plugin library may install a category file with the same name as the
215
library but .cat extension.  The existence and format of this file are
216
not specified by the Vamp API, but by convention the file may contain
217
lines of the format
218
219
vamp:pluginlibrary:pluginname::General Category > Specific Category
220
221
which a host may read and use to assign plugins a location within a
222
category tree for display to the user.  The expectation is that
223
advanced users may also choose to set up their own preferred category
224
trees, which is why this information is not queried as part of the
225 75:0f8524203677 cannam
Vamp plugin's API itself.  The Vamp::HostExt::PluginLoader class also
226
provides support for plugin category lookup using this scheme.
227 32:13eae6cc6bac cannam
228 14:b63909cbbf57 cannam
229
Licensing
230
=========
231
232 18:b4043af42278 cannam
This plugin SDK is freely redistributable under a "new-style BSD"
233 42:1eb2419fc326 cannam
licence.  See the file COPYING for more details.  In short, you may
234
modify and redistribute the SDK and example plugins within any
235
commercial or non-commercial, proprietary or open-source plugin or
236
application under almost any conditions, with no obligation to provide
237
source code, provided you retain the original copyright note.
238 14:b63909cbbf57 cannam
239
240
See Also
241
========
242
243
Sonic Visualiser, an interactive open-source graphical audio
244
inspection, analysis and visualisation tool supporting Vamp plugins.
245 35:154f86cb8c99 cannam
http://www.sonicvisualiser.org/
246 14:b63909cbbf57 cannam
247
248 44:ce61ad9b9159 cannam
Authors
249
=======
250
251
Vamp and the Vamp SDK were designed and made at the Centre for Digital
252 64:9d3272c7db60 cannam
Music at Queen Mary, University of London.
253 44:ce61ad9b9159 cannam
254 484:ea23f1201155 Chris
The SDK was written by Chris Cannam, copyright (c) 2005-2017
255 64:9d3272c7db60 cannam
Chris Cannam and QMUL.
256
257 447:80b46389aab0 Chris
The SDK incorporates KissFFT code, copyright (c) 2003-2010 Mark
258
Borgerding.
259
260 64:9d3272c7db60 cannam
Mark Sandler and Christian Landone provided ideas and direction, and
261
Mark Levy, Dan Stowell, Martin Gasser and Craig Sapp provided testing
262
and other input for the 1.0 API and SDK.  The API also uses some ideas
263
from prior plugin systems, notably DSSI (http://dssi.sourceforge.net)
264
and FEAPI (http://feapi.sourceforge.net).