ADDING MIDI MUSIC
The availability of music is a nice addition to any web page, and is quite easy to accomplish. Before we discuss details, we'll look at some of the possibilities and traps.
FORMATS and RESPONSE
The MIDI (extension .mid) and WAVE (extension .wav) formats are supported by all major browsers. MIDI is far more preferable, as its compression offers the longest play time with smallest filesize. Wave files are typically 100 times as large as MIDI files for the same playback time.
Video can be embeded using the same Layout as audio, using .mid, .mov, .avi or even .flv extensions.
Our remarks are confined to addition of MIDI sequences. (A MIDI file is manually edited, or sequenced, and the music files are referred to as sequences.)
Netscape and MSIE support MIDI references via both hyperlinks and via the html <EMBED></EMBED> tagset.
Only MSIE will respond to the <BGSOUND> tag. Therefore, we prefer either the hyperlink or <EMBED> method.
The <EMBED></EMBED> tagset will force a MIDI sequence to download automatically to the user's cache. It can be modified with attributes to play automatically, to loop, and to appear graphically on the page.
Only one <EMBED> tag can be used per page. If you wish to offer multiple selections, other sequences must be presented as hyperlinks.
PLEASE BE AWARE that there is no such thing as a "required" MIDI plugin! Some companies, notably Crescendo, are attempting to mislead users into believing that they must have their product in order for embedded MIDI files to work. This information is totally false and misleading, and is an egregious example of crass commercialism, in our estimation. Crescendo provides a scripted html tagset to embed the sequence so that only the Crescendo plugin can play it back. We recommend use of the standard <EMBED> tagset as later described, so that all visitors are able to access your music without need for specific or additional plugins.
If you use animated graphics on your page, be aware that downloading a linked file after the page is downloaded will cause animations to stop. (They will restart if the visitor leaves and returns to the page or if the page is reloaded.)
There are thousands of MIDI files available. Many are free for the taking, but it's always wise to acquire permission before posting. There is considerable legal confusion and upset regarding copyright infringement - use due caution if your files are in any way connected with a profit-oriented page. Copyrights expire after 75 years. However, even for very old music, the specific performance may be copyrighted. Investigate thoroughly.
Keep in mind that your visitors' sound cards may vary from highly sophisticated to nearly primitive. Many advanced MIDI sequences have been written specifically for replay on a sophisticated wavetable system, and will sound awful through an FM synthesis card. For general usage, check that the desired sequence is indeed playable via an FM synthesis card (such as the SB16.)
PLAYBACK CONSIDERATIONS
There are a large number of plugins "out there", and they all respond differently to the <EMBED> tag. It can be nearly impossible to configure your html so that it will perform suitably for all browsers.
Not all visitors will share your choice of featured music style. Choose carefully to avoid offense, or offer your visitor a choice of several, and/or offer the opportunity to listen only by choice. Some vistors already have music of their choice playing, and an automatic download can raise havoc with their computer system. To avoid any potential conflicts at our website, we offer music by choice only (hyperlinks) - if the visitor would like to listen, a single mouse click will downoad the linked sequence.
HTML FORMATS
On The Server
Your MIDI sequences will be accessed in exactly the same way as are graphics files. They must either reside on the server in the same directory with the page html file, or a proper access path must be specified in the source (SRC="") attribute.
Hyperlinked Sequences
MIDI filenames adopt the form: "song.mid" By simply invoking the filename within an <A HREF> tagset, the file will be downloaded with a mouse click. Example html:
Here is <A HREF="mysong.mid">My Song</A>, another old favorite.
Embedded Sequences
The simplest form of the standard <EMBED> tagset simply calls for the sequence. Example html: <EMBED SRC="mysong.mid"></EMBED>
The EMBED tag will automatically call whatever graphic is associated with the user's playback device or plugin.
There are several optional attributes:
Here's an example of an embedded MIDI with all the trimmings:
<EMBED SRC="mysong.mid" AUTOSTART="TRUE" LOOP=5 HEIGHT=50 WIDTH=80 VOLUME="50"></EMBED>
(Note proper application of quotation marks.)
MIDI sequences, whether hyperlinked or embedded, may presented in all of the standard html forms including standalone, linkage in imagemaps, and placement within table cells or lists.
NOTE: Although the <FORM> method may be used to post, it is not recommended, as it forces implementation of the Windows Media Player, and will not allow operation of your visitor's preferred player.
YOUR ISP's SERVER
Your service provider's server must be configured to deliver the two {MIME} types related to MIDI files - both MIME Type: audio/midi and MIME Type: audio/x-midi. It's a simple setup, but your provider must add it to his server, or no music will download. (One is required for embedded files, the other for linked files.)
The reason for this is that browsers are programmed to recognize different types of downloaded information only if the server "tells" them what it is. Recognition of text and graphics is virtually universal to all servers and browsers. Special types, such as MIDI format files, must be added to the server's information bank. After proper {MIME} Type configuration, the server will send a signal to the browser that "This file is in MIDI format" any time it's requested to send a file with the .mid file extension. The visitor's browser will then call the appropriate music plugin or helper application from the visitor's hard drive.
A COMMON MISCONCEPTION
Many new page designers are under the mistaken belief that MIDI pages "contain" and download music players. This is absolutely never the case. Your ISP's server will only send the file information and appropriate {MIME} Type. The visitor's computer must have its own sound card and speakers, an appropriate plugin or helper application must exist on the visitor's hard drive, and the visitor's browser must be configured to call that plugin or helper app upon receipt of a MIDI {MIME} file.