Java Audio Tools contains a collection of Java programs for manipulating sampled audio (e.g. WAV files and tones).

The examples use which packages up a wide range of functions for sampled audio, falling into eight broad groups:

  1. playing/looping audio;
  2. loading/saving audio;
  3. recording;
  4. tone generation;
  5. wave functions for generating tones;
  6. audio drawing tools;
  7. audio information;
  8. audio array manipulation;

A lot of is derived from by Robert Sedgewick and Kevin Wayne, and at the Univ. of Montana. Over the years, I've also borrowed code from other sources, including and

Sedgewick and Wayne's clever idea is to manipulate sampled audio using only a 44,100 Hz (CD quality), 16-bit, monaural format, which means that a sample can be stored as an array of doubles. This makes it very easy to apply audio effects, such as volume adjustment, echoing, padding and cutting, and even reversal of the sample. includes several examples:

There's also a JFreeChart-based program called, which can be attached to a play() call, and dynamically draws a time-series chart of the audio. It produces output such as:

[ChartAudio output]

Incidentally, doesn't support MIDI processing, although that is part of Java sound. There's a lot of MIDI examples at, or you could look at Chapter 5 of my book Killer Game Programming in Java.



Dr. Andrew Davison
Back to my home page