comparison src/doc-overview @ 239:cc467e52da4c

* Add platform README files
author cannam
date Mon, 10 Nov 2008 12:39:19 +0000
parents 3451f7dfa2be
children 7f3a806ed1df
comparison
equal deleted inserted replaced
238:4b5a3031cd08 239:cc467e52da4c
24 single dynamic library. See plugins.cpp in the example plugins 24 single dynamic library. See plugins.cpp in the example plugins
25 directory for the sort of code that will need to accompany your plugin 25 directory for the sort of code that will need to accompany your plugin
26 class or classes, to make it possible for a host to look up your 26 class or classes, to make it possible for a host to look up your
27 plugins properly. 27 plugins properly.
28 28
29 You will also need to ensure that the entry point 29 Please read the relevant README file for your platform found in the
30 vampGetPluginDescriptor is properly exported (made public) from your 30 Vamp SDK build/ directory, for details about how to ensure the
31 shared library. The method to do this depends on your linker; for 31 resulting dynamic library exports the correct linker symbols.
32 example, when using the Windows Visual Studio linker, use the linker
33 flag "/EXPORT:vampGetPluginDescriptor". Exported symbols are the
34 default with most other current platforms' linkers.
35 32
36 The following example plugins are provided. You may legally reuse any 33 The following example plugins are provided. You may legally reuse any
37 amount of the code from these examples in any plugins you write, 34 amount of the code from these examples in any plugins you write,
38 whether proprietary or open-source. 35 whether proprietary or open-source.
39 36
49 - PercussionOnsetDetector estimates the locations of percussive 46 - PercussionOnsetDetector estimates the locations of percussive
50 onsets using a simple method described in "Drum Source Separation 47 onsets using a simple method described in "Drum Source Separation
51 using Percussive Feature Detection and Spectral Modulation" by Dan 48 using Percussive Feature Detection and Spectral Modulation" by Dan
52 Barry, Derry Fitzgerald, Eugene Coyle and Bob Lawlor, ISSC 2005. 49 Barry, Derry Fitzgerald, Eugene Coyle and Bob Lawlor, ISSC 2005.
53 50
54 - FixedTempoEstimator calculates a single bpm value which is an 51 - FixedTempoEstimator calculates a single beats-per-minute value
55 estimate of the tempo of a piece of music that is assumed to be of 52 which is an estimate of the tempo of a piece of music that is assumed
56 fixed tempo, using autocorrelation of a frequency domain energy rise 53 to be of fixed tempo, using autocorrelation of a frequency domain
57 metric. It has several outputs that return intermediate results used 54 energy rise metric. It has several outputs that return intermediate
58 in the calculation, and may be a useful example of a plugin having 55 results used in the calculation, and may be a useful example of a
59 several outputs with varying feature structures. 56 plugin having several outputs with varying feature structures.
60 57
61 \section hosts For Hosts 58 \section hosts For Hosts
62 59
63 Hosts will normally use a Vamp::PluginHostAdapter to convert each 60 Hosts will normally use a Vamp::PluginHostAdapter to convert each
64 plugin's exposed C API back into a useful Vamp::Plugin C++ object. 61 plugin's exposed C API back into a useful Vamp::Plugin C++ object.
65 62
66 Starting with version 1.1 of the Vamp SDK, there are several classes 63 The Vamp::HostExt namespace contains several additional C++ classes to
67 in the Vamp::HostExt namespace that aim to make the host's life as 64 do this work for them, and make the host's life easier:
68 easy as possible:
69 65
70 - Vamp::HostExt::PluginLoader provides a very simple interface for a 66 - Vamp::HostExt::PluginLoader provides a very easy interface for a
71 host to discover, load, and find out category information about the 67 host to discover, load, and find out category information about the
72 available plugins. Most "casual" Vamp hosts will probably want to 68 available plugins. Most Vamp hosts will probably want to use this
73 use this class. 69 class.
74 70
75 - Vamp::HostExt::PluginInputDomainAdapter provides a simple means for 71 - Vamp::HostExt::PluginInputDomainAdapter provides a simple means for
76 hosts to handle plugins that expect frequency-domain input, without 72 hosts to handle plugins that want frequency-domain input, without
77 having to convert the input themselves. 73 having to convert the input themselves.
78 74
79 - Vamp::HostExt::PluginChannelAdapter provides a simple means for 75 - Vamp::HostExt::PluginChannelAdapter provides a simple means for
80 hosts to use plugins that do not necessarily support the same number 76 hosts to use plugins that do not necessarily support the same number
81 of audio channels as they have available, without having to apply a 77 of audio channels as they have available, without having to apply a
82 channel management / mixdown policy themselves. 78 channel management / mixdown policy themselves.
83 79
84 - Vamp::HostExt::PluginBufferingAdapter (new in version 1.2) provides 80 - Vamp::HostExt::PluginBufferingAdapter provides a means for hosts to
85 a means for hosts to avoid having to negotiate the input step and 81 avoid having to negotiate the input step and block size, instead
86 block size, instead permitting the host to use any block size they 82 permitting the host to use any block size they desire (and a step
87 desire (and a step size equal to it). This is particularly useful 83 size equal to it). This is particularly useful for "streaming" hosts
88 for "streaming" hosts that cannot seek backwards in the input audio 84 that cannot seek backwards in the input audio stream and so would
89 stream and so would otherwise need to implement an additional buffer 85 otherwise need to implement an additional buffer to support step
90 to support step sizes smaller than the block size. 86 sizes smaller than the block size.
91 87
92 - Vamp::HostExt::PluginSummarisingAdapter (new in version 2.0) 88 - Vamp::HostExt::PluginSummarisingAdapter provides summarisation
93 provides summarisation methods such as mean and median averages of 89 methods such as mean and median averages of output features, for use
94 output features, for use in any context where an available plugin 90 in any context where an available plugin produces individual values
95 produces individual values but the result that is actually needed 91 but the result that is actually needed is some sort of aggregate.
96 is some sort of aggregate.
97 92
98 The PluginLoader class can also use the input domain, channel, and 93 The PluginLoader class can also use the input domain, channel, and
99 buffering adapters automatically to make these conversions transparent 94 buffering adapters automatically to make these conversions transparent
100 to the host if required. 95 to the host if required.
96
97 Host authors should also refer to the example host code in the host
98 directory of the SDK.
101 99
102 Hosts should link with -lvamp-hostsdk. 100 Hosts should link with -lvamp-hostsdk.
103 101
104 (The following notes in this section are mostly relevant for 102 (The following notes in this section are mostly relevant for
105 developers that are not using the HostExt classes, or that wish to 103 developers that are not using the HostExt classes, or that wish to
106 know more about the policy they implement.) 104 know more about the policy they implement.)
107 105
108 The Vamp API does not officially specify how to load plugin libraries 106 The Vamp API does not officially specify how to load plugin libraries
109 or where to find them. However, the SDK does include a function 107 or where to find them. However, the SDK does include a function
110 (Vamp::PluginHostAdapter::getPluginPath()) that returns a recommended 108 (Vamp::PluginHostAdapter::getPluginPath()) that returns a recommended
111 directory search path that hosts may use for plugin libraries. 109 directory search path that hosts may use for plugin libraries, and a
110 class (Vamp::HostExt::PluginLoader) that implements a sensible
111 cross-platform lookup policy using this path. We recommend using this
112 class in your host unless you have a good reason not to want to. This
113 implementation also permits the user to set the environment variable
114 VAMP_PATH to override the default path if desired.
112 115
113 Our suggestion for a host is to search each directory in this path for 116 The policy used by Vamp::HostExt::PluginLoader -- and our
114 .DLL (on Windows), .so (on Linux, Solaris, BSD etc) or .dylib (on 117 recommendation for any host -- is to search each directory in this
115 OS/X) files, then to load each one and perform a dynamic name lookup 118 path for .DLL (on Windows), .so (on Linux, Solaris, BSD etc) or .dylib
116 on the vampGetPluginDescriptor function to enumerate the plugins in 119 (on OS/X) files, then to load each one and perform a dynamic name
117 the library. The example host has some code that may help, but this 120 lookup on the vampGetPluginDescriptor function to enumerate the
118 operation will necessarily be system-dependent. 121 plugins in the library. The example host has some code that may help,
122 but this operation will necessarily be system-dependent.
119 123
120 Vamp also has an informal convention for sorting plugins into 124 Vamp also has an informal convention for sorting plugins into
121 functional categories. In addition to the library file itself, a 125 functional categories. In addition to the library file itself, a
122 plugin library may install a category file with the same name as the 126 plugin library may install a category file with the same name as the
123 library but .cat extension. The existence and format of this file are 127 library but .cat extension. The existence and format of this file are
130 134
131 which a host may read and use to assign plugins a location within a 135 which a host may read and use to assign plugins a location within a
132 category tree for display to the user. The expectation is that 136 category tree for display to the user. The expectation is that
133 advanced users may also choose to set up their own preferred category 137 advanced users may also choose to set up their own preferred category
134 trees, which is why this information is not queried as part of the 138 trees, which is why this information is not queried as part of the
135 Vamp API itself. 139 Vamp plugin's API itself. The Vamp::HostExt::PluginLoader class also
136 140 provides support for plugin category lookup using this scheme.
137 There is an example host in the "host" directory from which code may
138 be drawn.
139 141
140 \section license License 142 \section license License
141 143
142 This plugin SDK is freely redistributable under a "new-style BSD" 144 This plugin SDK is freely redistributable under a "new-style BSD"
143 licence. See the file COPYING for more details. In short, you may 145 licence. See the file COPYING for more details. In short, you may