Kelly's Randomly-Chosen MIDI File Script
I offer this JavaScript to the Internet MIDI community as an improvement over the existing random-MIDI-file scripts floating around on the Net.
- List the source of this page and use the script on your MIDI file page, if you like.
- The code is more concise, which makes for a smaller filesize, thus a faster-loading page.
- It doesn't require reloading the page to make another random choice.
- For pages already offering MIDI files, this code works really well since no extra typing is required. Just copy and paste it into the bottom of your page.
- I have only tested it with Netscape 3.0.1, so I'm not sure that it works perfectly on other browsers.
- It is possible to use this script to force unsolicited randomly-chosen music on your visitors if you want to. I personally wouldn't do it that way. Read the hidden comments in the source of this page to find out how you can require your visitors to listen to a randomly-chosen MIDI file when they load your page.
Charles Kelly's MIDI Loops
Copyright (C) 1997 by Charles i. Kelly
These are short loops which I wrote for another purpose and are used here only to demonstrate how this script works.
Play a MIDI File Randomly-Chosen by JavaScript
To find more MIDI files, visit Standard MIDI Files on the Net