This article is from the Electronic and Computer Music FAQ, by Craig Latta Craig.Latta@NetJam.ORG with numerous contributions by others.
Cmix is a loosely connected group of utilities for maniplating
soundfiles. The system is available by FTP.
The following description is taken from the UNIX manual page.
"Cmix is a package of routines for editting, processing, and
creating soundfiles. It also includes a library of routines designed
to make it easier to write C programs which deal with soundfiles.
Typically, the user prepares a file of calls to various cmix
routines, and then invokes them by saying something like:
mix < my.data
Consider the following example data file:
input("snd_directory/elvis") output("snd_directory/elvis+industry") setline(0,0,1,1,10,1,11,0) mix(8.6,0,21,1,0) input("snd_directory/industry") setline(0,0,5,1,11,0) mix(0,0,11,1,0)
This first opens the file "snd_directory/elvis" for input, and
the file "snd_directory/elvis+industry" for the output of the new
mix. Setline creates the amplitude envelope to be used for a
subsequent call to mix. The arguments to setline are pairs of
time/amplitude values. It interpolates linearly between these
points. The next call is to mix and asks to start copying the current
input file to the current outputfile, starting at time 8.6 in the
input file, and time 0 in the output file. It will mix until time 21
on the input file is reached. The fourth argument to mix is the
relative amplitude of the current input file, and the final argument
is used to determine channel location (see man page on mix).
Then, with a different envelope from the next call to setline
there is another call to mix "snd_directory_industry" into the same
To cause this to happen, once this data file has been
prepared, the user should type:
mix <my.data >&my.data.output &
Note that the data file passes through the Minc preprocessor
before being passed to cmix. Be sure to consult the manual page on
Minc for more information.
This is the general procedure for using any of the various
cmix utilities -- creating a data file and then invoking the routines
with a cal to cmix. User writtne subroutines which either augment or
replace those in cmix can be compiled in the users own filespace. See
the manual pages on usersub and Minc for more information.