  *  Copyright 1993 by Dev Mazumdar
  *  All Rights Reserved
  *
  * This code is based on the OSF/Motif widget set and the X Window System
  *
  * Permission to use, copy, modify, and distribute this software for
  * any purpose and without fee is hereby granted, provided that the above
  * copyright notice appear in all copies and that both the copyright notice
  * and this permission notice appear in supporting documentation.
  *
  * In no event shall  the author be liable for any special,
  * indirect or cosequential damages or any damages whatsoever resulting from
  * loss of use, data or profits, whether in an action of contract, negligence
  * or other tortious action, arising out of or in connection with the use
  * or performance of this software.
  *
  * OSF/Motif is a trademark of Open Software Foundation, Inc.
  * IBM is a trademark of International Business Machines Corp.
  * Sound Blaster is a trademark of Creative Labs, Inc.
  * AIX and RISC System/6000 are trademarks of IBM
  * X Window System is a trademark of the Massachusetts Institute of Technology
  *

		MIDI Sequencer for RISC System/6000

I am pleased to announce the release of "xmuseq", an X-Windows/Motif 1.2 based
MIDI sequencer for IBM's RISC System/6000. "xmuseq" is a full functional MIDI
editor/sequencer which uses the Sound Blaster device drivers  for AIX/6000
(available from ftp.uwp.edu). It uses the FM synthesizer on the Sound Blaster
Pro MCV card to output music on the RS/6000. It can also send sequences to an
external synthesizer via the Sound Blaster's MIDI port.  Then again, if you 
don't have the hardware or the drivers, you can still use it to edit MIDI
files and play them back on a PC/Apple based system.

Currently, there is no real documentation (any self-respecting programmer 
should know that!), but hopefully if there is enough interest in this program 
I will document it. MIDI hackers should have no problem figuring it out :). 

Note: You must install the X-Windows application defaults file XMUSEQ in your
      app-defaults directory. Alternatively, you may use "xrdb -load XMUSEQ" 
      which will do the job as well. You may lose other Xdefaults!.

Mouse Usage:
	
	left button -> Add events to the staff
	right button-> Delete events from the staff
	middle button->Shows event info or sounds the note if the Step Button
			has been pressed. To quit Step Mode, press the Stop
   			Button.

File Menu:
	New - 	Create a blank staff and initialize parameters.

	Open- 	Open MIDI files. The directory set to current directory.
		You may change this in the app-defaults file XSEQ by
		changing the line Open*dirMask: to point to where you store
		MIDI files. Currently this value is set to /tmp/

	Save- 	Save MIDI files. You may change the save directory by changing
		the line Save*dirMask: to point to the directory you want to
		save file. Currently this value is set to /tmp/

	Quit- 	Quit program

Edit Menu:
	Undo - 	Undo deletes and cuts.

	Clear- 	Clears all the notes from the staff.

	Copy - 	Copy notes from the staff. When you select Copy, you must
		hold the left mouse button down and drag it to create a "copy"
		region. Releasing the mouse, copies the notes to an internal
		clipboard.

	Cut -  	Cuts notes from staff. When you select Cut, you must hold the
		left mouse button down and drag it to create a "cut" region.
		Releasing the mouse deletes the notes from the region and 
		copies the notes to an internal clipboard.

	Paste- 	Paste notes from the internal clipboard to a specified location.
		The location has the format "xxx:yyy" where xxx is the time
		index and yyy is the offset. yyy must always be less than the
		current Time Base.

	Refresh-Refresh the screen. 

Window Menu:
	Tracks- This provides access to tracks. When MIDI files are "Opened",
		the track info is stored here. Toggling on the track button
		will post notes to the staff. If you are creating a new MIDI
		file, the toggling on a track will let you automatically enter
		all notes on that track. Toggling off the button will delete
		all the notes on that track.

      Channels- This provides access to the MIDI channels. When MIDI files are
		"Opened", the instrument information is store here. Toggling
		the Channel button will post all notes on a particular channel
		to the staff. This is useful when several tracks use the same
		channel and you want to edit all notes on a channel. If you
		are creating a new file, then toggling on a channel will cause
		all notes to be entered on that channel. Toggling off the
		button will delete all notes on that channel.

	Faders- This provides access to the volume and pan characteristics of
		each channel. Setting volume on a particular channel causes the
		notes on that channel to have a default setting. Setting the
		pan positions, causes the channels to sound notes on left,
		middle or right output channels. FM synthesizer only provides
		3 pan positions. Hence all control change parameters for
		controller 10 must be 0-45 left, 46-90 middle, 91-127 right.

   Event List- This window shows the MIDI events in text format. They are listed
	       with the MIDI values in decimal format. Each event is color
	       coded with the graphic colors.

Note Menu:
	This menu displays the note length to enter on the staff. The notes
	go from 32nd to Full Sharp.

Events Menu:
	This selects the MIDI event to enter on the staff.
	NoteOn-		Enter a Note On event. Enter Notes based on 
			current Note, current Channel, current Track, 
			current Volume

	Pressure- 	Enter a Key Pressure (after touch) Event.

	Controller- 	Enter a Controller Event.

	Pitch Bend-	Enter a Pitch Bend Event

	Program-	Enter a Program Change Event.
			To enter a Program Change event and set a channel first
			make sure that you are in the Insert Mode (press the 
			Stop button to get out of any other mode). Next, 
			select Program from the Events Menu. Then click the 
			left mouse button to enter the event on the staff. 
			Now press the middle mouse button to pop up the 
			Event Information. Press the Patches button to get a 
			list of Patches or enter the patch number. Press the 
			OK button. This will set the instrument on that channel.
			If you wish to load custom patches make sure that you
			have a "sbi.def" file in the current directory. Press
			the Load button the load new patches.

			The format for "sbi.def" is :
			<patch #> <patch name> <patch file>
			  ...	     ...	 ...  
			  ...	     ...	 ...
			example:
				10 WierdSound	/u/demo/wierd.sbi
				12 Marimba2	/tmp/marimba2.sbi

	ChanPressure-	Enter a Channel Pressure(after touch for channel) Event.

	SysEx-		Enter System Exclusive Messages. You have to enter the
			length and the message bytes manually.

	Digital Audio-  Enter digital audio trigger event. You must specify
		        the digital audio file path name. 

Track Menu:

	Quantize Track:	Quantize Tracks based on a quantization value and a
			quantization method. 
			Unaffected:
				The note length is unaffected but the start 
				times are aligned to the quantization value.
			Aligned:
				The note length is quantized and the start
				time is aligned to the quantization value.
			Equal:
				The note length is quantized but the start
				time is unaffected.
			Track:	Specifies the track number to quantize. If
				All Tracks is toggled on, all tracks are
				quantized.
			Unit:	The Quantization value. The unit must always
				be less than the  current Division.
			Division: The Time Base of the MIDI file.

	Filter Events:	Filter events from the track. Toggling "on" events will
			delete events from the staff. You may delete events 
			from a track or all tracks.

        Move Track:	Moves all events on a track  to a specified
			location. Format for time is xxx:yyy. 

	Change Volume:	Changes the volume of all Note On events on a track
			or all tracks.

	Change Channel:	Change the channel number of all events on a track.

	Key Transpose:	Transpose all notes by specified number of semitones.
			Select the semitone by pressing the arrow buttons.
			Transpose affects a selected track or all tracks.

	Oct Transpose:	Transpose all notes by specifed number of octaves.
			Select the octave by pressing arrow buttons. The 
			default is 5 which is the center of the MIDI octave
			range.

Devices Menu:
	FM_PORT:	MIDI bytes are written to the FM port; Sound is heard
			on the SB FM synthesizer.

 	MIDI_PORT:	MIDI bytes are written to the MIDI port. Sound is
			heard on an external synthesizer attached to the
			SB MIDI port.

Buttons:

	Record:		Record MIDI events using the MIDI-In port on the 
			Sound Blaster. This has been untested for the lack of
			a MIDI synth. But theoretically it should work. 
			Recording stores the notes in an array. Use the Track
			Window or  Channel Window to post notes on the staff.
		
	Rewind:		Rewind MIDI notes currently posted on the staff. This
			is actually cool because none of the DOS editors let
			you hear what is being rewound. Note that the cursor
			moves backwards.

	Play:		Play all notes on the staff.

	Forward:	Fast forward notes on the staff.

	Stop:		Stop playing.

	Repeat:		Rewinds the song to the start.

	Step:		When you press the Step Button, pressing the middle
			mouse button on a note will sound the note on a 
			channel. (You must enter a Program Change event before
			you can hear any thing. Please refer to the section on
			Program Change Events above). 
			


Other Controls:

	Tempo:		Sets the tempo of the song. Sliding it right will
			make the song go faster.

	Time Base:	Sets the time base of each measure. If the Time Base 
			is 120 then the cursor positions  are tracked from
			0 to 120 in each measure. Look at the Time display
			to get the position of the cursor.

   Digital Counter:	Tracks the song position only when it is playing
			fast-forwarding or rewinding.

	Scroll Staff:	Enables automatic scrolling of the staff window when
			the song is playing. On slower machines, this may
			cause delays in the song due to redrawing the screen.

	Scroll Event:	Enables automatic scrolling of the event window when
                        the song is playing. On slower machines, this may
                        cause delays in the song due to redrawing the screen.

	Volume:		Controls the total volume of the song.

Merging two or more MIDI files:
		Open a MIDI file and post all notes to the staff. Open a 
		second MIDI file and post all notes to the staff. Then play
		the notes on the staff.


A Typical MIDI editing Session:

1) run xmuseq from an x-term window.

2) Click on the File menu and select Open

3) Select a MIDI file (with a .mid extension) and press OK

4) Click on the Window menu and select Tracks

5) From the Tracks window, press any/all Track toggle buttons which have
   an channel number.

6) Now you are ready to edit!

7) To save the the file, click on the File menu and select Save.

8) Enter the name of the file and press OK.

Thats all for now. If you like it, please spread the word around!. 
I am currently not distributing source for this software. But if it is 
going to be used for research at a university or non-profit organization,
I'd be glad to help you out by giving the source.


Cheers!
Dev Mazumdar
dev@hollywood.acsc.com

