Webbits MIDI Background Music on Web Pages explained

<bgsound src="gmanutcr.mid" LOOP=1>
MIDI Background Music

MIDI files are an efficient way to provide background music on Web Pages because the files are very small and the time needed to download them from the Server is barely noticeable when a Web Page is loaded.

MIDI (Musical Instrument Digital Interface) is a standard for defining the instructions to play music using the music synthesizer which exists on Sound Cards.

  If you want to attach a background sound to a Web Page like I have done with this page, all you need is a file with a .MID filename extension that plays MIDI sound.

  Then you add some code into the body of your Web Page like this:

<embed src="gmanutcr.mid" height=62 width=147 autostart=true  loop=1>
<noembed><bgsound src="gmanutcr.mid" loop=1></noembed>

  If you want to enable automatic rewind and replay of the music and you also want to hide the display of the Media Player Controls window, you could instead use the following:

<embed src="gmanutcr.mid" height=0 width=2 autostart=true  loop=true>
<noembed><bgsound src="gmanutcr.mid" loop=infinite></noembed>

  The height and width sizes within the code control the display of the Netscape Media Player Controls window.  A height of zero makes the player window invisible.  The Media Player Controls window provides the user with buttons to control the sound playback.
  Lastly, you upload the Web Page containing this code to your Web Server along with the MIDI file that you have chosen.

A number of Web Browsers today (e.g. Netscape and Internet Explorer) recognize these commands, and if you have a computer that can play MIDI files, then the music will automatically begin playing when the page is downloaded.

The Midi Farm is major resource for MIDI fans
If you are looking for MIDI files to add to your Web Pages you can download some samples from the MIDI Farm Press Room.  You will also find at this Web address a wealth of information about MIDI music and the latest news about keyboards and the software used to create MIDI music. 
Midi Foreground Music
  If you prefer instead to have MIDI music played only upon request rather than automatically when a page is opened, then you can insert  into the body of the coding for a Web Page some code like this:

<a href="joplin.mid">Click to hear some MIDI music!</a>

Here is what happens when you insert the above code:   Click to hear some MIDI music!

  The foreground music takes precedence over the background music which is already on this Web Page.

 To hear some more foreground MIDI music, try these:

Cakewalk Theme
Hello My Baby

Note that you will have to close the Media Player Controls windows yourself for each foreground melody that you select as these windows are not automatically closed.

To Webbits Home Page Back to WebMaster main link

Copyright on text and layouts  © Margaret Brown, l997