Java Sound & Music Software for Linux, Part 2

In this second part of my survey I list and briefly describe some of the Java sound and music applications known to work under Linux. Java applications show up in almost every category found at linux-sound.org and the Applications Database at linuxaudio.org. The scalability of the language is well-demonstrated throughout those pages where one can find everything from highly specialized mini-applications to full-size production environments. Of course I can't cover or even present the entire range of Java soundapps, but this survey should give readers a good idea of Java's potential in the sound and music software domain. Again the presentation is in no special order.

Getting It Started

First, a quick note regarding the installation and configuration of Java applications. Some programs include their own installer, but others will require manual installation. Have no fear, a manual install typically amounts to copying one or a few jar files to your $JAVA_HOME/jre/lib/ext/ directory. Required shared libraries (libfoo.so) are placed in the $JAVA_HOME/jre/lib/i386/ directory. Always read the installation instructions for Java applications for the complete procedure.

Java programs are in two typical forms, either as an executable class file (foo.class) or as a jar file (foo.jar). The execution is slightly different for each file type: A class file is run with java foo (without the .class extension), a jar file is run with java -jar foo.jar (with the extension). Again, see the package README and other instructions for specific details of configuring and running a Java application.

Csound Helpers

Although Csound is a complete environment for music and sound production its full powers have been reserved typically for those users patient enough to master a text-based programming language. Many attempts have been made to present Csound in a well-organized graphic interface but none have achieved the comprehensive capabilities of Steven Yi's blue, an IDE for the design of Csound instruments and the composition of Csound scores. blue abounds in sweet features, including its own graphics widgets for building synthesizer interfaces, facilities for working with Csound's Python interface, an implementation of the Cmask software for algorithmic music composition, and many other amenities. A screenshot of blue can be seen in the first part of this survey.

Figure 1: FJenie


FJenie is a GUI for the design of Csound function tables (a.k.a. F-tables). Csound makes use of these tables for storing audio waveforms, envelope curves, probability distributions, and so forth. F-tables can be created non-visually, but the process definitely favors a GUI. With FJenie the user simply draws the desired function shape and the program produces the corresponding numeric series that can be pasted into the function table definition (Figure 1).

Jean-Pierre Lemoine's AVSynthesis is not exactly a Csound helper, but it does include an excellent GUI for designing Csound instruments and a sequencer that creates a Csound score. Instruments and score are contained within a standard CSD unified file produced by AVSynthesis (at data/rt.csd) that can be edited for further use, but alas, AVSynthesis does not accept CSD files for input. However, thanks to its Wave Loop audio generator it can play and process stereo WAV files produced by Csound.

Music Composition

Java has inspired some excellent software for music composition. In fact, I discovered too many packages for review here, so I've limited myself to the following selections. See the relevant pages at linux-sound.org or apps.linuxaudio.org for more Java-based programs and environments for general music composition.

JFugue

David Koelle's JFugue is a straightforward API for music composition in Java itself. A single jar file is added the Java classpath, and from that point you can write music with JFugue's extensions to Java. The following simple example creates a scale and passes it to Java's default MIDI synthesizer :

import org.jfugue.*;

public class MyMusicApp
{
    public static void main (String[] args)
    {
       Player player = new Player();
       Pattern pattern = new Pattern("C D E F G A B");
       player.play(pattern);
//	 The next line is needed only for Java versions before 1.3.
//       System.exit(0);
    }
}

JFugue transparently deploys the Java synth. The composer encodes his music in the JFugue syntax, compiles it (javac foo.java), and runs it like any other Java class (java foo). The music is realized through JFugue's connection to the synthesizer, and the composer never needs to be concerned about the details of the audio production.

jMusic

According to developers Andrew Sorensen and Andrew Brown their jMusic is "... a project designed to provide composers and software developers with a library of compositional and audio processing tools. It provides a solid framework for computer-assisted composition in Java, and is also used for generative music, instrument building, interactive performance, and music analysis." jMusic's MIDI music composition environment is similar to JFugue, minus the transparent connection to the Java softsynth. jMusic further provides interactive graphics capabilities and audio processing functions, as seen in Figure 2. The following code calls jMusic's FM synthesis routine, creates a brief melody to test the synth's audio output, and displays the melody in one of jMusic's display modes :

import jm.JMC;
import jm.music.data.*;
import jm.midi.*;
import jm.audio.*;
import jm.util.View;
import jm.util.Write;

/**
 * @author Andrew Brown
 */
public final class FMTest implements JMC{
        public static void main(String[] args){
                Score s = new Score();
                Part p = new Part("Flute", 0);
                Phrase  phr = new Phrase();
                SimpleFMInst inst = new SimpleFMInst(22000, 400, 7.2);
                Instrument[] ensemble = {inst};

                //create the scale phrase note by note
            for(int i=0;i

Figure 2: jMusic at work


Alas, jMusic's built-in synth support is restricted to Apple's QuickTime synthesizer, but it might not be too difficult to add a system call to your Linux media player of choice for automated file play.

As the screenshot indicates, a little jMusic code goes a long way. I must end my mini-description here, but for more information and a lot more jMusic code see the guided tutorials, example pieces, and jMusic-based applications available on the project's Web site.

JMSL

Many years ago I heard about a music composition/audio processing environment called HMSL, the Hierarchical Music Specification Language. HMSL was a Forth-based music programming language that favored interactive systems and algorithmic composition, but alas, it was available only for the Amiga and at that time I had no access that machine. Now both the Amiga and the HMSL are gone, but the spirit of the HMSL lives on in Nick Didkovsky's JMSL, the Java Music Specification Language.

Figure 3: An example from the JMSL tutorials


Like its forerunner, the JMSL is designed with a central concept of a MusicShape, an object made from a series of breakpoints that defines the evolution of "... data that is directly performable (such as pitch, amplitude, resonance, etc)... [or] more abstract data, such as parameters that feed an algorithm", as the on-line tutorial puts it. The MusicShape is a powerful concept, as the first substantial example in the tutorial makes clear. That example presents a MusicShape that defines a series of random chords and plays them with the Java MIDI synthesizer when the example is run. The shape includes these five parameter sets, or dimensions, for each chord it creates :

Dimension     Meaning
0             duration of chord
1             root of chord
2             number of intervals in chord
3             harmonic complexity of chord
4             time window within which to play all intervals

Figure 3 shows off the example as it appears in my Firefox browser. You can test this example for yourself if your browser is enabled with the Java plugin. JMSL is not required for the on-line tutorial, and those instructions are an excellent introduction to the system.

HighC

Thomas Baudel's HighC might be called an incarnation of the UPIC music system designed and used by composer Iannis Xenakis. Like its predecessor, HighC is a graphic music and sound composition program. The user first selects colorized graphic representations of sound objects (audio waveforms, envelopes, patterns), then draws and paints the combined objects into visual patterns shaped across x/y axes representing pitch and time (Figure 4). The patterns are then compiled for audio playback and/or export (HighC is not currently a realtime system).

Figure 4: Composing with HighC


HighC is a superb realization of the principles first presented by the original UPIC system. The program is simple enough for a complete novice to use effectively, yet it is powerful enough for the demands of the contemporary composer. It lacks a few amenities (no spatialization yet), but the author has a full plate of features he intends to add. HighC has become a staple item in my own composer's toolkit, and I recommend this software to anyone looking for a graphic composition system.

Other Notables

As I mentioned earlier, Java is rather rich in applications designed for music composition, too rich for a complete presentation here. However, a few other programs caught my attention during my research for this article.

Figure 5: The Rubato Composer


Rubato (Figure 5) is a composition system similar in operation to a modular synthesizer. Various processing modules (rubettes in Rubato-speak) are connected together to create a processing network, but here the processes are applied to musical data, not sound. The network's output can be played upon process completion and/or saved as a MIDI file or a Csound score. The DISSCO project plans to combine sound synthesis and music composition into a single Java-based package, but only the audio synthesis section is usable now. Finally I must mention the truly unique Harmony software. Harmony is a program that plots an astronomical ephemeris and renders its data to an AU-format soundfile. This process is based upon theories first presented in Johannes Kepler's famous Harmonices Mundi, a.k.a. The Music Of The Spheres. Like Rubato, Harmony also creates Csound scores which can be played then by user-defined Csound instruments.

Synthesizers & Samplers

JASS

Kees van den Doel's JASS (Java Audio Synthesis System) is a text-based audio synthesis environment. Like Csound, JASS is based on the unit generator model of interlinked "black box" opcodes, each of which performs a particular generative or processing function. The language interface is pure Java, and Java 1.5 or greater is required.

Incidentally, the JASS Web site demonstrates the software's capabilities through a variety of neat Java applets. Many applications profiled here take good advantage of Java's Web integration, another attraction for sound and music applications developers.

JSyn

The README for Phil Burk's JSyn succinctly describes the program as "an Audio Synthesis toolbox for Java". It is an audio programming language based on the unit generator model (again; object-oriented languages favor the design), designed to be used as the sound synthesis engine for standalone Java sound applications (e.g. JMSL) or browser-based applets. Alas, the JSyn plugin is not currently available for Linux, but the package's standalone example programs show off JSyn's capabilities very nicely (Figure 6).

Figure 6: The JSyn synthesizer


JSyd

While searching for Macintosh music and sound applications that would run under the ARDI Executor (a Mac OS emulator for Linux) I discovered Jim Bumgardner's Syd, a neat graphic patching synthesizer based on the author's experience with large modular hardware synths. In a now-familiar design Syd supplied a variety of signal generators and modifiers that could be freely connected to create interesting software sound synthesis networks. JSyd (Figure 7) is the new and improved version of Syd, now available for Windows, the Mac, and Linux. Its GUI may not seem so unique now, but JSyd includes many features not typically found in other popular patching synthesizers, such as random score generation, waveform definition by formula, and an output module for creating Csound scores.

Figure 7: Jim Bumgardner's JSyd


JSampler

I've written about the LinuxSampler Project in a previous article, in which I included some screenshots of Grigor Iliev's JSampler, a Java-based GUI client for the linuxsampler server. With the demise of GigaSampler/GigaStudio the project has attracted greater interest from Windows users (LinuxSampler also runs under Windows). Those users expect the software to arrive with a GUI, so the LinuxSampler developers have wisely included JSampler's Fantasia GUI with the Windows package. The Fantasia interface presents the sampler's controls and resources in a well-organized display, as shown in Figure 8, another example of an attractive Java GUI.

Figure 8: The Fantasia GUI for LinuxSampler


DSP Software

FScape is a suite of cool tools for audio analysis and processing, similar to Tom Erbe's famous SoundHack. This toolkit includes some unusual processing modules for sound in the time and frequency domains (Figure 9), along with utilities for soundfile looping and audio restoration. FScape is resource-rich and highly recommended for anyone looking for some wild ways to bend, fold, spindle, and mutilate audio.

Figure 9: FScape with the ReZound soundfile editor


Paul Botelho's jein (Figure 10) is another Java version of an existing program. During the halcyon days of the NeXT machine composer Paul Lansky teamed up with DSP guru Ken Steiglitz to create ein, a learning tool for students of DSP theory and techniques. Like its predecessor, jein is a scratchpad for testing DSP formulae and functions, it is not intended for production purposes. Nevertheless, it is a useful tool for computer-based musicians and sound designers.

Figure 10: jein


While doing research for this article I discovered J-DSP, an on-line set of comprehensive DSP tutorials presented as Java applets. If you've ever wanted to learn the basics of digital signal processing these tutorials are an excellent resource, and I was not surprised to find them recommended in a number of course curricula.

I'll close this section and this part of my survey with a brief presentation of Sonogram, a neat program for analyzing and viewing audio signals in various analysis methods and display formats. I've run out of space, but the screenshot in Figure 11 should give you an idea of Sonogram's capabilities. It's a very cool program, useful and interesting for more than its eye-candy, thanks to its wide variety of signal analysis algorithms.

Figure 11: Sonogram


In the next installment I'll conclude this series with more profiles of Java sound and music applications running under Linux. See you then !

Load Disqus comments