annotate src/vamp-plugin-sdk-2.5/README @ 169:223a55898ab9 tip default

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