annotate README.md @ 130:b6bf86eafc97

renamed README to README.md
author Jamie Bullock <jamie@postlude.co.uk>
date Thu, 31 May 2012 16:27:57 +0100
parents
children 4b65e92da473
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@130 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@130 13 ## Dependencies
jamie@130 14
jamie@130 15 To compile LibXtract, the following software is also needed:
jamie@130 16
jamie@130 17 automake >= 1.6
jamie@130 18 fftw3 (compiled with floating-point support)
jamie@130 19
jamie@130 20 To build the PD external, the PD header 'm_pd.h' is required
jamie@130 21
jamie@130 22 ## Installation
jamie@130 23
jamie@130 24 Type:
jamie@130 25
jamie@130 26 ./configure --enable-pd_example --enable-fft
jamie@130 27 make
jamie@130 28 sudo make install
jamie@130 29
jamie@130 30 There following configure flags are optional:
jamie@130 31
jamie@130 32 --enable-pd_example (to build the PD example)
jamie@130 33 --enable-fft (to enable functions that require fftw3)
jamie@130 34 --enable-simpletest (to build the simpletest example)
jamie@130 35
jamie@130 36 If you wish to build a Universal binary on OS X:
jamie@130 37
jamie@130 38 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 39
jamie@130 40 ## Building the MSP external
jamie@130 41
jamie@130 42 Type:
jamie@130 43
jamie@130 44 cd examples/MSP
jamie@130 45 make
jamie@130 46 sudo make install
jamie@130 47
jamie@130 48 To build for a specific architecture:
jamie@130 49
jamie@130 50 make intel
jamie@130 51 or
jamie@130 52 make ppc
jamie@130 53
jamie@130 54 ## Building the Python bindings
jamie@130 55
jamie@130 56 To build the python bindings, add to your configure flags:
jamie@130 57
jamie@130 58 --enable-swig --with-python
jamie@130 59
jamie@130 60 This requres additional dependencies to be resolved:
jamie@130 61
jamie@130 62 swig >= 1.3
jamie@130 63 python (with development files) >= 2.5
jamie@130 64
jamie@130 65 It might work with earlier versions of Python, but this has not been tested.
jamie@130 66
jamie@130 67 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 68
jamie@130 69 ./configure --your-flags LDFLAGS="-L/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/config/"
jamie@130 70
jamie@130 71 To find your Python library type:
jamie@130 72
jamie@130 73 locate libpython
jamie@130 74
jamie@130 75 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 76 export PYTHONPATH=/usr/local/lib/python2.7/site-packages
jamie@130 77
jamie@130 78
jamie@130 79 ## Building the Java bindings
jamie@130 80
jamie@130 81 To build the java bindings, add to your configure flags:
jamie@130 82
jamie@130 83 --enable-swig --with-java
jamie@130 84
jamie@130 85 This requres additional dependencies to be resolved:
jamie@130 86
jamie@130 87 swig >= 1.3
jamie@130 88 java (with development files) >= 2.0
jamie@130 89
jamie@130 90 It might work with other versions of Java, but this has not been tested.
jamie@130 91
jamie@130 92 On OS X, you will probably need to set your CLASSPATH environment variable before running ./configure
jamie@130 93
jamie@130 94 export CLASSPATH=/System/Library/Frameworks/JavaVM.framework/Classes/classes.jar
jamie@130 95
jamie@130 96 On OS X, you also probably need to tell the configure script where to find your Java (JNI) headers.
jamie@130 97
jamie@130 98 ./configure --flags CFLAGS="-I/System/Library/Frameworks/JavaVM.framework/Headers"
jamie@130 99
jamie@130 100 To find out where your headers are:
jamie@130 101
jamie@130 102 locate jni.h
jamie@130 103
jamie@130 104 ## Disclaimer
jamie@130 105
jamie@130 106 This program is free software; you can redistribute it and/or modify
jamie@130 107 it under the terms of the GNU General Public License as published by
jamie@130 108 the Free Software Foundation; either version 2 of the License, or
jamie@130 109 (at your option) any later version.
jamie@130 110
jamie@130 111 This program is distributed in the hope that it will be useful,
jamie@130 112 but WITHOUT ANY WARRANTY; without even the implied warranty of
jamie@130 113 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
jamie@130 114 GNU General Public License for more details.
jamie@130 115
jamie@130 116 You should have received a copy of the GNU General Public License
jamie@130 117 along with this program; if not, write to the Free Software
jamie@130 118 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
jamie@130 119 USA.