Plug-ins

These plug-ins are parts of Tritonus that can be used with Sun's J2SDK 1.3 or 1.4 (and perhaps other Java Sound implementations). If you have problems using them, check the section 'If it doesn't work'.

For examples of how to use the decoder/encoder plug-ins, see Dealing with encodings in the Java Sound Examples.

To make the plug-ins below work, you need some base and utility classes. These are packaged in tritonus_share-<version>.jar. Put it into your CLASSPATH, together with the jar files specific for a certain plug-in.

The latest versions of the .jar files require Java 1.5. There are also versions that are 1.4 compatible, but may contain bugs.

Platforms: all
Description: Shared classes required by all other Tritonus plug-ins.
Installation: Put tritonus_share-<version>.jar into your CLASSPATH or extension directory of the JDK.
Download (latest, requires 1.5): tritonus_share-0.3.6.jar (101 kB)
Download (1.4 compatible): tritonus_share.jar (101 kB)

Ogg Vorbis Decoder

Platforms: all
Description: A plug-in for Java that enables decoding of Ogg Vorbis bitstreams. It is based on the pure-java decoder implementation of JCraft. The decoder runs in real-time even on old machines, as long as your Java runtime has a JIT-Compiler (most contemporary have).
Installation: Install Jorbis. To do so, download jorbis-0.0.12.zip, unzip it and put jorbis-0.0.12/player/jogg-0.0.5.jar and jorbis-0.0.12/player/jorbis-0.0.12.jar into your CLASSPATH or extension directory. Then, put tritonus_share.jar (above) and tritonus_jorbis.jar into your CLASSPATH or extension directory of the JDK.
Download (latest, requires 1.5): tritonus_jorbis-0.3.6.jar (12 kB)
Download (1.4 compatible): tritonus_jorbis.jar (12 kB)
Note: For testing, use AudioPlayer and AudioDecoder from the Java Sound Resources.

To learn more about ogg vorbis, visit it's main website.

Date: 2003/02/08

Ogg Vorbis Encoder

Platforms: Binary distribution for Linux i386, other versions can be compiled from the CVS.
Description: A plug-in for Java that enables encoding to Ogg Vorbis bitstreams. It is based on the native vorbis libraries.
Installation: Unzip the distribution. Follow the instruction in the readme file
Download (Linux i386, latest, requires 1.5): tritonus-vorbis-linux-0.3.6.zip (268 kB)
Note: For testing, use AudioEncoder from Java Sound Resources.

To learn more about ogg vorbis, visit it's main website.

Date: 2004/12/26

CDDA extraction (aka reading/grabbing/ripping/extracting digital audio from audio CD)

Platforms: Linux/i386 (PC)
Description: A plug-in for Java that enables you to digitally read audio CD's.
The download package contains the library for Linux/i386, tritonus_cdda.jar, source code, and detailed instructions.
A demo program was presented at the JavaOne 2002 conference: Ripping and Encoding to MP3 with the Java Sound API.
Installation: The included file readme.txt explains how to install the plugin.
Requirements:
  • an installed version of cdparanoia (cdparanoia is included in most Linux distributions). cdparanoia III, version 9.8 is required.
  • tritonus_share.jar from above
Download: tritonus-cdda-linux-2002-03-30.tar.gz (31 kB)
Date:30 March 2002
Note:Currently, ripping is not available for other platforms. Please contact us if you're interested in a port.

mp3 Decoder

Platforms:all
Installation:put tritonus_share.jar (above) and the two .jar files below into your CLASSPATH or extension directory of the JDK.
Download (latest, requires 1.5): javalayer.jar (90 kB) and tritonus_mp3-0.3.6.jar (20 kB)
Download (1.4 compatible): javalayer.jar (90 kB) and tritonus_mp3.jar (20 kB)
Note:these jar files are separated for legal reasons. Putting them together into one is a violation of the GNU General Public License.
Date:25 April 2001

mp3 Encoder

Platforms:Windows 95/98/ME/NT4/2000/XP, Linux/i386 (PC)
Description: A plug-in for Java that enables mp3 encoding with Java Sound.
The download package contains the native libraries for Windows and Linux/i386, detailed instructions, and a test program.
Installation:The included file readme.txt explains how to install the plugin and where to download an encoder.
Requirements:
  • Windows: a bladenc-compatible dll (LAME 3.89beta+ preferred) which you have to download separately. The instructions point you to where you can download it.
  • Linux: LAME in a recent developer version from CVS. The instructions explain how to download and install it.
  • tritonus_share.jar from above (make sure it's the latest version)
  • tritonus_mp3.jar from above (mp3 decoder) (make sure it's the latest version)
Download: tritonus-mp3enc-2001-04-25.zip (51 kB)
Date:25 April 2001
Note:MP3 encoding on other Linux platforms is possible with the latest CVS version of Tritonus.

GSM 06.10 Codec

Platforms:all
Installation: put tritonus_share.jar (above) and tritonus_gsm.jar into your CLASSPATH or the extension directory.
Download (latest, requires 1.5): tritonus_gsm-0.3.6.jar (40 kB)
Download (1.4 compatible): tritonus_gsm.jar (40 kB)
Date:22 April 2001
Note: For examples of using the GSM codec, refer to the Java Sound Resources examples GSMEncoder, AudioDecoder and DecodingAudioPlayer.

Pure-java Sequencer

Platforms:all
Installation: put tritonus_share.jar (above) and tritonus_javasequencer.jar into your CLASSPATH or the extension directory.
Notes: Note that for this sequencer to provide stable timing, three conditions have to be met:
  1. System.currentTimeMillis() has to do what its name says: provide the system time in milliseconds. Some lecacy operating systems (Windows & co.) provide a timer resolution of only 10, 30 or 60 ms. For information on what you can expect on your operating system, see the measurements of YIP Chi Lap [Beta]
  2. A synthesizer or MIDI port implementation that responds immediately. Testing with the synthesizer of the Sun implementation resulted in horrible timing. Timing with the hardware synthesizer of a SB Life!, accessed via ALSA, was very good. Working with WireProvider should be ok, too (assuming you manage to meet the first point)
  3. Small scheduling latencies. On the GNU/Linux system I tested, even heavy file system traffic didn't lead to noticeable effects on the timing. However, usage of the X server almost always led to delays. This is due to the fact that the X server normally runs with very high scheduling priority, stealing other processes CPU time. Moving a window killed the timing. Even a running 'top' was noticeable.
For testing with this sequencer, I recommend to use a recent version of MidiPlayer from the Java Sound Examples. I was using it with command lines like this:
java MidiPlayer -d "ALSA Synthesizer (65:0)" -S "Tritonus Java Sequencer" /var/download/midi/master_and_servant.mid
Download (latest, requires 1.5): tritonus_javasequencer-0.3.6.jar (6 kB)
Download (1.4 compatible): tritonus_javasequencer.jar (6 kB)
Date:02 August 2001

Esd Mixer (EXPERIMENTAL)

Description: An implementation of javax.sound.sampled.Mixer based on libesd. It provides (most of) the capabilities Esound provides to Java Sound. Especially, you can use this mixer to get full-duplex support for Java Sound on Linux.
Platforms: Linux/i386 (PC)
Installation: The included file readme.txt explains how to install the plugin.
Notes: This is an experimental distribution. You may encounter uncommon problems. If the standard measured (see below) do not help, please send a mail to tritonus-devel. If you would like a binary distribution for architecures other than i386, send a mail, too. Perhaps we can help you.
Download: tritonus-esd-linux-x86-2002-10-03.tar.gz (188 kB)
Requirements: Esound (Enlightened Sound Daemon) und its library, libesd.

ALSA Mixer and Sequencer (EXPERIMENTAL)

Description: Implementations of javax.sound.sampled.Mixer and javax.sound.midi.MidiDevice based on ALSA. It provides (most of) the capabilities of ALSA pcm and seq to Java Sound. Especially, you can use this mixer to get full-duplex support and MIDI in/out plus a very stable sequencer for Java Sound on Linux.
Platforms: Linux/i386 (PC)
Installation: The included file readme.txt explains how to install the plugin.
Notes: This is an experimental distribution. You may encounter uncommon problems. If the standard measured (see below) do not help, please send a mail to tritonus-devel. If you would like a binary distribution for architecures other than i386, send a mail, too. Perhaps we can help you.
Download: tritonus-alsa-linux-x86-2002-10-03.tar.gz (188 kB)
Requirements: ALSA (Advanced Linux Sound Architecture), including its user-space library, libasound.

Digital Signal Processing (EXPERIMENTAL)

Description: A collection of classes for digital signal processing (DSP). For an example of how to use it, see AmplitudeConverter in the examples section of the Java Sound Resources. (Note that currently, the example isn't detailled on the web pages and isn't part of the source distribution. You have to access the CVS to get it.)
Platforms: all
Installation: Put tritonus_share.jar (above) and tritonus_dsp.jar into your CLASSPATH or extension directory of the JDK.
Notes: This is an experimental distribution. You may encounter uncommon problems. If the standard measured (see below) do not help, please send a mail to tritonus-devel.
Download (latest, requires 1.5): tritonus_dsp-0.3.6.jar
Download (1.4 compatible): tritonus_dsp.jar
Requirements: None.

AudioOutputStream architecture

Description: An add-on to the Java Sound API. The AudioOutputStream architecture allow writing of audio data to audio files. Supported types are .wav, .aiff and .au. It is an alternative to using AudioSystem.write(). The advantage over AudioSystem.write() is that with the AudioOutputStream architecture, you can code your own main loop writing to the audio file. The AudioOutputStream architecture implements a "push" approach for audio data, while AudioSystem.write() works with a "pull" approach. In many situations, a "push" approach is more flexible. For an example of using the AudioOutputStream architecture, see the examples on Java Sound Resources. There is an examples OscillatorFileAOS using the AudioOutputStream architecture.
Platforms: all
Installation: Put tritonus_share.jar (above) and tritonus_aos.jar into your CLASSPATH or extension directory of the JDK.
Download (latest, requires 1.5): tritonus_aos-0.3.6.jar (10 kB)
Download (1.4 compatible): tritonus_aos.jar (10 kB)
Requirements: None.

Tritonus miscellaneous

Description: Plug-in with several service provider of Tritonus. It contains the PCM2PCM converter, A-law and U-law converters, sample rate converter, ADPCM converters, audio file readers and writers and MIDI file readers and writers. For an example of how to use the sample rate converter, see SampleRateConverter.
Platforms: all
Installation: Put tritonus_share.jar (above) and tritonus_remaining.jar into your CLASSPATH or extension directory of the JDK.
Download (latest, requires 1.5): tritonus_remaining-0.3.6.jar (69 kB)
Download (1.4 compatible): tritonus_remaining.jar (69 kB)
Requirements: None.

If it doesn't work

Most proplems are due to incorrect installation. So the first thing to do is to double-check path names and class path settings.

Then, check your installation. Use the standard programs from the Java Sound Examples: AudioPlayer and MidiPlayer. You can use AudioPlayer -l and MidiPlayer -l to list the available mixers or midi devices. If the desired component does not appear in this list, it is still not installed correctly. So double-check again.

Alternatively, you can use jsinfo to check your installation (for plug-ins that convert audio data, this is the only way). Run the program, chosse the tab 'service providers', then select the kind of service provider. For plug-ins that decode or encode audio data, choose 'FormatConversionProvider'. Now the location of the installed .jar file should show up under 'Configuration Files'. If not ... check your settings.

Note that using the '-jar' option (as in 'java -jar jsinfo.jar') OVERRIDES the user class path. Therefore, the following doesn't work (nor does the equivalent using the CLASSPATH environment variable):

java -cp tritonus_share.jar:tritonus_gsm.jar -jar jsinfo.jar

Now you know the reason why we recommend using the extension class path...

If the installation is ok, but your program doesn't work, use the "reference" programs from the Java Sound Examples:

If these programs work, but your program doesn't, have a close look at your program. You may want to copy programming techniques from the examples.

It is also recommended to have a look at the Tritonus section of the jsresources.org FAQ.

There are some cases where is does make sense to ask for specific help. These include:

In these cases send a mail to tritonus-user. Supply sufficient information so that others can understand or reproduce your problem. In all three cases, try to run the program with the property tritonus.TraceAllExceptions set to true. For instance, use a command line similar to java -Dtritonus.TraceAllExceptions=true MidiPlayer -l. If you see an exception, copy it into the mail.


Last modified: Sun Jul 10 13:54:17 CEST 2005