Tritonus Developer Information

Tritonus is a clean room open source implementation of the Java Sound 1.0 API for Linux. It is released under the GNU Library General Public License.

Tritonus is far from being complete and perfect. So volunteers are welcome. This page is intended to coordinate the efforts.


Main coordinator:
Matthias Pfisterer
audio file handling and converters:
Florian Bomers
mp3 decoder:
MidiShare implementation:
Stephane Letz

Audio tasks

Audio file support

Currently supported are .au, .aiff and .wav (reading and writing). There is currently some reasoning how data in additional chunks can be reflected on the Java side.

In general, for supporting a new file format in Java Sound, you have to implement the javax.sound.sampled.spi.AudioFileReader interface for reading and the javax.sound.sampled.spi.AudioFileWriter interface for writing. For implementing file readers and writers for Tritonus, use Tritonus source code as a reference, not Sun source code. If you have troubles with buffered vs. unbuffered streams, look at how the javax.sound.sampled.AudioSystem class is implemented in Tritonus or ask Florian.

To use new audio file support, change the files src/packaging/core/META-INF/service/ and rebuild the jar files.

Descriptions of audio file formats:

Audio server support

Unlike the sun implementation of Java Sound, Tritonus does not have its own mixing engine. It generally relies on mixing engines available somewhere in the operating system. This has the advantage of integrating seamlessly into the existing infrastructure

Adding support for a new audio server requires implementing the interfaces Mixer, SourceDataLine, TargetDataLine and Clip plus helper interfaces like MixerProvider and FloatControl. If you want to do this, you might have a look at how the existing implementation (esd and alsa) is organized.

Compression and conversion support

Providing facilities to compress and decompress audio data and to convert between encodings is done by implementing the javax.sound.sampled.spi.FormatConversionProvider.

To use new format converters, change the files in src/packaging/core/META-INF/service/ and rebuild the jar.

Here are some converters/codecs that come to my mind:

MIDI tasks

Main parts of the MIDI support are now implemented based on the ALSA sequencer. An implementation based on MidiShare is under development. See below.

General information on MIDI:

Information about interfaces to sound card drivers:

ALSA is preferrable, as it will be the standard Linux soundcard driver in version 2.5 of the kernel.

Here are the main tasks:

Administrative and misc tasks

Development snapshots

There are daily CVS snapshots.
For anonymous downloading via CVS, use these commands:

cvs login 
  [press enter when prompted for password]
cvs -z3 co tritonus 

Last modified: Thu Dec 18 10:15:02 CET 2003