Mercurial > hg > vampy
comparison README @ 58:62dcaa5fe6f8 vampy-2.0
Extended README, added .pyo support
author | fazekasgy |
---|---|
date | Sun, 11 Oct 2009 09:57:48 +0000 |
parents | 87b9ea6fc7d0 |
children | 5664fe298af2 |
comparison
equal
deleted
inserted
replaced
57:87b9ea6fc7d0 | 58:62dcaa5fe6f8 |
---|---|
1 | 1 |
2 * VamPy is an API wrapper for Vamp. It allows for writing Vamp | 2 * Vampy is a wrapper for the Vamp audio analysis plugin API. |
3 plugins in Python with or without Numpy support. | 3 (http://www.vamp-plugins.org/) It allows for writing Vamp |
4 plugins in Python. | |
4 | 5 |
5 | 6 |
6 WHAT IS IT FOR? | 7 WHAT IS IT FOR? |
7 | 8 |
8 This wrapper is for writing Vamp plugins in Python which | 9 Vamp is an audio analysis and feature extraction plugin system |
9 can do the same as a native C++ plugin, plus a lot more if | 10 with a C/C++ Application Programming Interface (API). |
10 you're using advanced Python modules such as Numpy and Scipy. | 11 |
11 | 12 Typical applications of Vamp plugins include visualisation, using |
12 This may be an easier way to get into Vamp development. | 13 a host such as Sonic Visualiser (http://www.sonicvisualiser.org/), |
13 You can use it for prototyping your plugin before writing | 14 or batch feature extraction from audio, using Sonic Annotator |
14 it in C++. | 15 (http://www.omras2.org/SonicAnnotator). |
15 | 16 |
17 Vamp plugins are typically written in C++. Although currently | |
18 available plugin hosts are valuable tools in audio research, | |
19 the long and tedious development cycle of plugins does not | |
20 support quick prototyping of feature extraction algorithms. | |
21 Learning the extra skills needed for plugin development or using | |
22 scientific libraries available for C and C++ is often outside | |
23 the interest of audio researches typically using MATLAB or other | |
24 high-level development environments. | |
25 | |
26 This package aims at easing Vamp plugin development, prototyping | |
27 or deployment by using the high-level Python scripting language. | |
28 | |
16 | 29 |
17 WHY PYTHON? | 30 WHY PYTHON? |
18 | 31 |
19 Python is a general purpose high level scripting language. | 32 The Python programming language is rapidly gaining popularity |
20 It is interpreted, so you don't need to compile your plugins. | 33 in the scientific community. Besides being a high-productivity |
21 It has very high level libraries. e.g. you can stream audio | 34 interpreted language, it has extensions for scientific computing |
22 from a Vampy plugin if you want to. | 35 such as Numpy, an efficient numerical library and SciPy, a |
23 Supports functional programming. | 36 collection of Python modules for signal processing, |
37 linear algebra, statistics and machine learning ... | |
38 (www.SciPy.org). These packages together with matplotlib | |
39 (http://matplotlib.sourceforge.net/) provide similar capabilities | |
40 to most commercial modelling environments. As a further advantage, | |
41 Python is a general purpose language which also supports | |
42 the functional programming style. | |
43 | |
44 | |
45 HOW DOES IT WORK? | |
46 | |
47 Vampy acts like a bridge between a Vamp plugin host application | |
48 and Python scripts. It translates host function calls to Python | |
49 interpreter calls and converts Python data types to C++ and Vamp | |
50 defined data structures. | |
51 | |
52 Vampy is distributed and can be installed like any other ordinary | |
53 Vamp plugin. When it is installed, any appropriately structured | |
54 Python script in its script directory will be presented to | |
55 host programs as if they were native Vamp plugins written in C++. | |
56 | |
57 Vampy embeds the Python interpreter dynamically, and also extends | |
58 it with data types defined by the Vamp C++ API, all within a | |
59 single shared library. | |
60 | |
61 | |
62 OBTAINING VAMPY: | |
63 | |
64 Vampy is a free, cross platform, open source package. The source | |
65 code is available from the Vamp-Plugins subversion repository | |
66 on SourceForge. (http://vamp.svn.sourceforge.net/) | |
67 | |
68 * Binary distributions are available for Windows, Mac OS/X, | |
69 Linux and Solaris Unix. | |
70 | |
71 * The source code can be obtained using the SVN command: | |
72 svn co https://vamp.svn.sourceforge.net/svnroot/vamp/vamp-vampy vampy | |
73 | |
74 | |
75 DEPENDENCIES: | |
76 | |
77 * Vampy requires Python 2.5 or greater. | |
78 | |
79 Note that Vampy does not support the new flavour of Python (3.x) | |
80 which breaks language compatibility with the 2.x series. | |
81 | |
82 * Vampy supports Numpy 1.1. or greater. | |
83 | |
84 Using Numpy is optional, however writing plugins in pure Python | |
85 results in significantly longer processing times. | |
86 | |
87 | |
88 BUILDING VAMPY: | |
89 | |
90 It is advised to use a binary distribution if available for | |
91 your platform and Python/Numpy versions before attempting to | |
92 compile it from source. If you decide to do so, please use the | |
93 make files provided. Make sure the correct include locations | |
94 are set for Python, Numpy, and the Vamp plugin SDK. | |
95 | |
96 | |
97 COMPILER OPTIONS: | |
98 | |
99 HAVE_NUMPY : compile with Numpy array interface support | |
100 | |
101 NUMPY_SHORTVERSION : set to the minimum version of Numpy you have, | |
102 as a floating-point value; the default is 1.1, which should be | |
103 OK for using the plugin with Numpy 1.1, 1.2 and 1.3 | |
104 | |
105 simple debugging (for developers): | |
106 _DEBUG : print more detailed messages while Vampy is in use | |
107 _DEBUG_VALUES : print all converted values to stderr | |
24 | 108 |
25 | 109 |
26 UPDATES IN THIS VERSION (Vampy 2.0): | 110 UPDATES IN THIS VERSION (Vampy 2.0): |
27 | 111 |
28 * Two-way Numpy Support | 112 * More complete, two-way Numpy support |
29 * Embedded extension module exposing Vamp defined names | 113 * Embedded extension module exposing Vamp defined names |
30 e.g. ParameterDescriptor. This allows easier porting to C++. | 114 e.g. ParameterDescriptor. This allows easier porting to C++. |
31 * Support RealTime time stamps | 115 * Support RealTime time stamps |
32 * Support byte compiled Python scripts (.pyc) | 116 * Support byte compiled Python scripts (.pyc) |
33 * Environment variables: VAMPY_COMPILED, VAMPY_EXTPATH | 117 * Environment variables |
34 * Flags to control type conversion and error reporting for development | 118 * Flags to control how Vampy works with each plugin |
35 * Flexible type inference to take advantage of Python's loose typing | 119 * Flexible type inference to take advantage of dynamic typing |
36 * Full error checking for all Python/C API calls | 120 * More complete error checking for all Python/C API calls |
37 * Various optimisations and speed-ups | 121 * Various optimisations and speed-ups |
38 | 122 |
39 Vampy now supports two main use cases: | 123 Vampy now supports two main use cases: |
40 1) Prototyping C++ Vamp plugins in Python. | 124 1) Prototyping C++ Vamp plugins in Python. |
41 2) Develop Vampy plugins in Python to allow the use of a vamp | 125 2) Develop Vampy plugins in Python to allow the use of a vamp |
42 hosts for e.g. batch processing or visualisation. | 126 hosts for e.g. batch processing or visualisation. |
43 | 127 |
44 Vampy provides an extension module which allows the use of | 128 Vampy provides an extension module which allows the use of |
45 Vamp data types such as FeatureSet() or RealTime() in Vampy plugins. | 129 data types defined in the Vamp API; such as FeatureSet() or |
46 | 130 RealTime() in Vampy plugins. |
47 | 131 |
48 HOW DOES IT WORK: | 132 |
49 | 133 BACKWARD COMPATIBILITY (Read this if you used Vampy 1): |
50 (1) Make sure you have Python (and Numpy) installed. | 134 |
51 (2) Download Vampy and install it to your Vamp plugin path. | 135 This is the second version of Vampy. It is largely compatible |
52 eg. /Library/Audio/Plug-Ins/Vamp | 136 with the previous version and it is able to run plugins |
53 (3) Write some python plugins and copy them to the same place. | 137 written for it. However, due to some bug fixes in this release, |
54 (4) Each plugin must contain a single class with the same name as your script file. | 138 it may be required to modify old plugins to work correctly |
55 e.g. PyZeroCrossing.py -> calss PyZeroCrossing | 139 with Vampy 2.0: |
56 -Scripts with syntax errors in them are ignored. | 140 |
57 -Scripts not having the same class as the filename are ignored. (Python is case sensitive!) | 141 * The size of the input buffers of frequency domain plugins |
58 -Other unknown scripts may cause a crash. | 142 are now longer by one element corresponding to the Nyquist |
59 (Don't put other python scripts in your Vamp directory.) | 143 frequency output of the FFT. |
60 Some example plugin scripts are provided in "Example VamPy plugins". | 144 |
61 | 145 * The legacy interface now uses complex numbers to pass the |
62 FLAGS : | 146 FFT output to frequency domain plugins in Vampy 2.0 instead |
63 | 147 of floating point values. |
64 You can use some flags to control Vampy. They are: | 148 |
65 | 149 * Consequently, the size of the input buffer for each |
66 vf_NULL : zero value, default for vampy version 1 behaviour | 150 audio channel is blockSize/2 + 1 if the legacy interface |
151 is used and blockSize+2 if the buffer interface is used | |
152 in frequency domain plugins. Time domain plugins however | |
153 do not require any change. | |
154 | |
155 * Vampy 1 had two types of process interfaces; the legacy | |
156 and the buffer interface (for Numpy support). They were | |
157 selected based on the name of the process method. | |
158 A process() implementation used the legacy interface, | |
159 a processN() implementation used the Numpy buffer interface. | |
160 This behaviour is retained for backward compatibility but | |
161 only if no flags are set. The use of processN() is now | |
162 obsolete, since the standard process() implementation can | |
163 be configured to use any of the available interfaces by | |
164 setting the flags appropriately. | |
165 | |
166 | |
167 USING VAMPY: | |
168 | |
169 (1) Make sure you have Python 2.5 or greater installed and you | |
170 have a recent Vamp plugin host application. | |
171 (e.g. Sonic Visualier) | |
172 | |
173 (2) Download a version of Vampy compatible with your | |
174 operating system and Python distribution. | |
175 | |
176 (3) Unzip the package and copy the shared library | |
177 (Windows: vampy.dll, Linux: vampy.so, MacOS: vampy.dylib) | |
178 to your Vamp plugin path. | |
179 | |
180 (4) Copy the example plugins (.py files) from the | |
181 'Example VamPy plugins' directory to the same place. | |
182 (without the example directory itself) | |
183 | |
184 (5) If you are familiar with Python, it is straightforward | |
185 to start writing your own plugins by following these examples. | |
186 | |
187 Note: The interpreter automatically generates a compiled version | |
188 of each plugin when their source file is first imported. This | |
189 file can be distributed alone is so desired. Compiled or compiled | |
190 and optimised versions of a plugin can also be obtained using the | |
191 'py_compile' standard library module. (Note that Python byte | |
192 compiled binaries are easier to reverse than C++ binaries.) | |
193 | |
194 Some familiarity with the Vamp plugin SDK and Vamp Plugin | |
195 documentation is assumed before one would start writing a plugin | |
196 using Vampy. Only the particularities of Vampy plugins are | |
197 covered here. The Vamp plugin documentation is available at: | |
198 * http://www.vamp-plugins.org/code-doc/index.html | |
199 * http://www.vamp-plugins.org/guide.pdf | |
200 | |
201 | |
202 BASIC RULES: | |
203 | |
204 Only the Python scripts that follow some basic rules qualify as | |
205 Vampy plugins: | |
206 | |
207 (1) Each plugin must contain a single class with the | |
208 same name as the script file name. | |
209 | |
210 e.g. PyZeroCrossing.py -> class PyZeroCrossing | |
211 | |
212 (2) Vampy plugins have to be in a specific directory designated | |
213 to Vamp plugins. The exact location is platform specific. | |
214 Additionally, you can use the VAMPY_EXTPATH environment | |
215 variable to specify a separate path for Vampy plugins. | |
216 | |
217 (3) Vampy plugins can be used and distributed as Python scripts | |
218 (.py) or byte compiled Python binaries (.pyc / .pyo). | |
219 | |
220 When a script is present with the same name as a compiled | |
221 file on any of the valid paths, the script will be preferred. | |
222 | |
223 (4) Vampy may decide to reject some scripts after some basic | |
224 validation is performed: | |
225 | |
226 * Scripts with syntax errors in them are ignored. | |
227 | |
228 * Scripts not containing a class with the exact same name | |
229 as the file name are ignored. (Python is case sensitive!) | |
230 | |
231 * Scripts with the wrong number of arguments to the plugin | |
232 class's __init__() function will be avoided. | |
233 | |
234 (5) Unknown scripts may cause undesired behaviour (or a crash). | |
235 Don't put arbitrary Python scripts in your Vamp directory, | |
236 you may use a subdirectory for that. | |
237 | |
238 | |
239 PLUGIN ERRORS: | |
240 | |
241 Script validation is performed by the interpreter itself | |
242 using the same rules as module compilation. This means that | |
243 while most syntax errors will be noted when Vampy is first | |
244 used by a host, runtime errors can still occur during | |
245 execution. For example, a plugin calculating the dot product | |
246 of two vectors with different sizes will produce a runtime error. | |
247 | |
248 Error messages from Vampy are printed on the standard output. | |
249 If you're using a graphical host (such as Sonic Visualiser) | |
250 you may start the application from a command line terminal | |
251 in order to see these messages. | |
252 | |
253 Exceptions: | |
254 | |
255 * Runtime errors occurring in the plugin's __init__() function | |
256 will prevent the host from loading the plugin. | |
257 | |
258 * Runtime errors in the plugin's initialise() function will | |
259 prevent the host from using the plugin. | |
260 | |
261 * Module level errors resulting from importing a non-existent | |
262 module or source file or an error occurring on an imported | |
263 module's source tree will prevent the plugin from loading. | |
264 | |
265 Any other error, including those during the process will | |
266 only be noted on the terminal output. Processing errors will | |
267 generally result in a blank screen or no results displayed by | |
268 graphical hosts. | |
269 | |
270 | |
271 EXTENSION MODULE: | |
272 | |
273 Vampy extends Python with some useful data types defined | |
274 by the Vamp plugin API. This extension module is embedded | |
275 into the Vampy shared library, therefore it doesn't need | |
276 to be installed separately. However, it works very similarly | |
277 to any third party Python extension within a Vampy plugin. | |
278 | |
279 You may import the extension in the usual manner using | |
280 " import vampy " and " from vampy import * ". (Note that | |
281 currently the extension module is not available as a | |
282 separate package, therefore this will only work if the | |
283 plugin is executed by Vampy within a usual host context.) | |
284 | |
285 You can use any standard Python statement involving | |
286 modules such as " dir(vampy) " to print the names exported | |
287 by the module. The use of the extension in entirely optional, | |
288 however its use is strongly advised for the following reasons: | |
289 | |
290 * Using the module hides the mapping between Python and | |
291 C++ data types and provides improved plugin portability. | |
292 | |
293 * Returning types exported by the module is often faster. | |
294 | |
295 * In future releases its use may become mandatory. | |
296 | |
297 | |
298 PROCESS INTERFACES: | |
299 | |
300 Most computationally intensive processing takes place in | |
301 the plugin's process() method. This method has two arguments, | |
302 (besides the 'self' argument mandatory in all Python class methods). | |
303 | |
304 * The fist argument is used to pass audio samples (in time | |
305 domain plugins) or frequency samples (complex FFT output) | |
306 in frequency domain plugins. This argument is always a | |
307 Python list object where each element of the list corresponds | |
308 to an audio channel. (The length of this list can not be zero.) | |
309 The actual element types contained in this list depends | |
310 on the domain type of the plugin (time/frequency domain) and | |
311 the selected process interface. (explained below) | |
312 | |
313 * The second argument is the time stamp of the processing | |
314 block passed to the plugin. This time stamp is either | |
315 a long integer corresponding to a sample number, or a | |
316 RealTime data type exposed by the vampy module. | |
317 The use of the time stamp is different in time and frequency | |
318 domain plugins. Please refer to the Vamp plugin documentation | |
319 for more details. | |
320 | |
321 Vampy supports three interfaces to process() function. | |
322 The interface type can be selected using the flags indicated | |
323 next to the process name below. The detailed use of these | |
324 flags will be explained later. | |
325 | |
326 INTERFACE TYPES: | |
327 | |
328 (1) Legacy interface (default, slowest): | |
329 | |
330 Vampy passes a Python List of List of values to the | |
331 plugin corresponding to each audio channel, and the | |
332 time or frequency domain samples of each channel: | |
333 | |
334 * Audio samples are passed as an N element list | |
335 of floating point values in time domain plugins, | |
336 (where N equals to the block size parameter of the plugin). | |
337 | |
338 * Frequency Domain plugins are passed an N element list | |
339 of complex numbers, where N = (blockSize/2) + 1. This list | |
340 includes the DC and the Nyquist frequency FFT oputputs. | |
341 | |
342 Note: This is the only available interface which can be used | |
343 without Numpy or a compatible numerical library. | |
344 | |
345 (2) Buffer interface (vf_BUFFER, fast): | |
346 | |
347 * Both time and frequency domain plugins are passed a list | |
348 of shared memory buffer objects where each buffer corresponds | |
349 to an audio channel. The length of these buffers is blockSize | |
350 in time domain plugins and blockSize+2 in frequency domain | |
351 plugins. The easiest way to access the data in the buffers | |
352 is the use of Numpy's frombuffer() command. See the Numpy | |
353 documentation or the Vampy example plugins for more details. | |
354 | |
355 Note that this interface is very similar to how the data is | |
356 passed to Vamp plugins in C++. | |
357 | |
358 (3) Numpy Array interface (vf_ARRAY, fast): | |
359 | |
360 Vampy passes a list of Numpy arrays to the process() | |
361 corresponding to each audio channel. | |
362 | |
363 * Time Domain plugins are passed an array of numpy.float32 | |
364 values where the array size is N = blockSize. | |
365 | |
366 * Frequency Domain plugins are passed an array of | |
367 numpy.complex64 values where the size N = (blockSize/2) + 1. | |
368 | |
369 | |
370 RETURNING VALUES: | |
371 | |
372 Python is a dynamically typed language, which means | |
373 that the programmer is not forced to declare variable | |
374 types strictly and specifically, they can be decided | |
375 or changed at runtime. This leads to different programming | |
376 styles compared to using statically typed languages such | |
377 as C++. The Vamp API is declared using C++ and expects | |
378 statically declared types returned by the plugin. | |
379 This leads to difficulties to the Python programmer, and | |
380 requires a detailed knowledge of the API which otherwise | |
381 would be unnecessary. Vampy relaxes this requirement by | |
382 using a runtime type inference mechanism. | |
383 | |
384 Vampy can convert just about any suitable Python data | |
385 object to the appropriate C++ data type expected by a | |
386 Vamp plugin host. This includes Numpy data types such as | |
387 numpy.float32 or a Numpy array. The type conversion is | |
388 dynamic and it is decided based on the plugin context and | |
389 the expected data type defined by the Vamp plugin API | |
390 in that context. This mechanism also takes advantage of the | |
391 higher level Python number, sequence and mapping protocols. | |
392 | |
393 For example if the Vamp API expects a floating point value, | |
394 any returned Python object will be attempted to cast | |
395 to a floating point value first and returned to the host. | |
396 If the value can not be converted, an error message is | |
397 displayed. | |
398 | |
399 Similarly, any returned value will be converted to a vector of | |
400 the appropriate element type when the expected return type is | |
401 a sequence of values. This allows the programmer to omit | |
402 unnecessary conversions, when, for example, a one element | |
403 list (vector) would be returned. | |
404 | |
405 The type conversion can be controlled specifically for | |
406 each plugin. Vampy supports the use case of prototyping | |
407 C++ Vamp plugins in Python by using a more strict type | |
408 conversion mechanism which would issue an error message | |
409 if the Python object does not correspond to a C++ type | |
410 according to a strict one-to-one mapping. This mapping | |
411 can be briefly outlined as follows: | |
412 | |
413 * numerical types require direct correspondence | |
414 between Python and C++ types when available | |
415 e.g. C++ float -> Python float | |
416 | |
417 * Data structures defined in the Vamp Plugin API require | |
418 a type exported be the vampy extension module. | |
419 Vamp::FeatureSet() -> vampy.FeatureSet() | |
420 Vamp::RealTime() -> vampy.RealTime() | |
421 | |
422 The strict type conversion method can be selected using | |
423 the Vampy flag: vf_STRICT (explained in the FLAGS section). | |
424 | |
425 | |
426 TIME STAMPS : | |
427 | |
428 Vamp uses RealTime time stamps to indicate the position of | |
429 a processing block passed to the plugin, or the position of | |
430 any returned features relative to the start of the audio. | |
431 RealTime uses two integer values to represent time values | |
432 to nanosecond precision. Vampy provides a Python compatible | |
433 representation of this this type which can be imported and | |
434 used in any Vampy plugin. | |
435 | |
436 * Vampy RealTime objects can be initialised using integers | |
437 corresponding to second and nanosecond values, or seconds (floats). | |
438 e.g.: | |
439 timestamp1 = RealTime(2,0) | |
440 timestamp2 = RealTime('seconds',2.123) | |
441 | |
442 Please note that only the following methods are available: | |
443 | |
444 * values() : returns a tuple of integers (sec,nsec) | |
445 * toFloat() : return a floating point representation (in seconds) | |
446 * toFrame(samplerate) : convert to frame | |
447 (sample number) given the audio sample rate | |
448 * toString() : human readable string representation | |
449 * a limited set of arithmetic operators (+,-) | |
450 | |
451 Additionally Vampy provides a function to convert frame | |
452 counts (in audio samples) to RealTime: | |
453 | |
454 timestamp = frame2RealTime(frameCount,inputSampleRate) | |
455 | |
456 For the detailed use of time stamps, refer to the Vamp plugin | |
457 documentation. i.e. Section 5, "Sample Types and Timestamps" | |
458 in the Vamp plugin guide, and the Vamp SDK documentation: | |
459 http://vamp-plugins.org/code-doc/classVamp_1_1Plugin.html | |
460 on how time stamps are used in process calls. | |
461 | |
462 Note: The support for RealTime time stamps is new in this | |
463 version of Vampy. Vampy 1 used long integer sample counts | |
464 instead. This is still accepted for backward compatibility, | |
465 but the use of RealTime is encouraged whenever possible. | |
466 By default sample counts are used, please set the falg: | |
467 vf_REALTIME to obtain RealTime time stamps in process calls. | |
468 | |
469 | |
470 VAMPY FLAGS : | |
471 | |
472 The execution of Vampy plugins can be controlled using a set | |
473 of flags. (Each control flag is prefixed by vf_) | |
474 | |
475 vf_NULL : zero value, default for Vampy version 1 behaviour | |
67 vf_DEBUG : print debug messages to standard error | 476 vf_DEBUG : print debug messages to standard error |
68 vf_STRICT : more strict type conversion (follows the C++ API more closely) | 477 vf_STRICT : strict type conversion (follows the C++ API more closely) |
69 vf_QUIT : quit the host process on hard errors | 478 vf_QUIT : quit the host process on hard errors |
70 vf_REALTIME : use RealTime time stamps | 479 vf_REALTIME : use RealTime time stamps |
71 vf_BUFFER : use the Numpy buffer interface to | 480 vf_BUFFER : use the Numpy Buffer interface |
72 pass time/frequency domain samples to the python process | 481 vf_ARRAY : use the numpy Array interface |
73 | |
74 vf_ARRAY : use the numpy Array interface directly | |
75 | |
76 vf_DEFAULT_V2 : default Vampy version 2 behaviour | 482 vf_DEFAULT_V2 : default Vampy version 2 behaviour |
77 (= vf_ARRAY | vf_REALTIME) | 483 (equals to setting: vf_ARRAY | vf_REALTIME) |
78 | 484 |
79 The use of these flags is optional. The default behaviour is | 485 The use of flags is optional. The default behaviour is that |
80 that of Vampy version 1. | 486 of Vampy version 1. |
81 | 487 |
82 To set the flags, place a variable called 'vampy_flags' in | 488 To set the flags, place a variable called 'vampy_flags' in |
83 your plugin class's __init__() function. | 489 your plugin class's __init__() function. |
84 | 490 |
85 Example: | 491 Example: |
95 | 501 |
96 VAMPY_COMPILED=1 recognise byte compiled python plugins (default) | 502 VAMPY_COMPILED=1 recognise byte compiled python plugins (default) |
97 VAMPY_COMPILED=0 ignore them | 503 VAMPY_COMPILED=0 ignore them |
98 | 504 |
99 VAMPY_EXTPATH: if given, searches this path for vampy plugins. | 505 VAMPY_EXTPATH: if given, searches this path for vampy plugins. |
100 (This is useful if you want to keep your python plugins separate.) | 506 This is useful if you want to keep your python plugins |
101 Only a single absolute path name is recognised. | 507 separate. Only a single absolute path name is recognised. |
102 | 508 |
103 Example: | 509 Example: |
104 export VAMPY_EXTPATH="/Users/Shared/Development/vampy-path" | 510 export VAMPY_EXTPATH="/Users/Shared/Development/vampy-path" |
105 | 511 |
106 VAMPY_PYLIB: path to the Python shared library to be preloaded | 512 VAMPY_PYLIB: path to the Python shared library to be preloaded |
107 before scripts are run. The preload is necessary on some | 513 before scripts are run. The preload is necessary on some |
108 systems to support plugins that load additional Python modules. | 514 systems to support plugins that load additional Python modules. |
109 Vampy will attempt to preload the right library by default, but | 515 Vampy will attempt to preload the right library by default, but |
110 it sometimes fails; if so, set this variable to override it. | 516 it sometimes fails; if so, set this variable to override it. |
111 | 517 |
112 | 518 |
113 COMPILING AND LINKING: | 519 HISTORY: |
114 | 520 |
115 Please use the make files provided. | 521 v1: |
116 Make sure the correct include locations are provided for | 522 * added support for Numpy arrays in processN() |
117 Python, Numpy, and the Vamp plugin SDK. | 523 * framecount is now passed also to legacy process() |
118 | 524 and fixed resulting bugs in the PyZeroCrossing plugin |
119 | 525 * added two examples which use Frequency Domain input in processN() |
120 COMPILER OPTIONS: | 526 |
121 | 527 v2.0: |
122 HAVE_NUMPY : compile with Numpy array interface support | 528 * complete rewrite using generic functions for |
123 | 529 implementing full error checking on Python/C API calls |
124 NUMPY_SHORTVERSION : set to the minimum version of Numpy you have, as | 530 * added extension module; |
125 a floating-point value; the default is 1.1, which should be OK for | 531 supports RealTime and other Vamp type wrappers |
126 use with Numpy 1.1, 1.2 and 1.3 | 532 enables a much more readable syntax |
127 | 533 * added Numpy Array interface |
128 for developers: | 534 * added flags |
129 _DEBUG : print very detailed messages and logs while Vampy is in use | 535 * added environment variables |
130 _DEBUG_VALUES : print all converted values to stderr | 536 * recognise byte compiled python scripts |
131 | 537 * new example plugin PyMFCC |
132 | 538 * modified all examples for the new syntax |
539 * bug fix: Nyquist frequency FFT output is now passed correctly | |
540 | |
541 | |
133 TODO: | 542 TODO: |
134 * Vamp 'programs' not implemented | 543 * Vamp 'programs' not implemented |
135 * support multiple classes per script in scanner | 544 * support multiple classes per script in scanner |
136 | 545 * implement missing methods of vampy.RealTime type |
137 | 546 |
138 HISTORY: | |
139 | |
140 v1: | |
141 * added support for Numpy arrays in processN() | |
142 * framecount is now passed also to legacy process() and fixed resulting bugs in the PyZeroCrossing plugin | |
143 * added two examples which use Frequency Domain input in processN() | |
144 | |
145 v2.0: | |
146 * complete rewrite (using generic functions implementing full error checking) | |
147 * added extension module : support RealTime and other Vamp type wrappers | |
148 * added Numpy Array interface | |
149 * added flags | |
150 * added environment variables | |
151 * recognise byte compiled python scripts | |
152 | 547 |
153 LICENCE: | 548 LICENCE: |
154 | 549 |
155 VamPy is distributed under a "new-style BSD" license; see the | 550 VamPy is distributed under a "new-style BSD" license; see the |
156 file COPYING for details. You may modify and redistribute it | 551 file COPYING for details. You may modify and redistribute it |