annotate README.md @ 208:d85e4b9aeb82

Set *result to note value in xtract_midicent(). Fixes bug.
author Jamie Bullock <jamie@jamiebullock.com>
date Tue, 11 Mar 2014 19:27:30 +0000
parents dc79e53dee51
children 1e76914e8907
rev   line source
jamie@130 1 # LibXtract
jamie@130 2
jamie@190 3 [![Build Status](https://travis-ci.org/jamiebullock/LibXtract.png?branch=master)](https://travis-ci.org/jamiebullock/LibXtract)
jamie@190 4
jamie@130 5 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 6
jamie@130 7 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 8
jamie@136 9 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 10
jamie@130 11 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 12
jamie@130 13 A complete list of features can be found by viewing the header files, or reading the doxygen documentation, available with this package.
jamie@130 14
jamie@132 15 ## Downloading
jamie@132 16
jamie@132 17 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 18
jamie@130 19 ## Dependencies
jamie@130 20
jamie@132 21 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 22
jamie@136 23 If you are compiling LibXtract from a GIT clone, the **autotools** build system is required. This includes:
jamie@132 24
jamie@132 25 automake >= 1.11
jamie@132 26 autoconf >= 2.68
jamie@132 27 libtool >= 2.4
jamie@130 28
jamie@130 29 ## Installation
jamie@130 30
jamie@136 31 If you are installing from a GIT clone, first run:
jamie@132 32
jamie@132 33 sh autogen.sh
jamie@132 34
jamie@132 35 If autogen.sh was successful, or you downloaded the source release, type:
jamie@130 36
jamie@143 37 ./configure --enable-pd_example
jamie@130 38 make
jamie@130 39 sudo make install
jamie@130 40
jamie@130 41 There following configure flags are optional:
jamie@130 42
jamie@130 43 --enable-pd_example (to build the PD example)
jamie@130 44 --enable-simpletest (to build the simpletest example)
jamie@130 45
jamie@132 46 If you wish to build a Universal binary on OS X, you may need to do something like this:
jamie@130 47
jamie@130 48 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 49
jamie@130 50 ## Building the MSP external
jamie@130 51
jamie@130 52 Type:
jamie@130 53
jamie@130 54 cd examples/MSP
jamie@130 55 make
jamie@130 56 sudo make install
jamie@130 57
jamie@130 58 To build for a specific architecture:
jamie@130 59
jamie@130 60 make intel
jamie@130 61 or
jamie@130 62 make ppc
jamie@130 63
jamie@130 64 ## Building the Python bindings
jamie@130 65
jamie@130 66 To build the python bindings, add to your configure flags:
jamie@130 67
jamie@130 68 --enable-swig --with-python
jamie@130 69
jamie@130 70 This requres additional dependencies to be resolved:
jamie@130 71
jamie@130 72 swig >= 1.3
jamie@130 73 python (with development files) >= 2.5
jamie@130 74
jamie@130 75 It might work with earlier versions of Python, but this has not been tested.
jamie@130 76
jamie@130 77 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 78
jamie@130 79 ./configure --your-flags LDFLAGS="-L/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/config/"
jamie@130 80
jamie@130 81 To find your Python library type:
jamie@130 82
jamie@130 83 locate libpython
jamie@130 84
jamie@130 85 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 86 export PYTHONPATH=/usr/local/lib/python2.7/site-packages
jamie@130 87
jamie@130 88
jamie@130 89 ## Building the Java bindings
jamie@130 90
jamie@130 91 To build the java bindings, add to your configure flags:
jamie@130 92
jamie@130 93 --enable-swig --with-java
jamie@130 94
jamie@130 95 This requres additional dependencies to be resolved:
jamie@130 96
jamie@130 97 swig >= 1.3
jamie@130 98 java (with development files) >= 2.0
jamie@130 99
jamie@130 100 It might work with other versions of Java, but this has not been tested.
jamie@130 101
jamie@130 102 On OS X, you will probably need to set your CLASSPATH environment variable before running ./configure
jamie@130 103
jamie@130 104 export CLASSPATH=/System/Library/Frameworks/JavaVM.framework/Classes/classes.jar
jamie@130 105
jamie@130 106 On OS X, you also probably need to tell the configure script where to find your Java (JNI) headers.
jamie@130 107
jamie@130 108 ./configure --flags CFLAGS="-I/System/Library/Frameworks/JavaVM.framework/Headers"
jamie@130 109
jamie@130 110 To find out where your headers are:
jamie@130 111
jamie@130 112 locate jni.h
jamie@130 113
jamie@151 114 ## LicenseĀ 
jamie@151 115
jamie@151 116 Copyright (C) 2012 Jamie Bullock
jamie@151 117
jamie@151 118 Permission is hereby granted, free of charge, to any person obtaining a copy
jamie@151 119 of this software and associated documentation files (the "Software"), to
jamie@151 120 deal in the Software without restriction, including without limitation the
jamie@151 121 rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
jamie@151 122 sell copies of the Software, and to permit persons to whom the Software is
jamie@151 123 furnished to do so, subject to the following conditions:
jamie@151 124
jamie@151 125 The above copyright notice and this permission notice shall be included in
jamie@151 126 all copies or substantial portions of the Software.
jamie@151 127
jamie@151 128 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
jamie@151 129 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
jamie@151 130 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
jamie@151 131 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
jamie@151 132 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
jamie@151 133 FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
jamie@151 134 IN THE SOFTWARE.
jamie@151 135
jamie@151 136