annotate README.md @ 188:e96b2763bef1

Update gitignore to include python byte code
author Jamie Bullock <jamie@jamiebullock.com>
date Mon, 06 Jan 2014 16:41:42 +0000
parents 38c00d1d5396
children dc79e53dee51
rev   line source
jamie@130 1 # LibXtract
jamie@130 2
jamie@130 3 LibXtract is a simple, portable, lightweight library of audio feature extraction functions. The purpose of the library is to provide a relatively exhaustive set of feature extraction primatives that are designed to be 'cascaded' to create a extraction hierarchies.
jamie@130 4
jamie@130 5 For example, 'variance', 'average deviation', 'skewness' and 'kurtosis', all require the 'mean' of the input vector to be precomputed. However, rather than compute the 'mean' 'inside' each function, it is expected that the 'mean' will be passed in as an argument. This means that if the user wishes to use all of these features, the mean is calculated only once, and then passed to any functions that require it.
jamie@130 6
jamie@136 7 This philosophy of 'cascading' features is followed throughout the library, for example with features that operate on the magnitude spectrum of a signal vector (e.g. 'irregularity'), the magnitude spectrum is not calculated 'inside' the respective function, instead, a pointer to the first element in an array containing the magnitude spectrum is passed in as an argument.
jamie@130 8
jamie@130 9 Hopefully this not only makes the library more efficient when computing large numbers of features, but also makes it more flexible because extraction functions can be combined arbitrarily (one can take the irregularility of the Mel Frequency Cepstral Coefficients for example).
jamie@130 10
jamie@130 11 A complete list of features can be found by viewing the header files, or reading the doxygen documentation, available with this package.
jamie@130 12
jamie@132 13 ## Downloading
jamie@132 14
jamie@132 15 The latest source code release for LibXtract can be downloaded from [https://github.com/jamiebullock/LibXtract/downloads](https://github.com/jamiebullock/LibXtract/downloads).
jamie@132 16
jamie@130 17 ## Dependencies
jamie@130 18
jamie@132 19 To build the PD external, the PD header 'm_pd.h' is required, this can be found in the [Pure Data source code release](http://puredata.info/downloads/pure-data).
jamie@132 20
jamie@136 21 If you are compiling LibXtract from a GIT clone, the **autotools** build system is required. This includes:
jamie@132 22
jamie@132 23 automake >= 1.11
jamie@132 24 autoconf >= 2.68
jamie@132 25 libtool >= 2.4
jamie@130 26
jamie@130 27 ## Installation
jamie@130 28
jamie@136 29 If you are installing from a GIT clone, first run:
jamie@132 30
jamie@132 31 sh autogen.sh
jamie@132 32
jamie@132 33 If autogen.sh was successful, or you downloaded the source release, type:
jamie@130 34
jamie@143 35 ./configure --enable-pd_example
jamie@130 36 make
jamie@130 37 sudo make install
jamie@130 38
jamie@130 39 There following configure flags are optional:
jamie@130 40
jamie@130 41 --enable-pd_example (to build the PD example)
jamie@130 42 --enable-simpletest (to build the simpletest example)
jamie@130 43
jamie@132 44 If you wish to build a Universal binary on OS X, you may need to do something like this:
jamie@130 45
jamie@130 46 CFLAGS="-isysroot /Developer/SDKs/MacOSX10.4u.sdk -Wl,-syslibroot,/Developer/SDKs/MacOSX10.4u.sdk -arch i386 -arch ppc" \./configure --isable-dependency-tracking --your-options
jamie@130 47
jamie@130 48 ## Building the MSP external
jamie@130 49
jamie@130 50 Type:
jamie@130 51
jamie@130 52 cd examples/MSP
jamie@130 53 make
jamie@130 54 sudo make install
jamie@130 55
jamie@130 56 To build for a specific architecture:
jamie@130 57
jamie@130 58 make intel
jamie@130 59 or
jamie@130 60 make ppc
jamie@130 61
jamie@130 62 ## Building the Python bindings
jamie@130 63
jamie@130 64 To build the python bindings, add to your configure flags:
jamie@130 65
jamie@130 66 --enable-swig --with-python
jamie@130 67
jamie@130 68 This requres additional dependencies to be resolved:
jamie@130 69
jamie@130 70 swig >= 1.3
jamie@130 71 python (with development files) >= 2.5
jamie@130 72
jamie@130 73 It might work with earlier versions of Python, but this has not been tested.
jamie@130 74
jamie@130 75 If you do not have the 'standard' version of Python on OS X, you might need to tell the configure script where the python library is e.g.:
jamie@130 76
jamie@130 77 ./configure --your-flags LDFLAGS="-L/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/config/"
jamie@130 78
jamie@130 79 To find your Python library type:
jamie@130 80
jamie@130 81 locate libpython
jamie@130 82
jamie@130 83 NOTE: The python module will get installed under the main install prefix, so if your install prefix is set to /usr/local, then the python module will get installed to /usr/local/lib/python2.5/site-packages/libxtract/xtract. You may need to add this to your PYTHONPATH environment variable. For example in ~/.bash_profile add:
jamie@130 84 export PYTHONPATH=/usr/local/lib/python2.7/site-packages
jamie@130 85
jamie@130 86
jamie@130 87 ## Building the Java bindings
jamie@130 88
jamie@130 89 To build the java bindings, add to your configure flags:
jamie@130 90
jamie@130 91 --enable-swig --with-java
jamie@130 92
jamie@130 93 This requres additional dependencies to be resolved:
jamie@130 94
jamie@130 95 swig >= 1.3
jamie@130 96 java (with development files) >= 2.0
jamie@130 97
jamie@130 98 It might work with other versions of Java, but this has not been tested.
jamie@130 99
jamie@130 100 On OS X, you will probably need to set your CLASSPATH environment variable before running ./configure
jamie@130 101
jamie@130 102 export CLASSPATH=/System/Library/Frameworks/JavaVM.framework/Classes/classes.jar
jamie@130 103
jamie@130 104 On OS X, you also probably need to tell the configure script where to find your Java (JNI) headers.
jamie@130 105
jamie@130 106 ./configure --flags CFLAGS="-I/System/Library/Frameworks/JavaVM.framework/Headers"
jamie@130 107
jamie@130 108 To find out where your headers are:
jamie@130 109
jamie@130 110 locate jni.h
jamie@130 111
jamie@151 112 ## LicenseĀ 
jamie@151 113
jamie@151 114 Copyright (C) 2012 Jamie Bullock
jamie@151 115
jamie@151 116 Permission is hereby granted, free of charge, to any person obtaining a copy
jamie@151 117 of this software and associated documentation files (the "Software"), to
jamie@151 118 deal in the Software without restriction, including without limitation the
jamie@151 119 rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
jamie@151 120 sell copies of the Software, and to permit persons to whom the Software is
jamie@151 121 furnished to do so, subject to the following conditions:
jamie@151 122
jamie@151 123 The above copyright notice and this permission notice shall be included in
jamie@151 124 all copies or substantial portions of the Software.
jamie@151 125
jamie@151 126 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
jamie@151 127 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
jamie@151 128 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
jamie@151 129 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
jamie@151 130 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
jamie@151 131 FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
jamie@151 132 IN THE SOFTWARE.
jamie@151 133
jamie@151 134