About
Software
Services
Ideas
Rants
nklein logo

Toolkit for Generating Random Music

Since the initial concept was based upon tools like Scribble and Javoice, there is a stream format that is used between many of these tools. The stream format bears a striking resemblence to a grayscale image of a given width and unspecified height. It has a very simple header. The header is an ascii integer telling the width of the stream. The header ends with the newline character (0x0A). After that, there are ``width'' unsigned characters per line. The stream continues until it is closed by the producer.

Different programs use the stream in different ways. For example, the fromStream program maps the columns of the stream to volumes for given frequencies. Most of the programs that read in a stream have options that allow you to read in the stream at certain rates. This allows a great deal of flexibility in consuming a stream.

swarm
This program outputs a stream based upon the wanderings of a swarm in n-dimensions.
pgmToStream
This program takes in a binary Portable Graymap Map file and turns it into our stream format, repeating it a given number of times.
fromStream
This program takes in our stream format, assigns frequencies to columns, and outputs PCM either as signed 16-bit or signed doubles.
beatMachine
This program takes in our stream format and a binary Portable Graymap Map. It outputs the image to the stream for every ``beat'' where the zero-th column of the stream dominates, twice as often while the first column dominates, four times as often while the second column dominates, etc. The output is again in our stream format.
mixSamples
This program is used to start many instances of the fromStream program. These are then mixed together in stereo, for a particular length of time, with fade-in and fade-out.
soundToStream
And, in case you already have a sound sample that you'd like to get into our stream format, you can use this program to do the conversion.

(copyright 2001) (gpg keys)

Valid XHTML 1.0! Valid CSS!