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 @ 539:15a89a89aa9b

History | View | Annotate | Download (9.78 KB)

1

    
2
Vamp
3
====
4

    
5
An API for audio analysis and feature extraction plugins.
6

    
7
   http://www.vamp-plugins.org/
8

    
9
Vamp is an API for C and C++ plugins that process sampled audio data
10
to produce descriptive output (measurements or semantic observations).
11

    
12
This is version 2.10 of the Vamp plugin Software Development Kit.
13

    
14
Plugins and hosts built with this SDK are binary compatible with those
15
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
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

    
23
A documentation guide to writing plugins using the Vamp SDK can be
24
found at http://www.vamp-plugins.org/guide.pdf .
25

    
26

    
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
This SDK contains the following:
43

    
44

    
45
vamp/vamp.h
46
-----------
47

    
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
Although the C API is the official API for Vamp, we don't recommend
55
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

    
59

    
60
vamp-sdk
61
--------
62

    
63
C++ classes for implementing Vamp plugins.
64

    
65
Plugins should subclass Vamp::Plugin and then use Vamp::PluginAdapter
66
to expose the correct C API for the plugin.  Plugin authors should
67
read vamp-sdk/PluginBase.h and Plugin.h for code documentation.
68

    
69
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

    
78
C++ classes for implementing Vamp hosts.
79

    
80
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

    
83
The Vamp::HostExt namespace contains several additional C++ classes to
84
do this work for them, and make the host's life easier:
85

    
86
 - 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

    
91
 - 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

    
95
 - 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

    
100
 - 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

    
108
 - 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

    
113
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

    
117
Host authors should also refer to the example host code in the host
118
directory of the SDK.
119

    
120
Hosts should link with -lvamp-hostsdk.
121

    
122

    
123
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
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
 - PowerSpectrum calculates a power spectrum from the input audio.
150
 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

    
156
 - 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
skeleton
173
--------
174

    
175
Skeleton code that could be used as a template for your new plugin
176
implementation.
177

    
178

    
179
host
180
----
181

    
182
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

    
185
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

    
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
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

    
204
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

    
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
Vamp plugin's API itself.  The Vamp::HostExt::PluginLoader class also
226
provides support for plugin category lookup using this scheme.
227

    
228

    
229
Licensing
230
=========
231

    
232
This plugin SDK is freely redistributable under a "new-style BSD"
233
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

    
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
http://www.sonicvisualiser.org/
246

    
247

    
248
Authors
249
=======
250

    
251
Vamp and the Vamp SDK were designed and made at the Centre for Digital
252
Music at Queen Mary, University of London.
253

    
254
The SDK was written by Chris Cannam, copyright (c) 2005-2017
255
Chris Cannam and QMUL.
256

    
257
The SDK incorporates KissFFT code, copyright (c) 2003-2010 Mark
258
Borgerding.
259

    
260
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).
265