comparison README @ 75:0f8524203677

* doc updates
author cannam
date Thu, 07 Jun 2007 13:56:26 +0000
parents 9d3272c7db60
children 6bf198e06d72
comparison
equal deleted inserted replaced
74:64d45f526afc 75:0f8524203677
77 plugin's C API back into a Vamp::Plugin object. Hosts should link 77 plugin's C API back into a Vamp::Plugin object. Hosts should link
78 with -lvamp-hostsdk. 78 with -lvamp-hostsdk.
79 79
80 * vamp-sdk/hostext 80 * vamp-sdk/hostext
81 81
82 Additional C++ classes to make a host's life easier. 82 Additional C++ classes to make a host's life easier (introduced in
83 version 1.1 of the Vamp SDK).
83 84
84 Vamp::HostExt::PluginLoader provides a very simple interface for a 85 Vamp::HostExt::PluginLoader provides a very simple interface for a
85 host to discover, load, and find out category information about the 86 host to discover, load, and find out category information about the
86 available plugins. Most "casual" Vamp hosts will probably want to use 87 available plugins. Most "casual" Vamp hosts will probably want to use
87 this class. 88 this class.
93 Vamp::HostExt::PluginChannelAdapter provides a simple means for hosts 94 Vamp::HostExt::PluginChannelAdapter provides a simple means for hosts
94 to use plugins that do not necessarily support the same number of 95 to use plugins that do not necessarily support the same number of
95 audio channels as they have available, without having to apply a 96 audio channels as they have available, without having to apply a
96 channel management / mixdown policy themselves. 97 channel management / mixdown policy themselves.
97 98
98 The PluginLoader can use the input domain and channel adapters 99 The PluginLoader class can also use the input domain and channel
99 automatically to make the entire conversion process transparent to the 100 adapters automatically to make the entire conversion process
100 host if required. 101 transparent to the host if required.
101 102
102 * examples 103 * examples
103 104
104 Example plugins implemented using the C++ classes. ZeroCrossing 105 Example plugins implemented using the C++ classes. ZeroCrossing
105 calculates the positions and density of zero-crossing points in an 106 calculates the positions and density of zero-crossing points in an
115 A simple command-line Vamp host, capable of loading a plugin and using 116 A simple command-line Vamp host, capable of loading a plugin and using
116 it to process a complete audio file, with its default parameters. 117 it to process a complete audio file, with its default parameters.
117 Requires libsndfile (http://www.mega-nerd.com/libsndfile/). 118 Requires libsndfile (http://www.mega-nerd.com/libsndfile/).
118 119
119 If you don't have libsndfile, you may want to edit the Makefile to 120 If you don't have libsndfile, you may want to edit the Makefile to
120 change the default build target from "all" to "sdk" so as to compile 121 change the default build target from "all" to "sdk", so as to compile
121 only the SDK. 122 only the SDK and not the host.
122 123
123 124
124 Plugin Lookup and Categorisation 125 Plugin Lookup and Categorisation
125 ================================ 126 ================================
126 127
127 The Vamp API does not officially specify how to load plugin libraries 128 The Vamp API does not officially specify how to load plugin libraries
128 or where to find them. However, the SDK does include a function 129 or where to find them. However, the SDK does include a function
129 (Vamp::PluginHostAdapter::getPluginPath()) that returns a recommended 130 (Vamp::PluginHostAdapter::getPluginPath()) that returns a recommended
130 directory search path that hosts may use for plugin libraries. 131 directory search path that hosts may use for plugin libraries, and a
131 132 class (Vamp::HostExt::PluginLoader) that implements a sensible
132 Our suggestion for a host is to search each directory in this path for 133 cross-platform lookup policy using this path. We recommend using this
133 .DLL (on Windows), .so (on Linux, Solaris, BSD etc) or .dylib (on 134 class in your host unless you have a good reason not to want to. This
134 OS/X) files, then to load each one and perform a dynamic name lookup 135 implementation also permits the user to set the environment variable
135 on the vampGetPluginDescriptor function to enumerate the plugins in 136 VAMP_PATH to override the default path if desired.
136 the library. The example host has some code that may help, but this 137
137 operation will necessarily be system-dependent. 138 The policy used by Vamp::HostExt::PluginLoader -- and our
139 recommendation for any host -- is to search each directory in the path
140 returned by getPluginPath for .DLL (on Windows), .so (on Linux,
141 Solaris, BSD etc) or .dylib (on OS/X) files, then to load each one and
142 perform a dynamic name lookup on the vampGetPluginDescriptor function
143 to enumerate the plugins in the library. This operation will
144 necessarily be system-dependent.
138 145
139 Vamp also has an informal convention for sorting plugins into 146 Vamp also has an informal convention for sorting plugins into
140 functional categories. In addition to the library file itself, a 147 functional categories. In addition to the library file itself, a
141 plugin library may install a category file with the same name as the 148 plugin library may install a category file with the same name as the
142 library but .cat extension. The existence and format of this file are 149 library but .cat extension. The existence and format of this file are
147 154
148 which a host may read and use to assign plugins a location within a 155 which a host may read and use to assign plugins a location within a
149 category tree for display to the user. The expectation is that 156 category tree for display to the user. The expectation is that
150 advanced users may also choose to set up their own preferred category 157 advanced users may also choose to set up their own preferred category
151 trees, which is why this information is not queried as part of the 158 trees, which is why this information is not queried as part of the
152 Vamp API itself. 159 Vamp plugin's API itself. The Vamp::HostExt::PluginLoader class also
160 provides support for plugin category lookup using this scheme.
153 161
154 162
155 Building and Installing the SDK and Examples 163 Building and Installing the SDK and Examples
156 ============================================ 164 ============================================
157 165