MIDI Zuke Box
(...A Juke-Box with a ZIP!)
Documentation

MIDI Zuke Box is program that plays MIDI music directly from ZIPped sets of MIDI files, such as those available on Marty's MIDI Music Page.




[Intro] [What's New?] [Installation] [Download] [Operation]

[Customization] [Technical] [Disclaimer] [Known Bugs] [Feedback]





Introduction

In order to make it easier to listen to and select music from my MIDI Music Page (and many other MIDI sites on the Internet that distribute files in ZIPped sets), I am distributing a "juke-box" type program that knows how to play MIDI files directly from a ZIPped set. This program is called MIDI Zuke Box (because it's kind of like a Juke Box for MIDI, but it plays ZIP files), or just MZB for short.

MZB lets you preview and/or listen to the songs in a ZIPped Set in any order you wish, and extract/save the ones you like to your disk. You get both benefits of compression and organization inherent to ZIP archives (such as faster and fewer downloads), without the hassle of unzipping and building a "playlist" for your favorite MIDI player (if it even supports playlists!). Just think of the time you will save searching for your favorite music!




What's New?

November, 1997

I finally got around to recompiling MZB for 32-bit Windows platforms (Windows-95, Windows-NT). I've had pretty good luck running the standard 16-bit version of MZB on these platforms, so there really wasn't any good reason to do it--I just got bored one day. Anyways, I haven't tested it very thoroughly, so I'm calling it "Beta Test" at this time, but please feel free to download and use it--it seems to work pretty well.
Click here to go to the download section, and take "MZB/32 Beta Test".

August 11, 1997

I've decided to enlist your support for testing new versions of MZB as I continue to develop it. If you don't mind getting versions that are a little less stable, but have the latest features, please download and use the MZB Beta Test version of MIDI Zuke Box! I'll continue to make both the last stable version and the newer Beta versions available so that you'll always have the choice.

The first MZB Beta Test version includes a scroll-bar that shows you song progression and allows you to more easily skip around to hear different parts of each song while you're getting an idea if you like it or not...

July, 1997

If you are using a version of MIDI Zuke Box prior to v1.0, you MUST update now, as your old version will no longer play new sets generated bymy MIDI Catalog music set extraction programs!




Installation

Currently, you must be running either Microsoft Windows (3.11, Windows-95, or NT) in order to use MIDI Zuke Box. I apologize if that excludes you. Work is already underway for a version to run under UNIX/XWindow.

All you need to do to install MIDI Zuke Box is to download the program into a directory where it will be found by Windows (such as your windows directory or other directory in your PATH).

There are also customization options for MZB that you should check out. In particular, you should setup a "reset file" (you can use my generic GM reset file: reset.mid) that MZB will use to reset your synthesizer before playing each song so that you'll more likely hear the songs the way they were intended to be heard.

To configure your WEB browser so that it automatically invokes MIDI Zuke Box as an "external viewer" when it receives a MIDI Music Set from Marty's MIDI Music Page, you should associate the MIME file type
application/x-zipmzb-compressed
with the MZB.EXE program. In NetScape, this is done in the "Options:General Preferences..." dialog. With other browsers you may need to modify a file called "mailcap" or something similar. Consult your browser's documentation for how to associated MIME types with external viewers.

If you want to run MIDI Zuke Box as a standalone program, create a shortcut or a program icon (on Windows' desktop or program group) that points to MZB.EXE so that you can start it just by clicking on an icon.




Download MIDI Zuke Box!

If you haven't obtained MIDI Zuke Box yet, or need to upgrade, click on the icon below to download the most up-to-date version of MIDI Zuke Box.

Download
MIDI Zuke Box

August 1996
Download
MZB/32 Beta Test

November 1997
(about 40K) (about 62K)




Operation

General

MIDI Zuke Box can either be started by your WEB browser as an "external viewer" (in response to its receiving a MIDI Set for playing), or as a stand-alone MIDI-player program.

Normally, MIDI Zuke Box starts minimized (that is, as an icon), as it is designed to work in the background. In order to bring up the MIDI Zuke Box user-interface, you must double-click on it's icon. When you close the user interface, it will return to its iconized form. MIDI Zuke Box respects Windows Real-Estate.

If MIDI Zuke Box is given the name of the MIDI Set (ZIP file containing only MIDI songs) when it is started (as it is when your browser starts it), it loads and plays the MIDI Set and then exits. If no name is given, then a Set must be loaded manually by use of the "Set:Load" button.

After you use the user-interface, MIDI Zuke Box will no longer exit automatically, as this might cause it to exit while you are using it. You must press the "Exit" button to cause it to exit in this case.


MIDI Zuke Box opens and closes the MIDI Set (ZIP) file each time it goes to play a song. This means that if you (or your browser) erase the MIDI Set you are listening to while MIDI Zuke Box is still active, it won't be able to load and play the next song. For example, NetScape erases the files it creates for viewing by external viewers when it is closed. If MIDI Zuke Box is still "viewing" a MIDI Set that was created by NetScape when NetScape is closed, you'll see this problem. Just remember to close MIDI Zuke Box before closing NetScape. You can always save the current MIDI Set by using the "Set:Save" button before leaving MIDI Zuke Box.

User-Interface

The User Interface of MIDI Zuke Box has two forms: an icon and a dialog box. In Windows-95, the "icon" is simply a button on the TaskBar. The icon is always present, and indicates the filename of the current song being played.

If the dialog is inactive, it may be activated by clicking (or double-clicking) on the icon. When the dialog is active, it is the sole user interface; the icon may not be accessed.

This is a typical instance of MZB's dialog. Notice the three major areas of the dialog. In the upper-left are the "Set" controls, below are the "Song" controls, and on the right are the "General" controls.



Set controls

The text displayed in this dialog area indicates the criteria (selection expression) for the set. It is in fact the "comment" that is attached to the ZIPfile itself.

To the right, there are the "Load" and "Save" buttons which allow you to Load a new Set into MZB, or save the current Set (ZIPfile) on your hard disk. If MZB is started as an "external viewer" from your WEB browser, for instance, you may want to save the entire Set so that you can come back to it later, for the temporary copy that your browser hands to MZB will be erased when your browser closes (NetScape, for example).


Song controls

The combination box that shows the name of the MIDI song currently selected. When the dialog first opens, this is the song currently being played or the next song to be played unless changed. You can switch songs at any time by selecting a different song in the combination box and pressing the "Play" button (see below).

Directly below the combination box is the comment that was attached to the MIDI file in the ZIPfile. The current mechanism that builds MZB Sets from Marty's MIDI Catalog currently places the list of Catalog keywords attached to the MIDI file in this comment.

To the right of the combination box is the "Save" button. Pressing this button allows you to save the currently selected song onto your disk. The usual Windows "Save As..." dialog will be used to allow you to select where to save the MIDI song file.

On the bottom of the "song controls" area is a collection of motion controls which are similar to those found on a home hi-fi tape or cd player. The table below details the usage for each button.

Button Usage
|<< Play previous song
<< Skip backward in current song
[] Stop playing
|| Pause
> Play or Resume
>> Skip forward in current song
>>| Play next song


General controls

The general controls in the MZB dialog are the large buttons that appear along the right edge of the dialog. Each is explained in the following table:

Button Usage
OK Close the dialog and accept any changes that have been made. If a new song was selected, it will be played after the dialog closes.
Cancel Close the dialog and discard any changes that have been made. MZB returns to iconized form in the same state it was in when the dialog was opened.
About Displays an informatory dialog giving copyright notice and author credits (thank you, thank you). Some version-specific notes also appear.
Exit Causes MZB to stop playing and exit. This is the same as choosing "Close" from the system-menu that can be accessed from the MZB icon.


In addition to the buttons, there is a check box labeled "Auto". When this is checked, MZB will immediately activate its dialog when it is started. Use this feature when you're using MZB as a standalone MIDI player so that you won't have to click on the icon each time in order to bring up the dialog.




Customization


The following discussion is consistent with MIDI Zuke Box v1.057. Previous or more recent versions of MIDI Zuke box may have slightly different configuration options and parameters.

MIDI Zuke Box respects a number of parameters which it reads from the file MZB.INI (which is usually placed in your Windows directory) each time it is started. Below, each of these parameters is identified and its purpose and use is explained.

Below is the contents of the file MZB.INI after MIDI Zuke Box is run for the first time. The values given for all of the parameters are the default values. Each parameter is subsequently discussed.

[MZB MIDI General]
Intersong Delay=100
FF_Rew Increment=5000
Auto Dialog=0
Temp Directory=<empty>
Reset MIDI File=<empty>
MCI Port=mapper
	

Intersong Delay

The "inter song delay" is the amount of time (specified in milliseconds) that MZB will wait after stopping the current song before it plays the next song in the set. This is a "kludge" parameter that was necessary in the early days, but is thought now to be obsolete. If you experience the problem where MZB fails to be able to switch songs (it either skips a song or stops altogether instead of playing the next song), you can attempt to increase or decrease this value. This value can safely be set to zero for fastest song switching in most cases, or can be increased if your MIDI setup requires the delay.

FF_Rew Increment

This value sets the amount of time (in milliseconds) the player will seek forwards or backwards in a song each time the skip-forward or skip-backward buttons are pressed. The default value of 5 seconds seems reasonable.

Auto Dialog

The "auto dialog" parameter determines whether MZB's User Interface is opened immediately when MZB is started. The default value of 0 means MZB starts as an icon, whereas any non-zero value placed here will cause MZB to open its dialog immediately after being started. Note that the "Auto" check-box on the MZB Dialog can also be used to modify the value of this parameter.

Temp Directory

The "temp directory" parameter can be used to set a permanent location for MZB to write its temporary files. The default value of <empty> causes MZB to use the value specified by the environment variable "TEMP". If neither "TEMP" nor "Temp Directory" is specified, MZB will use the current directory.

Reset MIDI File

"reset MIDI file" specifies a MIDI file that will be "played" before playing any of the MIDI songs from the set. Typically, you will want to specify a MIDI file that resets your synthesizer to its some known initial state when played. This will insure that all songs played with MZB will get the same "fair chance" of sounding as they were intended to, without being affected by any residual synthesizer settings set by a previous song. The default value of <empty> specifies that no "reset" song exists; songs from the Set will be played back-to-back.

MCI Port

The "MCI port" is the "MCI Sequencer" port through which MZB will play MIDI songs. The default value of "mapper" means that your "MIDI Mapper" will be used to select which Windows MIDI device/port to use (if you have more than one), and will control instrument patch and key maps. This is the most flexible setting, as the MIDI Mapper gives you an added degree of control over how your MIDI song will be played.

Alternatively, you can specify a number here indicating which MIDI port you wish MZB to use. Specify 0 for the first port, 1 for the second, port, and so on. If you specify a port that does not exist, MZB will display an MCI error when it goes to play a song.




Technical Reference

MCI Sequencer

As already noted, MIDI Zuke Box uses Windows' standard MCI Sequencer interface for playing MIDI songs on your synthesizer. This interface provided by Windows allows synchronous and asynchronous operation. MIDI Zuke Box uses asynchronous operation only for playing the MIDI songs from your Set; synchronous mode is used for:

Under Windows for Workgroups 3.11, using synchronous mode is bad in that your entire Windows system will be unavailable while the operation is being performed. The operations above normally complete in a short period of time so usually there is no problem. Note that your "reset file" is played using a synchronous command, therefore however long it takes to send to your synthesizer, you will be locked out of Windows! Again, under Windows-95 synchronous mode appears to have been implemented in a more intelligent manner; only the MIDI Zuke Box application appears to be locked during a synchronous operation -- the system itself doesn't appear to freeze so these problems aren't quite as bad.

ZIPfile support

Currently, MIDI Zuke Box only supports two types of ZIPfile compression formats: "stored" and "deflated". Since "deflated" is the format that regular PKZIP appears to use when you ZIP a bunch of MIDI files together, I feel this is sufficient. The "stored" format was used before I obtained the library routines used to inflate deflated files.




Disclaimer

I believe that MIDI Zuke Box is free from any serious bugs, and is virus-free. Notwithstanding, MIDI Zuke Box is distributed on a USE-AT-YOUR-OWN-RISK basis only.

As MIDI Zuke Box has not been tested on a wide variety of Windows configurations, it is advisable to run it only after closing any open documents you might be working on until you see it works properly on your system.

Also, note that MIDI Zuke Box uses Windows' MCI Sequencer device for MIDI playback, and therefore inherits all of the characteristics (for good, and for bad) of this device.





Known Bugs

MCI Sequencer

I have found that certain songs played using the Windows for Workgroups version 3.11 MCI Sequencer (and that also means, "played with MIDI Zuke Box in WFW3.11") will cause the system to completely hang! What all of these MIDI files seem to have in common is a very large number of MIDI tracks (more than 50). This is a problem in the MCI Sequencer, and not in MIDI Zuke Box, and there's nothing I can do about it. This problem does not appear to occur under Windows-95!

Multiple Dialog Boxes appear

It has been brought to my attention that it is possible to invoke multiple instances of the MZB dialog. This is possible in Windows-95, for example, when you click on the MZB icon on the TaskBar while the MCI interface is busy performing some operation on behalf of MZB. This is occurs, MZB operation becomes unpredictable. See the technical reference section dealing with synchronous MCI commands. This is scheduled to be fixed in the next major release of MZB.

Non-MIDI files generate MCI error dialog

This is not really a bug, but perhaps MZB should be smarter about identifying non-MIDI files within the ZIP, and not attempt to "play" them. Currently, any non-MIDI file that appears in the ZIP (such as a directory, or a .TXT file accompanying a song) causes an ugly MCI Sequencer error to appear when the file is attempted to be "played" as if it were a MIDI file. Until this is fixed, you'll just have to ignore this error and press the "Play next song" button each time it happens.





Problems or Suggestions?

I'd like to hear about your problems, or receive your comments or suggestions regarding MIDI Zuke Box. It's through your feedback that this darn thing will be improved!

By the way, have you visited my home page yet?





[E-Mail]
[Home] [Profession] [Israel] [Music] [Dance]

Marty Ross' WWWpages are Copyright © 1995-1997 Marty Ross