Tags: Code, fft, java, library, processing.org, Sound
Minim, a new sound library by Damien Di Fede was just posted on processing.org. Sound has never been the strongest point of Processing, and with ESS and Sonia already in existence, that makes Minim the third attempt at providing sound functionality. But to be fair it should be said that Java on the whole has never been that good at sound, with Sun notoriously neglecting the media APIs.
Like ESS, Minim is based on the JavaSound API, but at first glance it seems like a more complete solution than either ESS or Sonia. It allows stereo input from either line-in or file (the others only do mono), it has beat detection and there is a class hierarchy for realtime sound synthesis and filtering. And there is more good news for those using Processing in Eclipse or other Java IDEs – Minim comes with full source, released under a GNU license. This should be mandatory for libraries, but sadly isn’t.
I haven’t tested Minim yet, but it certainly seems very promising. For my own purposes (realtime sound responsive visuals), the stereo option as well as the beat detection could come in very handy. I recently created new visual set for a gig at Lovebytes, if I had known about Minim I might have tried it then.
Here is an abridged feature list, taken from the Minim introduction:
- AudioFileIn: Mono and Stereo playback of WAV, AIFF, AU, SND, and MP3 files.
- AudioFileOut: Mono and Stereo audio recording either buffered or direct to disk.
- AudioInput: Mono and Stereo input monitoring.
- AudioOutput: Mono and Stereo sound synthesis.
- AudioSignal: A simple interface for writing your own sound synthesis classes.
- Comes with all the standard waveforms, a pink noise generator and a white noise generator. Additionally, you can extend the Oscillator class for easy implementation of your own periodic waveform.
- AudioEffect: A simple interface for writing your own audio effects.
- Comes with low pass, high pass, band pass, and notch filters. Additionally, you can extend the IIRFilter class for easy implementation of your own IIR filters.
- Easy to attach signals and effects to AudioInputs and AudioOutputs. All the mixing and processing is taken care of for you.
- Provides an FFT class for doing spectrum analysis.
- Provides a BeatDetect class for doing beat detection.
My thanks to Damien Di Fede for contributing what looks like a very useful addition to the Processing arsenal.





Hey, thanks for the mention. When you do get around to trying it out, I’d love to hear any feedback you might have. I’m going to do my best to be as responsive as possible to the community in terms of feature requests and bug fixes.
Hi David, I’ll let you know what I think when I have a chance to try it out. Have you do any benchmarking to compare it to Sonia? Would be interesting to see if there is a speed difference between JSynth’s C++ engine and the Pure Java JavaSound API…
that’s what i’ve been waiting for. beatdetection for dummies, yeah. works great.