Make your own free website on Tripod.com
[UMP]

At last! A MIDI plugin for UNIX!


No longer do UNIX users need to hide their heads in shame while their PC and MAC counterparts enjoy embedded MIDI sound at their favorite websites.

UMP is a UNIX plug-in for Netscape Navigator. UMP uses timidity to play MIDI files on many popular UNIX platforms. Timidity is a public domain software tool kit for MIDI. Timidity supports industry standard instrument patch files for ease of upgrade or customization.

A default set of General MIDI instrument files is available, which can be used if Timidity is not installed.


System Requirements

The plugin works and sounds great on platforms such as SUN Ultra, SGI Indy, and SUN X86 P5-133.

It works acceptably on a SUN IPX, but the results would be better with a more powerful processor, and with audio support for higher than voice-grade sound.


Version Information

The current version of UMP is 1.10. This version supports playing embedded or stand-alone MIDI files on many popular UNIX platforms. UMP 1.10 has a rudimentary control panel with stop/pause/play buttons, but no fast-forward, rewind, or volume control. UMP 1.10 honors the <EMBED> directives "autostart" and "loop".

Version 1.01 is a minor "bug fix" release. Version 1.00 sometimes caused Communicator 4.0 to "hang up". Version 1.01 works properly with both Navigator 3.0 and Communicator 4.0.

The size of the UMP logo was reduced about 30% (in each dimension) in version 1.01. There doesn't seem to be any standard in MIDI plugin control panel size. Web page designers seem to reserve enough space on their page for their favorite plugin, which may or may not work for other plugins. The logo size in 1.00 was at the large end of the spectrum for MIDI plugins (200x64). The logo size in 1.01 is somewhat below average in size (140x50). If a Web page does not provide enough space for UMP 1.10, some of the control panel will be inaccessible.

Several future enhancements are planned. Check back here to see when newer releases of UMP are available.

Planned enhancements include:


Instructions

Download the plugin for your UNIX platform:

SUN Sparc Solaris 2.4/2.5
(SUN O/S 5.4/5.5)
UMP 1.01 (142 Kbytes) UMP 1.10 (172 Kbytes)
SUN X86 Solaris 2.4/2.5
(SUN O/S 5.4/5.5)
UMP 1.01 (173 Kbytes) UMP 1.10 (180 Kbytes)
SUN O/S 4.1 UMP 1.01 (168 Kbytes) UMP 1.10 (148 Kbytes)
Submitted by Tom Schmidt
SGI IRIX 5.3/6.2 UMP 1.01 (260 Kbytes) UMP 1.10 (272 Kbytes)
Linux X86 1.2/2.0
UMP 1.01 (134 Kbytes) UMP 1.10 (227 Kbytes)
Linux X86 2.0 w/libc6
E.g. RedHat 5.2
UMP 1.10 (124 Kbytes)
HP PA-RISC HP-UX 9.05 UMP 1.01 (285 Kbytes) UMP 1.10 (275 Kbytes)
HP PA-RISC HP-UX 10.20 UMP 1.01 (178 Kbytes)
Submitted by Peder Langlo
UMP 1.10 (213 Kbytes)
Free BSD UMP 1.01 (137 Kbytes)
Submitted by Donald Burr
DEC ALPHA OSF/1 4.0 UMP 1.01 (167 Kbytes) UMP 1.10 (188 Kbytes)
IBM AIX PPC
Submitted by James Carlson
UMP 1.10
Available here

Move the file into /usr/local/lib/netscape, or $HOME/.netscape, then uncompress, and untar it. E.g.

uncompress -c SUNplugins.tar.Z | tar -xvf -
or :
tar zxvf LINUXplugins.tgz

If timidity is already installed, the plugin is ready to use. Timidity is not required in order to use the plugin. If timidity is installed, the plugin will honor the timidity configuration files and instrument files. If timidity is not installed, download the optional instruments file (9 Mbytes). Then move it to a convenient location, such as /usr/local/lib, and untar it.

Once the plugin in installed, restart Netscape and try this test page. You may need to edit the extensions field in the helper table under Netscape's options/general preference menu. MIDI files usually have the extension .mid or .midi. The extensions field should contain the string "mid,midi". If the plugin does not seem to work, check the help/about plugins page to see if the plugin was installed.

If the plugin cannot find a timidity-compatible configuration directory, it will display a Netscape error dialog that says:

timidity.cfg: No such file or directory
Try timidity -h for help
This may happen because timidity is not installed, or is installed in a non-standard location, or the optional instruments file has not been downloaded, or is installed in a non-standard location.

The plugin expects a file named timidity.cfg to be in the directory /usr/local/lib/timidity. If this file is in another directory, set the TIMID_DIR environment variable to the name of the alternative directory and restart Netscape. E.g.

For Bourne shell :
TIMID_DIR=$HOME/timidity
export TIMID_DIR

For C-shell :
setenv TIMID_DIR $HOME/timidity
If neither timidity nor the optional instruments file has been downloaded, download and install one or both of them.

If the environment variable TIMID_8K is set, the plugin will revert to a voice-grade sound output. This may be necessary for slow processors, or platforms that only support voice-grade sound.

UMP may display an error dialog which says "cannot open audio device" to indicate that the audio device does not support CD quality sound output. This seems to be typical for certain SUN platforms.

As always, the usual disclaimers apply, e.g. this software is provided "as is", with no express or implied warranty. It was written in an attempt to pass time while recovering from knee surgery following a skiing accident.



FAQ

Q: What is MIDI?

A: MIDI is a standard format for storing music information.
Here is one of many sites on the Internet that explains MIDI in great detail.

Q: How is MIDI different from WAV or AIFF files?

A: Sound files, such as WAV or AIFF store sound information. MIDI stores music information. The sound is regenerated using sample waveforms for standard musical instruments.

Q: Why embed MIDI instead of sound files?

A: Since MIDI stores music information, rather than sound information, MIDI files can be much more compact than sound files. A 3 minute song might take 30 Kbytes to represent in MIDI, and might take several Mbytes to store in a sound file. The MIDI file can be quickly downloaded, even through slow modem connections.

Q: Why does anyone use sound files then?

A: MIDI cannot be used to recreate exact sounds. The sound heard depends on the sample waveforms, which can vary widely. MIDI is most appropriate for embedding classical music or simple melodies.

Q: Why do I get the error dialog "cannot open Sun audio device"

A: By far the most common reason for this is that many SUN platforms only support voice-grade sound output (8Khz samples, 8-bit ulaw encoding). To make UMP revert to voice-grade output, set the TIMID_8K environment variable.

Q: How do I set an environment variable?

A: That depends on what type of shell you use. There are two general categories of shells. The first is the Bourne shell and it's derivatives, including sh, ksh, and any POSIX-compliant shell. The second is the C-shell and it's derivatives, including csh and tcsh. These two categories use different and incompatible syntax for setting environment variables.

For Bourne shells, the syntax is :

TIMID_8K=YES
export TIMID_8K
To make this "automatic", put those lines into your $HOME/.profile file.

For C-shells, the syntax is :

setenv TIMID_8K YES
To make this "automatic", put that line into your $HOME/.login file.


Q: When I go the the "test page" my browser doesn't recognize the MIME type of the MIDI files. It displays them as text, or tells me that they are of type "application/octet-stream", or "application/content-unknown". What's going on?

A: The test page uses an FTP server (rather than an HTTP server) to provide the MIDI files. FTP servers don't tell browsers what MIME type the files are, the way HTTP servers do. It's left up to the browser to deduce the MIME type. The browser looks at the file's suffix to deduce the MIME type. Therefore, you must reconfigure your browser to recognize the suffix .mid as indicating a MIDI file.

Go to the "helpers" configuration page. Select the "audio/midi" MIME record. Then choose "edit". You will see that UMP is selected as the plugin to handle this MIME type. You should also see mid,midi in the "suffixes" field. If not, you can either manually enter that data, or you can de-select UMP (select application), then re-select UMP (select plugin). UMP should then fill in the suffixes field correctly. Netscape will prompt you to OK this action. Just say yes.

Q: Why don't you zip the "instruments" file? 9 Mbytes takes too long to download through my modem!

A: Sound files are not well suited for standard compression algorithms. Their contents are too random. The UNIX compress utility does not achieve any compression, and the FSF gzip utility only achieves 4% compression. Since not everyone has gunzip, I am reluctant to support two versions of the instruments file (one zipped, and one not), just to save 4% for some users. You might check out the MIDIA project WWW page (see acknowledgments) to see if they provide a zipped file.



Known Bugs


Acknowledgements

Timidity was developed by Tuuka Toivonen. Timidity is now called Timidity++, and is supported at this site. UMP's Timidity 0.2i patches are available here. These patches can be used for building UMP, or for porting Timidity to new platforms.

The patch files use the Gravis Ultra Sound patch file format. Gravis was a manufacturer of wavetable sound cards. More information about Gravis products is available here.

The patch files are provided as a convenience. They are merely a copy of the files available for MIDIA, and may well be out of date.

The UMP logo was created by R H Olsen.

If you wish to compile this plugin for a new platform, you will need to download, build, and test Timidity. Once satisfied that timidity works properly on your platform, rebuild timidity with the command:

make timidity DEBUGFLAGS=-Dmain=timiditymain

Don't worry if the final link fails, all you need is the *.o files.

Now, download the plugin developer's kit from Netscape.

Untar this file in the plugin SDK "examples/UnixTemplate/Source/" directory
(if you prefer volume control buttons, substitute this file, courtesy of Tom Schmidt).

Now, follow the instructions for building the sample plugin. Then link the resulting plugin with the *.o files from timidity, along with libXpm.a, and store the output in ump.so. E.g.:

make "LDFLAGS=/usr/local/timidity/*.o -lXpm -lm"

Move ump.so into $HOME/.netscape/plugins. Then restart Netscape and test.

If you don't have libXpm.a on your system, you can download it from here.

Let me know how it goes.