annotate README.md @ 136:cd6b321218f2

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