dual-sw/
├── src/
│ ├── main/
│ │ ├── cpp/
│ │ │ ├── src/
│ │ │ │ ├── Dual.cpp
│ │ │ ├── compile.sh
│ │ ├── java/
│ │ │ ├── com.caveman.dual
│ │ │ │ ├──DualApplication.java
│ │ ├── resources/
│ │ │ ├── lib/ ### C++ compiled binaries destination folder
│ │ │ ├── logback.xml
├── pom.xml
├── README.md
Prerrequisites:
- C++ compiler (e.g.,
g++
) - Java Development Kit (JDK) 17
- Maven build system
Before building Essentia, install the necessary dependencies:
sudo apt-get update
sudo apt-get install -y build-essential libfftw3-dev libavcodec-dev libavformat-dev libavutil-dev libyaml-dev libtag1-dev
-
Clone Essentia Repository:
git clone https://github.com/MTG/essentia.git cd essentia
-
Configure with waf:
./waf configure --mode=release --build-static --with-python --with-cpptests --with-examples --with-vamp
-
Build Essentia:
./waf
-
Install Essentia:
sudo ./waf install
This installs Essentia into
/usr/local/lib
and/usr/local/include/essentia
. Please make sure this has happened, depending on the Linux distro you have it may happen or not. If not, just move the files to the needed folders.
-
Build the Project: Compile your Java and native code with Maven:
mvn clean install
-
Build classpath: You are gonna have to know where to get the resources when you compile it, to achieve this, run:
mvn dependency:build-classpath -Dmdep.outputFile=classpath.txt
to build your whole classpath for the java project.
-
Run the Java Application: Execute Dual Toolkit:
mvn exec:java # TODO: FIX THIS, NOT WORKING PROPERLY
OR
java -Djava.library.path=src/main/resources/lib -cp target/classes:$(cat classpath.txt) -verbose:class com.caveman.dual.DualApplication