~ TarsosDSP Release 1.0» By Joren on Tuesday 24 April 2012
After about a year of development and several revisions TarsosDSP has enough features and is stable enough to slap the 1.0 tag onto it. A ‘read me’, manual, API documentation, source and binaries can be found on the TarsosDSP release directory. The source is present in the
What follows below is the information that can be found in the read me file:
TarsosDSP is a collection of classes to do simple audio processing. It features an implementation of a percussion onset detector and two pitch detection algorithms: Yin and the Mcleod Pitch method. Also included is a Goertzel DTMF decoding algorithm and a time stretch algorithm (WSOLA).
Its aim is to provide a simple interface to some audio (signal) processing algorithms implemented in pure JAVA. Some TarsosDSP example applications are available.
The following example filters a band of frequencies of an input file
testFile. It keeps the frequencies form
AudioInputStream inputStream = AudioSystem.getAudioInputStream(testFile); AudioDispatcher dispatcher = new AudioDispatcher(inputStream,stepSize,overlap); dispatcher.addAudioProcessor(new HighPass(startFrequency, sampleRate, overlap)); dispatcher.addAudioProcessor(new LowPassFS(stopFrequency, sampleRate, overlap)); dispatcher.addAudioProcessor(new FloatConverter(format)); dispatcher.addAudioProcessor(new WaveformWriter(format,stepSize, overlap, "filtered.wav")); dispatcher.run();
Quickly Getting Started with TarsosDSP
Head over to the TarsosDSP release repository and download the latest TarsosDSP library. To get up to speed quickly, check the TarsosDSP Example applications for inspiration and consult the API documentation. If you, for some reason, want to build from source, 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/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
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 in TarsosDSP/doc. Drop me a line if you use TarsosDSP in your project. Always nice to hear how this software is used.
Source Code Organization and Examples of TarsosDSP
The source tree is divided in three directories:
srccontains the source files of the core DSP libraries.
testcontains unit tests for some of the DSP functionality.
buildcontains ANT build files. Either to build Java documentation or runnable JAR-files for the example applications.
examplescontains a couple of example applications with a Java Swing user interface:
- 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.