Chris@32: Chris@32: jVamp -- a Java host interface for Vamp audio analysis plugins Chris@32: ============================================================== Chris@32: Chris@32: Chris Cannam, 2012 Chris@32: http://code.soundsoftware.ac.uk/projects/jvamp Chris@32: Chris@32: jVamp is a JNI (Java Native Interface) library that permits Java Chris@32: applications to load and use Vamp audio analysis plugins. Chris@32: Chris@35: See http://vamp-plugins.org/ for more information about Vamp plugins Chris@35: and for plugin downloads. Chris@35: Chris@35: Note that jVamp is intended to be compatible with the Android NDK as Chris@35: well as desktop Java, though it hasn't been tested there (and existing Chris@35: binary distributions of plugins do not usually include ARM builds). Chris@35: Chris@32: Vamp plugins are native-code plugins typically written in C++. In Chris@32: order to load them into a Java application, you need a native wrapper Chris@32: library (that is, jVamp) and both the wrapper and the plugin need to Chris@32: be compiled natively for the machine platform you are using. Chris@32: Chris@34: Chris@34: In this directory Chris@34: ----------------- Chris@34: Chris@34: org/vamp_plugins -> Java interface for jVamp Chris@34: src/ -> C++ source code for jVamp JNI wrapper Chris@34: host/ -> Simple Vamp host implemented as Java application Chris@34: test/ -> Self-contained basic exercise test Chris@34: Chris@34: Chris@34: Example Chris@34: ------- Chris@34: Chris@34: On Linux: Chris@34: Chris@34: 1. Run "make", to build the Java code (as jvamp.jar) and JNI wrapper Chris@34: (as libvamp-jni.so). Chris@34: Chris@34: 2. Build the host: Chris@34: Chris@34: $ javac -classpath jvamp.jar host/host.java Chris@34: Chris@34: 3. Pick a Vamp plugin (which must be installed in the Vamp plugin Chris@34: path) and a 16-bit PCM WAV file, and run the host. For example: Chris@34: Chris@34: $ java -classpath jvamp.jar:host host vamp-example-plugins:fixedtempo:tempo testfile.wav Chris@34: Chris@34: You should see some output -- in the case of the above plugin, Chris@34: it will be one line of the form Chris@34: Chris@34: 0.002902494, 9.999092970: 142.07474 142.1 bpm Chris@34: Chris@35: Chris@35: Note that you need the native-code libvamp-jni.so in your Java load Chris@35: path in order to run a host using jVamp, and it must have been built Chris@35: for the proper platform. Bear this in mind when planning to distribute Chris@35: software using jVamp! Chris@35: Chris@35: Chris@37: License Chris@37: ------- Chris@37: Chris@37: This code is freely redistributable under a "new-style BSD" licence. Chris@37: See the file COPYING for more details. Chris@37: Chris@37: Chris@35: Any questions? Contact me at cannam@all-day-breakfast.com. Chris@35: