annotate README.txt @ 38:21c96f61d10c

Added tag v1.0 for changeset c9515589be7d
author Chris Cannam
date Thu, 22 Nov 2012 17:12:18 +0000
parents c9515589be7d
children c2525dd5e4fa
rev   line source
Chris@32 1
Chris@32 2 jVamp -- a Java host interface for Vamp audio analysis plugins
Chris@32 3 ==============================================================
Chris@32 4
Chris@32 5 Chris Cannam, 2012
Chris@32 6 http://code.soundsoftware.ac.uk/projects/jvamp
Chris@32 7
Chris@32 8 jVamp is a JNI (Java Native Interface) library that permits Java
Chris@32 9 applications to load and use Vamp audio analysis plugins.
Chris@32 10
Chris@35 11 See http://vamp-plugins.org/ for more information about Vamp plugins
Chris@35 12 and for plugin downloads.
Chris@35 13
Chris@35 14 Note that jVamp is intended to be compatible with the Android NDK as
Chris@35 15 well as desktop Java, though it hasn't been tested there (and existing
Chris@35 16 binary distributions of plugins do not usually include ARM builds).
Chris@35 17
Chris@32 18 Vamp plugins are native-code plugins typically written in C++. In
Chris@32 19 order to load them into a Java application, you need a native wrapper
Chris@32 20 library (that is, jVamp) and both the wrapper and the plugin need to
Chris@32 21 be compiled natively for the machine platform you are using.
Chris@32 22
Chris@34 23
Chris@34 24 In this directory
Chris@34 25 -----------------
Chris@34 26
Chris@34 27 org/vamp_plugins -> Java interface for jVamp
Chris@34 28 src/ -> C++ source code for jVamp JNI wrapper
Chris@34 29 host/ -> Simple Vamp host implemented as Java application
Chris@34 30 test/ -> Self-contained basic exercise test
Chris@34 31
Chris@34 32
Chris@34 33 Example
Chris@34 34 -------
Chris@34 35
Chris@34 36 On Linux:
Chris@34 37
Chris@34 38 1. Run "make", to build the Java code (as jvamp.jar) and JNI wrapper
Chris@34 39 (as libvamp-jni.so).
Chris@34 40
Chris@34 41 2. Build the host:
Chris@34 42
Chris@34 43 $ javac -classpath jvamp.jar host/host.java
Chris@34 44
Chris@34 45 3. Pick a Vamp plugin (which must be installed in the Vamp plugin
Chris@34 46 path) and a 16-bit PCM WAV file, and run the host. For example:
Chris@34 47
Chris@34 48 $ java -classpath jvamp.jar:host host vamp-example-plugins:fixedtempo:tempo testfile.wav
Chris@34 49
Chris@34 50 You should see some output -- in the case of the above plugin,
Chris@34 51 it will be one line of the form
Chris@34 52
Chris@34 53 0.002902494, 9.999092970: 142.07474 142.1 bpm
Chris@34 54
Chris@35 55
Chris@35 56 Note that you need the native-code libvamp-jni.so in your Java load
Chris@35 57 path in order to run a host using jVamp, and it must have been built
Chris@35 58 for the proper platform. Bear this in mind when planning to distribute
Chris@35 59 software using jVamp!
Chris@35 60
Chris@35 61
Chris@37 62 License
Chris@37 63 -------
Chris@37 64
Chris@37 65 This code is freely redistributable under a "new-style BSD" licence.
Chris@37 66 See the file COPYING for more details.
Chris@37 67
Chris@37 68
Chris@35 69 Any questions? Contact me at cannam@all-day-breakfast.com.
Chris@35 70