	LBPlay v.0.04. Text mode and PM MIDI player with karaoke.



This software may be distributed and used FREELY. There is NO WARRANTY, use
it on your own risk.


			INTRO

I've got a SC88 and I've found that there's no good program to play MIDI. The
best of existing software was TMIDI though it loses events in very intensive
parts of MIDI file. So I wrote this simple MIDI player.


			FEATURES

- Support for multiple MIDI ports.
- Fast forward and rewind
- Karaoke (synchronous lyrics display)
- Sending reset sysex before playing
- Playlists


			REQUIREMENTS

A MIDI playing device(s) with a driver supporting RTMIDI. See "MAKING RTMIDI
WORK ON SB" section for a description how to set up RTMIDI support for SB
MIDI port/daughterboard connector. If you're going to play MIDI files with
sysex'es or use reset sysexes you should install Warp 4 with FixPak#7 or at
least midi.sys from it. The system will trap with an older version. 


			USAGE

Command line:

LBPLAYVIO <File/Playlist> [File/Playlist] ... [switch] [switch] ...
LBPLAYPM  <File/Playlist> [File/Playlist] ... [switch] [switch] ...
<File/Playlist> is either MIDI file name or -@ Playlist name. A Playlist is a
text file with MIDI file names on separate lines.

Karaoke switches:

-k1 switch can be used to display karaoke text from type 1 (text) metaevents.
-k5 switch can be used to display karaoke text from type 5 (lyric) metaevents.
-k  switch can be used to display karaoke text (auto select metaevents). If any
    type 5 (lyric) metaevent is found type 5 metaevents are used, otherwise
    type 1 metaevents are used.

Synth reset switches:

-gm switch can be used to send GM reset before playing.
-gs switch can be used to send GS reset before playing.
-xg switch can be used to send XG reset before playing.
-nr switch can be used to prevent sending reset before playing.
    (on default Reset All Controllers and All Notes Off controllers are sent
    to each channel).

Playlist order switches:
-c  swith can be used to cycle the playlist
-s  swith can be used to shuffle the playlist

Note:

-k1/-k5/-k and -gm/-gs/-xg/-nr switches are mutually exclusive, if several
switches are specified only the last one has meaning.

VIO version control:

[Esc]   - Stop playing and exit.
[Space] - Pause.
[<-]    - Scan back.
[->]    - Scan forward.
[Up]    - Skip to beginning/Skip to previous file.
[Down]  - Skip to next file.


			MPUINIT UTILITY

This utility is a workaround for problems with MPU-401 and compatibles. It
re-initializes MPU-401s at specified ports. Usage:

MPUINIT <Port> [Port] ...

Where <Port> is a hex base port address (usually 330 or 300).

PLEASE BE CAREFUL! BY INCORRECT USAGE OF THIS UTILITY YOU MAY HALT YOUR SYSTEM!


			MAKING RTMIDI WORK ON SB.

To set up RTMIDI support on SB MIDI port download the lastest MPU-401 driver,
unpack MPU401.SYS (18712 bytes long) into your MMOS2 directory, then use
a hex editor to replace bytes 75 with EB at locations 3DFF and 42E2 (at least
in Russia it is absolutely legal as soon as you're a legal user of the
driver :). Now the driver ignores resource claiming errors. Then install
the driver in CONFIG.SYS (see driver's readme for details) _AFTER_ your sound
card driver, explicitly specifying the base port(s). Reboot and if you're
lucky you'd get RTMIDI up and running. Sometimes this MIDI support may cease
to work, use MPUInit utility to re-initialize MIDI interface.


			KNOWN PROBLEMS AND LIMITATIONS

(Both) In case file has a lot of sysex'es leaving paused state may take
       up to a couple of seconds.

(Both) Format 2 MIDI files, SMPTE timing and RIFF MIDI files are not supported
       now. (Is it nessesary?)

(Both) Starting several players simultaneously will result in simultaneous
       playback. What else do you expect ?:)

(VIO)  In case file has sysexes for several kinds of synths only the first
       synth type is reported.

(Both) Sometimes error 7202 occurs when initializing RTMIDI or no events are
       really sent though the player indicates that it's playing. This is due
       to MPU401 RTMIDI driver bugs: MPU401 must be initialized but it is not
       in the first case and MPU401 output is blocked by pending input in the
       second case. Use MPUInit utility to re-initialize MIDI interface.

(PM)   Karaoke highlight is displayed only when the karaoke window is active
       (PM feature).


			FUTURE PLANS

- PM version interface enhancements.
- Support for serial ports.
- Custom reset sysex'es.
- MIDI editor (In a very slow progress :)
- Sound Canvas sysex editor (In even slower progress :)


			HISTORY

0.01    - Initial text mode version.
0.02    - Added PM version.
0.03    - (Both) Fixed a timing problem when tempo change.
        - (Both) Enabled processing of partially corrupt files.
        - (Both) Added support for sysex continuation messages.
        - (Both) Reset sysexes now work when the file contains sysexes.
        - (Both) Removed 71-minute limit. Well, the limit remains but it is
                 71583 minutes now (approx. 50 days).
        - (VIO)  -d switch is removed. Dump function is moved to a separate
                 utility.
0.04	- (VIO)  Fixed traps in kbdcalls interface.
	- (PM)   Error messages are now shown.
	- (PM)   Karaoke window is now cleared when starting another song.
	- (PM)   Positioning by the slider now works correctly.
	- (PM)   A pause is made after scanning to wait for another command.
	- (PM)   Controls are now disabled when they can't be used.
	- (VIO)  "Grey" arrows now work.
	- (VIO)  A lot of Manufacturer IDs added (as much as I've found).
	- (PM)   the same keyboard controls as in VIO version can be used
	- (PM)   Fixed overlapping buttons.
	- (PM)   A proper icon is displayed, the windows are listed in task
                 list.
	- (PM)   Karaoke window is now resizeable.
	- (Both) Fixed exiting when skipping to previous to the first file
	         or next to the last one.
	- (Both) CD-player style skipping back (first press re-starts current
                 file, immediate another press skips to previous files).
	- (Both) Added pause.
	- (PM)   Changed text on push buttons into icons.
	- (Both) Files with running status over metaevent are parsed now
                 correctly.
	- (Both) Number of supported ports increased to 256.
	- (VIO)	 A real number of ports is displayed.
	-        Added MPU-401 initialization utility.
	-        Removed LBMDump utility.
