
Adagio for Linux -- Release 0.4u, October, 1993.


Here are some Linux programs for playing midi files or Adagio
scores.  They require version >= 1.99.9 of Hannu Savolainen's sound
driver.  The included binaries mp, ad, and xmp require
shared libs:
	libc.so.4 (DLL Jump 4.4pl1)
The binary xmp also requires:
	/usr/openwin/lib/libss.so.3 (DLL Jump 3.0)
	/usr/openwin/lib/libxv3.so.3 (DLL Jump 3.0)
	/usr/openwin/lib/libolg.so.3 (DLL Jump 3.0)
	/libX11.so.3 (DLL Jump 3.0pl1)
	libm.so.4 (DLL Jump 4.4pl1)
and a Linux kernel with IPC shared memory, Linux 0.99.10 or later
(but you can recompile xmp to run without shared memory).

The programs:

    (1)	xmp is an XView-based midi file player.  A midi file is
	selected from a menu using the mouse and placed in a
	carousel, from where it is removed and played when its
	turn comes.  There is a visual bar-display of the
	notes being played on the 16 midi channels. (You don't
	need to use an XView window manager -- I don't.)

    (2) mp plays midi files from the command line, and can also
	convert midi files to Adagio scores.

    (3) ad plays Adagio scores from the command line.  Adagio is
	the scoring language used by the CMU CMT package by Roger
	Dannenberg.  (The basic program code for the playing
	programs was derived from the CM Toolkit.)  ad can also
	convert Adagio scores into midi form.


The playing programs ought in principle to work for whatever sound
cards and midi ports are supported by the sound driver.  If you have
two sound cards, the work is split up between them.  If you have
a synthesizer connected to a midi port, that is put to work also.
Midi files are assumed to conform to General Midi conventions
in regard to voicing and percussion.

As mentioned, some program code came from Roger Dannenburg.  Other code
comes from Tim Thompson's Midifiles library as enhanced by M. Czeiszperger,
and from "fmplay" and "gusload" by Hannu Savolainen.  There are no
copyrights asserted anywhere in the source code, and I do not wish
to restricted my portion of it in any way, but I don't know what
the position of the other authors is on that matter.


Installation of the playing program binaries:

You have to have a sound card (GUS, Soundblaster, PAS16, ...) and
the sound driver installed.  The binaries assume there is no midi
port -- if you have one you want to use, you'll have to recompile.
For the GUS, .pat files have to be in the directory /dos/ultrasnd/midi
or in /dos/ultrasnd/midi2.  If you use any special fm .sbi patch
files, those have to be in /usr/midi/Plib.

Move or copy the binaries xmp, mp, ad to a directory in your path and the
patch libraries *.sb, *.o3, and *.gus to the /etc directory.  You might
want to put the man pages *.1 in /usr/man/man1. (If you have an old
version of the Gravis 16-bit GUS patches which has honktonk.pat
rather than more recent honky.pat, copy oldpat.cfg to /etc/default.cfg.)


Usage (in short):
	% mp midi-file-name		# to play a midi file
	% ad Adagio-file-name		# to play an Adagio score
	% xmp midi-directory&		# to play midi files

mp and ad have a number of flag options, which are described in their
man-pages.  xmp given without a command line argument will give you
access to files in the default directory /usr/midi/Songs, if that
directory exists, or to files in the current directory if not.


Compilation:

Look over the INSTALL document, change the defines in the Makefile
appropriately, and type "make" or "make install" (the latter does
not put the patch libraries in /etc or do anything with the
man pages).  The sound driver header files soundcard.h and
ultrasound.h should be in /usr/include/sys.  To compile xmp you need
the XView libraries (I used Ken Osterberg's 3L5 version of XView 3.2
-- be sure to put patches/ucontext.h into /usr/include/sys)
and, to use shared memory, either a recent libc or libipc.a.

There are some miscellaneous utilities which can be
compiled with "make util" or "make installutil".  The utilities
are:

    (4) tracks
	adds header information to one or more files
	created with "ad -m" to form a standard midi file.
	Output is to stdout.

    (5) midt
	disassembles midi files to stdout.

    (6) tm
	assembles one or more midi disassemblies produced by midt.

    (7) setfm
	loads glib fm patch libraries down to the sound driver (not
	required for mp, xmp, ad, which load the patches themselves).


Availability of related stuff:

Tim Thompson's Midifiles library was posted to rec.music.synth and
is available by ftp from ucsd.edu as midi/software/unix/midifiles.tar.Z.
(But the version included here has been modified by M. Czeiszperger
and me (and is better).)

The CMT manual, which describes the conventions of Adagio scores,
was posted to rec.music.synth, and a PostScript version along with
the rest of the CMT package is available by ftp from ucsd.edu as:
	midi/software/unix/CMT.tar.Z.
A gzipped ascii version is included in this distribution as "cmtman.doc.gz".

The patch libraries "std.*" and "drums.*" can be edited with glib
for Linux, which I've released separately.


					Greg Lee,
					U. of Hawaii, Dept. of Linguistics,
					lee@uhunix.uhcc.hawaii.edu
