MP(1)

NAME
mp - midi player

SYNOPSIS
mp [ options ] file [ options ]

DESCRIPTION
Mp plays a midi file on sound cards under Linux, and/or sends midi commands out through the sound card's external port. Alternatively, the midi file can be converted to an adagio score (with the -a flag).

If a file with the name supplied on the command line is not found, mp looks for a file by that name with the suffix ".mid". Option flags may precede or follow the file name, and single letter option flags may be combined.

Mp requires the sound driver by Hannu Savolainen for access to sound cards or a midi port. For sound cards (SoundBlaster, PAS16, GUS), instrument patches must be loaded into the sound driver before a midi file is played. These patches and information about them are in files which must be in known locations, so that mp can find them. The directories where mp will look for these files are configurable at compile time, so the specific directories mentioned below are merely the defaults -- they may have been changed.

Libraries of patches for sound cards are kept in /etc/std.* and and /etc/drums.*, where the "*" is a suffix telling the type of patch: "sb" for 2 operator fm cards, "o3" for 4 operator fm cards, and "gus" for the Gravis Ultrasound. Actually, the files /etc/std.gus and /etc/drums.gus contain only some information about GUS patches, which are too bulky to be kept in libraries. The GUS patches themselves are kept in either the directory /dos/ultrasnd/midi/ or the directory /dos/ultrasnd/midi2/ (the latter is searched first).

In addition to patches and libraries of patches, certain optional configuration information can be kept in cfg files. A file /etc/default.cfg, if it exists, is read before playing every file. This can be used to alter the default GUS or fm patch assignments, to prevent playing on one of the available devices, and for other purposes -- there is a separate document, CFG-FILES, describing cfg files. Other cfg files can contain information about playing specific files or about playing groups of files in a specific directory.

For the GUS, mp can use special patches for tone banks and alternate drum sets, but the information about these patches has to be supplied in a cfg file (see CFG-FILES).

Both format 0 and format 1 multi-track files can be played. The midi damper pedal controller and, for sound cards, the chorus depth and reverberation controllers are simulated in software. Midi main volume and expression controls are approximated by modifying patch parameters and volume for the sound cards and the Kawai K1, and passed along to the external port if it is in use for other external synths. Other controllers are also passed along to the external port, but ignored for playing on the cards.

The choice of which channels will be passed to the external port is a compilation option, unless you happen to have a Kawai K1 synth attached, in which case mp can make sensible choices about which channels to send to it, and can also approximate the effect of the pan controller by allocating voices to left, center, or right positions.

There are the following command line options:

-adagio (or -a)
    send an adagio score to stdout, rather than playing.

-f  means don't play anything on the fm card.

-g  means don't play anything on the gus.

-external (or -e)
    means don't send any channels to the external midi port. (Which channels will be external, if any, in the absence of this flag, depends on a compilation option -- see the Makefile.)

-p  plays all parts except percussion with piano, ignoring program requests.

-r chan[,prog]
    records midi input from the external port in a new file "mpout.mid". "Chan" is a number from 1-16, the channel for the midi commands in the file, and "prog" is a number from 0-127, for the general midi program to be used. The output midi file contains a single track which can be merged with the file being played by the separate utility programs midt and tm.

-R reverb
    adds reverberation to all channels; "reverb" is a number from 1-127.

-C depth
    adds chorus depth to all channels; "depth" is a number from 1-127.

-s  prevents treating any instruments as "solo" or non-polyphonic instruments. A new note on a solo instrument cuts off any previous note (e.g., on a flute as opposed to piano).

-init (or -i)
    prevents a series of initialization commands for each channel from being issued at the beginning of the track.

-help
    displays a usage summary.

-v  gives some information about text embedded in the midi file and which voices are used for which midi channels. Voice numbers and tone banks are shown using the notation [voice-number,tone-bank].

-vv gives even more information than -v does.

-tune file
    uses tuning information from the file.

-trace (or -t)
    issues tracing information.

SEE ALSO
ad(1), setfm(1), midt(1), tracks(1), ``The CMU Midi Toolkit'' by Roger Dannenberg

BUGS
Slow to start up. There is no general mechanism for assigning channels and programs to output devices.

AUTHORS
Roger Dannenberg, Roger.Dannenberg@SPICE.CS.CMU.EDU, (Adagio and Transcribe interpreter code),
Greg Lee, lee@uhunix.uhcc.hawaii.edu (the rest).