annotate README.md @ 143:09599ca5a02a

removed references to FFTW
author Jamie Bullock <jamie@jamiebullock.com>
date Mon, 07 Jan 2013 18:14:34 +0000
parents cd6b321218f2
children 38c00d1d5396
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@130 112 ## Disclaimer
jamie@130 113
jamie@130 114 This program is free software; you can redistribute it and/or modify
jamie@130 115 it under the terms of the GNU General Public License as published by
jamie@130 116 the Free Software Foundation; either version 2 of the License, or
jamie@130 117 (at your option) any later version.
jamie@130 118
jamie@130 119 This program is distributed in the hope that it will be useful,
jamie@130 120 but WITHOUT ANY WARRANTY; without even the implied warranty of
jamie@130 121 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
jamie@130 122 GNU General Public License for more details.
jamie@130 123
jamie@130 124 You should have received a copy of the GNU General Public License
jamie@130 125 along with this program; if not, write to the Free Software
jamie@130 126 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
jamie@130 127 USA.