
                             XMPIANO
                             -------


The xmpiano demo shows how one might write a MIDI (MOTIF INTERFACE
to DUMB INSTRUMENTS) application.  Both a staff, for writing music, and
keyboard are provided.

To use this application, press the right mouse button on a staff
that is visible.  The following menu items will be displayed:

Add Staff: This function is used to connect another display to a new staff.
  After selecting this command, you will be prompted for the display
  to connect.  Any music written in the new staff will play to this display.
  Note that pressing the right mouse button on the new staff will show
  the name of the display in the menu's title.  In addition, this menu's
  commands will relate to this staff.

Remove Staff: This will remove the staff as well as the connection to the
  corresponding display.  There is no undo for this command - all music
  written in this staff will be deleted.

Clear Staff: This erases all notes on the staff.  This will not effect
  the display connection.

Play Voice: This will play the voice of the staff in which the right mouse
  was pressed.  If the voice is the same as the local host, the keyboard
  will also play along.  It is possible to make the keyboard play along with
  all voices at the same time; however, the code must be compiled with
  -DCHORDS option.  Note that this can slow-down the application
  significantly on many servers.


Play All: This command plays all voices at the same time on each of the
  specified displays.

Save Voice: This will save the corresponding voice to a file.  A
  FileSelectionDialog will be displayed to prompt for the name of the file
  in which to save the voice.  The display connection information is not
  saves.


Load Voice: This will load (append) a previously saved voice to the
  corresponding staff.


Quit: Three guesses... ;-)


At the bottom of the window are a set of notes that may be used on the staff.
Selecting one of these note-buttons will change the active note accordingly.
The selected note will also be displayed as the new mouse cursor.

Though the note selection is limited, it is possible to play sharps as will
as naturals.  The interface isn't advanced enough to handle flats.  Note
that E# will play as F and B# will play as C.

The staff will automatically resize larger as notes are a dded past the
right size of the staff.  To see these notes, scroll the score window as
needed.

To set the color of the notes, change the foreground of the application.
One way to do this is to use the -fg option on the command line.

 ie:	xmpiano -fg blue





PROBLEMS
========

- So far, changing the pitches doesn't seem to work on SUN, DEC PMAX3100,
and SGI Personal Iris.  On the RS6000 and HP700 things should work fine.
If XBell() doesn't work correctly on your system change the PlayNote()
function as needed.

- This version doesn't allow editing of notes.  The only way to erase a
mistake is to clear the staff and start over, or read the data from a saved
file.



--------------------------------------------------------------------------

Enjoy!

Andrew deBlois
