Random Phase Music Generator


The Random Phase Music Generator is available here. A mirror is available at ibiblio.


This is a small program that generates random phase music. Random music has been around for a long time (from Mozart's musical dice game to John Cage's chance music), but phase music was invented rather recently by Steve Reich. It would be interesting to combine those ideas, so I have written this program as a tool for further experiments.


You need X version 11 and Motif 1.2 (or compatible). In addition, if you want audio playback, a MIDI file player for your platform is needed.



How To Install

Type xmkmf and then make to compile the program. LessTif users, replace xmkmf with mxmkmf.

Manual Installation

If your xmkmf is broken, you have to install manually. Edit Makefile.man (examples for Solaris, AIX and LessTif are provided). Make sure INCS and LIBS are pointing to the correct directories, then type make -f Makefile.man to compile.


Run phase from an X terminal. Some users might need to point LD_LIBRARY_PATH to the Motif libraries. After starting up the program, you can use the File menu to load or save the panel settings, and the Music menu to play the generated phase music or save it to a MIDI file.

[Screenshot for graphical browsers.]

Panel Settings

The seed value for the random number generator.
The number of tracks used in the phasing process.
Beats Per Minute, Scale
The tempo and scale for the music.
Phase Function
The phase function, represented graphically. Use the left button to draw the function and the right button to reset it back to the default linear function.
Pattern Length
The length of the repeating pattern.
Humanize Touch, Random Staccato
The amount of random irregularities added into the note velocities and durations. These settings are not related to the phasing process, but they make the music sounds more human.
Total Duration
The total number of notes in the generated music.

About Phase Music

Steve Reich pioneered the idea of phase music in his early tape pieces It's Gonna Rain (1965) and Come Out (1966). He then applied his technique to live performances in his Piano Phase (1967) and Violin Phase (1967).

Phasing is the process of looping the same pattern of music on two or more tape recorders (running at slightly different speeds), so they will slowly shift out of synchronization and produce the out of phase effect. Play with this program to experiment with this technique!


Reich, Steve. Piano Phase. London: Universal Edition, 1980.

------. Violin Phase. London: Universal Edition, 1979.

------. Early Works. Double Edge, Russ Hartenberger, Steve Reich. Elektra Nonesuch 79169.

------. Octet/Music for a Large Ensemble/Violin Phase. Steve Reich and Musicians. ECM 1168.

------. Writings About Music. New York: New York University Press, 1974.


The Open Sound System allows you to use your sound card with many UNIX systems. TiMidity is another option.

Revision History

Version 2.0 (01/07/25)
Moved to SourceForge.
Version 1.3 (01/01/29)
Converted to GPL.
Version 1.2 (99/04/29)
Added graphical phase function feature. Imakefile is included.
Version 1.1 (98/12/08)
Bug fixes (memory leaks and unchecked array bounds). Added accelerator keys and Play music... feature.
Version 1.0 (98/10/09)
Initial version.