XMP(1)

NAME
xmp - play midi file

SYNOPSIS
xmp [ directory ]

DESCRIPTION
Xmp is an XView front end for mp, which plays midi files on sound cards under Linux, and/or sends midi commands out through the sound card's external port. Invoked without an argument, xmp looks in a default directory (selected at compile time) for midi files or, if the default directory doesn't exist, the current working directory is used. With a directory given as argument on the command line, this directory is used instead (e.g., type "xmp ." to see files in the current directory).

Midi file
Choose a midi file to play by clicking the right mouse button over the "midi file" selector. After a few seconds, you will see a menu of files and subdirectories. (The names have spaces inserted before non-initial caps to make them more readable.) Either click the right or left button over the name of a midi file, to select it for playing, or click the right button over a subdirectory name (followed by a tiny triangle) to see a new menu of the files in the subdirectory.

Play
To play a selected file, click the left mouse button over the button with a green dot, over "play" or over the filename after it. The play dot will change to red to show that no further file can be played now, until the current one is done with. While the midi file is being analyzed, the dot blinks. At the lower right is displayed, first, the track numbers of the midi tracks that are being examined, then the running time of the song, in minutes and seconds. The analysis phase can take quite a while.

Meter
Click the left mouse button over "meter" to see a display of the current average note velocity on each of the 16 midi channels. The width of the bars in the display is determined by how many notes are being played on a channel, and the percussion channel bars are stippled. The colors of the bars show the values of a midi channel controller -- by default the expression controller, but others can be chosen with the controls at the bottom of the meter or in the settings window with the "meter color" menu. The color is red for the highest values of the midi controller, and goes down through yellow, green, and cyan lower values (except for reverberation, for which the colors are reversed).

Below the bar-display of note velocity are a set of plungers whose heights also show the values of a midi controller, but in more detail. The plungers can be used to set the controller to new values by dragging their tops up or down with the left mouse button depressed. After you have set a plunger, it shows red instead of green. To return the plunger to program control after setting it, drag it down to the bottom (slowly).

Midi controller values set by the plungers will have their full effects, in general, only when they are set before starting to play a file. If xmp was compiled to use shared memory, then for the GUS card, changes made to expression, main volume and pan while a file is playing can be heard after a couple of seconds, but only part of the chorus depth and reverberation effects will be audible.

Controls at the bottom of the meter select which midi controller is displayed or changed by the plunger:

e   is the expression controller #11,

v   is main volume #7,

c   is chorus depth #93,

r   is reverberation #91, and

p   is stereo pan #10. At the right of these controls are three buttons which when clicked on do the following:

S   for "set" fixes the positions of any of the plungers that are above zero at their current positions (so they will turn red),

R   for "reset" returns all channels of all five controllers to their pristine state (so the plungers for the selected controller will turn green),

W   for "write" writes out a file into the current directory called "xmptemp.ctl" containing an editable representation of the midi messages required to give the controllers the values to which they have been set (i.e., the heights of the red plungers). The text file written is in the format used by the midt midi dissassembler and the tm midi assembler, so that you can dissassemble a midi file being played and insert the controller values you have selected with a text editor, then reassemble the midi file.

The meter can be resized using your window manager. The meter bar display is not completely synchronized with the sound, but you can try to improve matters with the sync setting mentioned below.

Quit
If no file is playing, clicking over the 'quit' button exits from xmp. However, if a midi file is being played or analyzed (the play dot is red or blinking red), then clicking 'quit' just cancels the playing of that file.

Carousel
While a file is playing, attempting to select a new midi file to play will have no effect, unless the carousel is active. Click on "carousel" to start it, then when you select midi files, they go into the carousel and are played one at a time, automatically (by default), until the carousel is empty. You can put as many files as you want into the carousel and add them at any time. If there are more than six files in the carousel, you need to click or drag the carousel scroll bar to see the rest -- the scrolling has no effect on what files will be played.

Below the carousel list is a "recycle" option that can be clicked on or off. When it is on, files are not removed from the carousel when they are played, but rather moved to the bottom. Beside this option is an "auto" option to select whether files from the carousel are to be played automatically, as soon as the previous file is finished playing. When the carousel is turned off with file names in it, then turned back on when no file is playing, you have to click "auto" off then back on again to get it started. Being iconized has no effect on the carousel's operation.

You can edit the list of files already in the carousel, if you want, by first selecting a name in the carousel with the left mouse button, then bringing up the "ops" menu by clicking the right mouse button over the "ops" button. There are five operations available, all (except "sort" and "clear") relative to the file name currently selected (shaded).

A menu can popped up by pressing the right mouse button over the area of the carousel itself. Please don't use it. It's an Xview-supplied menu that I can't get rid of.

top moves the name to the top of the carousel, so that file will be the next to be played.

bottom
    moves the name to the bottom of the carousel.

delete
    removes the name from the carousel.

add *
    adds to the carousel all file names of other files found in the same directory as the selected file (but not descending subdirectories).

sort
    sorts the names in the carousel alphabetically.

clear
    removes all file names from the carousel.

The carousel widens automatically to display long file names, but the window containing the carousel is not adjusted except after the "add *" operation. This may make the carousel's scroll bar at the right invisible, until you adjust the width of the window with your window manager. When the window is narrowed by the window manager, the carousel inside it narrows too, but only down to the width required to display the longest name it contains.

When you are selecting files one at a time for playing, if a file turns out not to be a midi file, or is not readable, a notice to that effect is put up on the screen (and you have to click on "Confirm" to clear the notice). But when playing files from the carousel, unplayable files are passed over silently.

If the carousel is clicked off with files in it, then clicked back on when no file is playing, the top file will not be played automatically. To get it started, click "auto" off then back on again.

Settings
Click the left button over "settings" to see various checklists, sliders, and menus. The checklist options can be toggled with the left mouse button. Changes to some of the settings become effective while a midi file is playing (after a second or two); others, static settings, take effect only when the next midi file starts playing. If xmp was compiled not to use shared memory, all settings except one are static -- the only dynamic setting is ``meter sync''. If it does use shared memory, the following settings are also dynamic: pseudo stereo, reverb delay, chorus spread, vibrato depth/speed/sweep, gus volume (if present), gus tuning, meter color.

fm card
    means play on the fm card (if present),

gus card
    means play on the Gravis Ultrasound card (if present),

external synth
    means play notes out through the external midi port (if you have one),

drum rolls
    causes non-General Midi drums notes above pitch #81 to be interpreted as triggers that roll the first preceding drum note,

pseudo stereo
    turns on or off artificial stereo panning of piano-like voices with low notes to the left and other voices with left-right variation according to note velocity, and (at the beginning of a song) assigning channels to various positions for pieces using more than three channels and no panning controls,

all polyphonic
    means treat all instruments as polyphonic, capable of playing several notes at once,

4op fm
    requests four operator fm voices, for fm cards that have OPL3 chips (you get 6 note polyphony if this is checked, 18 note polyphony if not),

piano only
    means play all notes on the "acoustic grand" (other than percussion),

reverb delay
    adjusts delay and increase in duration of echo notes produced under control of the midi reverb controller -- zero setting means no reverberation,

chorus spread
    slider adjusts the amount of detuning used in interpreting the midi chorus depth controller (an external synth is unaffected) -- zero setting means no chorus effect at all,

vibrato depth
    slider adjusts vibrato depth -- zero setting means no vibrato,

vibrato speed
    slider adjusts vibrato speed -- 50 is normal.

vibrato sweep
    slider adjusts vibrato sweep -- zero setting means no sweep,

gus voices
    slider selects the maximum number of notes the gus can play at one time (a higher value sacrifices fidelity, maybe),

gus volume
    move volume of all gus notes up or down to help bring it in balance with other synths,

gus tuning
    move pitch of all gus notes up or down to help bring it in tune with other synths,

meter color
    is a menu invoked with the right mouse button to choose which midi controller affects the colors of the bars and the height of the plungers in the meter display -- the last menu item, "(reset all)" resets the controllers,

bar is a menu invoked with the right mouse button to choose what the meter bars display -- "channel" means the 16 bars are for the 16 midi channels, "pitch" means the first 12 bars show the 12 notes of the scale and the last 4 show percussion, "instrument" means the bars show the 16 General Midi instrument groups (with percussion in bar 15, together with percussive instruments),

meter sync
    advances or delays the time in a song at which the notes are shown on the meter. The calibration is in centiseconds. It is not possible to synchronize the meter display with the music exactly, since the display is updated only 10 times per second. The setting is dynamic -- you should see the effect of adjustments while a song is playing.

CFG Files
For the Gravis Ultrasound card or fm cards, non-standard .pat or .sbi files can be put in the same directory as the midi file being played, and non-standard names can be supplied in a .cfg file or a file "ultrasnd.ini", corresponding to the Gravis convention. In addition, other settings and assignments, for all devices, can be included in .cfg files. The usage of cfg files is identical for all three playing programs xmp , mp , ad and further details can be found in mp(1) and the document CFG-FILES.

SEE ALSO
mp(1), midt(1), tm(1), CFG-FILES

BUGS
File menus should be sorted. The main file menu is constructed only once when xmp starts up, and so will not reflect changes in the contents of the topmost directory looked at (but the submenus do reflect changed in the subdirectories).
It would be more convenient to have the file menus remain up on the screen, as an option, instead of them disappearing after each file is selected for playing.
Resizing the carousel window does not change the number of files in the carousel that are visible, and the list within the window may widen due to long file names without automatically adjusting the window width, so that the scrollbar goes off screen.
Windows aren't aligned correctly under olwm (I use tvtwm).

AUTHORS
Greg Lee, lee@uhunix.uhcc.hawaii.edu,
file selection code adapted from the XView Programming Manual, by Dan Heller,
for other credits see mp(1).