Skip to content

rybandrei2014/TarsosDSP

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TarsosDSP

https://mvnrepository.com/artifact/com.github.dragoon000320/tarsosdsp

Fork of TarsosDSP library provided by JorenSix: https://github.com/JorenSix/TarsosDSP

TarsosDSP is a Java library for audio processing. Its aim is to provide an easy-to-use interface to practical music processing algorithms implemented, as simply as possible, in pure Java and without any other external dependencies. The library tries to hit the sweet spot between being capable enough to get real tasks done but compact and simple enough to serve as a demonstration on how DSP algorithms works. TarsosDSP features an implementation of a percussion onset detector and a number of pitch detection algorithms: YIN, the Mcleod Pitch method and a “Dynamic Wavelet Algorithm Pitch Tracking” algorithm. Also included is a Goertzel DTMF decoding algorithm, a time stretch algorithm (WSOLA), resampling, filters, simple synthesis, some audio effects, and a pitch shifting algorithm.

To show the capabilities of the library, TarsosDSP example applications are available. Head over to the TarsosDSP release directory for freshly baked binaries and code smell free (that is the goal anyway), oven-fresh sources.

Some information about TarsosDSP can be found in the paper TarsosDSP, a Real-Time Audio Processing Framework in Java, by Joren Six, Olmo Cornelis, and Marc Leman, in Proceedings of the 53rd AES Conference (AES 53rd), 2014. If you use TarsosDSP in academic research, please cite this paper.

@inproceedings{six2014tarsosdsp,
  author      = {Joren Six and Olmo Cornelis and Marc Leman},
  title       = {{TarsosDSP, a Real-Time Audio Processing Framework in Java}},
  booktitle   = {{Proceedings of the 53rd AES Conference (AES 53rd)}},
  year        =  2014
}

Quickly Getting Started with TarsosDSP

Head over to the TarsosDSP release repository and download the latest TarsosDSP library. Include the Jar-file in your project and you are ready to go. To get up to speed quickly, check the TarsosDSP Example applications for inspiration and consult the API documentation.

Every release of TarsosDSP contains the following:

  • TarsosDSP-x.x-Documentation/ JavaDoc documentation
  • TarsosDSP-x.x-Examples/ Example applications.
  • TarsosDSP-Android-x.x-bin.jar Jar library for inclusion in Android projects, withouth source files included.
  • TarsosDSP-Android-x.x.jar Jar library for inclusion in Android projects, with source files included.
  • TarsosDSP-x.x-Manual.pdf A manual describing the core concepts of TarsosDSP.
  • TarsosDSP-x.x-Readme.html This readme.
  • TarsosDSP-x.x-bin.jar Jar library for inclusion in Java projects, withouth source files included.
  • TarsosDSP-x.x.jar Jar library for inclusion in Java projects, with source files included.

The source code of TarsosDSP are compatible with Java 1.6. The jar files are compiled for 1.7.

TarsosDSP on Android

If you want to do audio processing on Android TarsosDSP is a great fit. The main distribution has no dependencies on javax.sound.xxx and does work well on Android by default. To add TarsosDSP to an Android Studio project download the latest TarsosDSP Android release and place it in the /app/libs/ folder of your project. By default Gradle includes jar files placed in that directory in your classpath.

To check if this is the case look for the following lines in the build.gradle file in the module app:

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
}

For futher information, please consult TarsosDSP on Android – Audio Processing in Java on Android.

TarsosDSP Example Applications

TarsosDSP contains some ready made example applications. Most have a Java Swing user interface. They show which functionality is present in the library and how to use it.

  • SoundDetector show how you loudness calculations can be done. When input sound is over a defined limit an event is fired.
  • PitchDetector this demo application shows real-time pitch detection. When pitch is detected the hertz value is printed together with a probability.
  • PercussionDetector show the percussion (onset) dectection. Clapping your hands causes an event. This demo application also shows the influence of the two parameters on the algorithm.
  • UtterAsterisk a game with the goal to sing as close to a melody a possible. Technically it shows real-time pitch detection with YIN or MPM.
  • Spectrogram in Java shows a spectrogram and detected pitch, either live or from an audio file. It is interesting to see which frequencies are picked as fundamentals.
  • Goertzel DTMF decoding an implementation of the Goertzel Algorithm. A fancy user interface shows what goes on under the hood.
  • Audio Time Stretching – Implementation in Pure Java Using WSOLA an implementation of a time stretching algorithm. WSOLA makes it possible to change the play back speed of audio without changing the pitch. The play back speed can be changed at any moment, even when there is audio playing.
  • Audio Feature Extraction a command line application to do simple feature extraction.
  • Audio Synthesis a command line application to do simple audio synthesis.
  • Pitch Shifting an example application that does pitch shifting, either in real-time on a microphone input, or on recorded audio. Also included is a command line application to do pitch shifting.

Developing TarsosDSP

If you want to build from source, or want to improve TarsosDSP follow the instructions below. Contributions to TarsosDSP are more than welcome, if you have an algorithm to add or find a bug, do not hesitate to send me a message.

TarsosDSP uses Apache Ant as a build system. The instructions below detail how you can build from source. When everything runs correctly you should be able to run all example applications and have the latest version of the TarsosDSP library for inclusion in your projects. Also the Javadoc documentation for the API should be available.

TarsosDSP with Ant

To you need Apache Ant and git installed on your system. The following commands fetch the source and build the library and example jars:

git clone https://JorenSix@github.com/JorenSix/TarsosDSP.git
cd TarsosDSP
cd build
ant tarsos_dsp_library #Builds the core TarsosDSP library
ant build_examples #Builds all the TarsosDSP examples
ant javadoc #Creates the documentation in TarsosDSP/doc

Source Code Organization & Developing

The library is separated into five source folders: 1) the main core functionality in src/core, TarsosDSP example applications in src/examples, unit tests in src/test, JVM audio I/O in src/jvm and Android audio I/O in src/android.

  • src contains the source files of the DSP library.
    • src/core contains the main core classes.
    • src/test contains unit tests for some of the DSP functionality.
    • src/examples contains a couple of example applications with a Java Swing user interface.
    • src/android contains the source files for audio I/O on Android. It is dependent on the Android Runtime.
    • src/jvm contains the source files for audio I/O on JRE. It is dependent on the Java Runtime Environment.
    • src/patcher I/O for patcher environments like pure data and Max/MSP. It shows how TarsosDSP and pd, MaxMSP can connect.
  • build contains ANT build files. Either to build Java documentation or runnable JAR-files for the example applications.
  • lib although the TarsosDSP core does not require any external dependencies the lib folder does contain two jar-file to easily run unit-tests (JUnit 4 and Hamcrest). It also contains a pure data library when one wants to develop for the pure data environment.

To make development with Eclipse easy, make sure the subfolders of src are marked as “source folder”, and not the src folder itself (as is usually the case). For Android development exclude the jvm folder and include android and link to an Android runtime of your choosing.

Credits

TarsosDSP was developed at University College Ghent, School of Arts between 2009 and 2013, from late 2013 the project is supported by University Ghent, IPEM.

The TarsosDSP borrows algorithms from various other libraries or research paper. Below a complete list of credits can be found.

About

A Real-Time Audio Processing Framework in Java

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Java 99.6%
  • Other 0.4%