For using midis and wavs in your page, you must first upload the music to your directory. No files may be accessed from your computer. One of the most common problems I respond to in the Help Forums is, "My music works fine on my computer, but when others access my page they can't hear it." This is because either the file wasn't uploaded, or the reference to the home computer wasn't removed. Look in your document and make sure you remove the File\\\|C:\ProgramFiles\Pathway\ from the front of your references. This goes for ALL your files, by the way.
The second thing you need to know is that the two major browsers support .mid, .wav and .au files, but it takes two separate commands for them to work. The browsers don't speak the same language sometimes. That will change shortly, with Netscape and Explorer finally working together but so many people don't upgrade, you still need both commands in. On to the commands...
The
easiest way is to just put a link into it, as you would any other file. This
gives the person the option of listening to your selection (or Not). Code this
in the following way:
<A HREF="yourmidi.mid">Click me to
play</A>
Replace the word yourmidi with the actual name of the file,
and of course you can put in whateever text you want between the ANCHOR Tags.
And of course, if you're using a .wav file (but be warned it may take a while to
download), replace the .mid with .wav (or .au or .aiff).
To produce
a little console that allows the person to start and stop the play of your midi,
use these tags, which are for BOTH Netscape and Explorer:
<embed
src="yourmidi.mid" width=145 height=55>
</embed>
<bgsound
src="yourmidi.mid">
Again, replace this
with the actual names...and this also works with all supported sound files
(.wav, .au, .aiff).
If you'd like to have the music automatically
start, and play one time, add this to the above:
<embed src="yourmidi.mid"
width="145" height="55" autostart="true">
<noembed>
<bgsound src="yourmidi.mid">
</noembed>
If
you want it to play continuously, add these commands to the above:
<embed
src="yourmidi.mid" width="145" height="55"
autostart="true" loop="true">
<bgsound src="yourmidi.mid"
loop="infinite">
</embed>
Those are the basic instructions, but what? you want a midi jukebox? Well, for a truly random play one, you will need javascript. But, it can be done in HTML if you're willing to take the time. If you're using frames, you can do one like I have on these pages. All that is, are 5 simple, separate pages, all with the commands for autostart and infinite added, and all with the frame target the same one it's in. Nothing else is on the page except the tags for play, along with the background and menu to select a different song. I'll put a sample of that page right here, for you to copy and duplicate for as many songs as you would like. Be sure to rename all files to your own, and all background and menus to what you have in your directory. It's not a true random, as you choose which is the starting page, but it does give your visitor the option of selecting which songs. By the way, I use the code for Crescendo but in this case you don't need to. (Note - these are the previous midis, not the ones that are playing now).
<HTML>
<HEAD>
<TITLE>Midi Jukebox</TITLE></HEAD>
<BODY
BACKGROUND="beige.jpg" BGCOLOR="#FFCC99" TEXT="#996666"
LINK="#400000" VLINK="#804000" ALINK="#FF8000">
<H5 ALIGN="CENTER">Midi Jukebox<BR>
Unchained Melody</H5>
<P ALIGN="CENTER"><FONT SIZE="2"><STRONG>
<A HREF="midi.html" TARGET="midi">The Rose</A></STRONG></FONT></P>
<P ALIGN="CENTER"><FONT SIZE="2"><STRONG><A
HREF="freeb.html" TARGET="midi">Free as a Bird</A></STRONG></FONT></P>
<P ALIGN="CENTER"><FONT SIZE="2"><STRONG><A
HREF="cryin.html" TARGET="midi">Crying</A></STRONG></FONT></P>
<P ALIGN="CENTER"><FONT SIZE="2"><STRONG><A
HREF="havitold.html" TARGET="midi">Have I Told You Lately
that I Love You</A></STRONG></FONT></P>
<!--
Tags for Crescendo and Crescendo PLUS: OBJECT for Microsoft and EMBED for
Netscape -->
<CENTER>
<P>
<OBJECT ALIGN="center"
CLASSID="clsid:0FC6BF2B-E16A-11CF-AB2E-0080AD08A326" HEIGHT="55"
WIDTH="200">
<PARAM NAME="Song" VALUE="unchain.mid">
<PARAM NAME="autostart" VALUE="true">
<PARAM
NAME="loop" VALUE="true">
<EMBED ALIGN="center"
SRC="unchain.mid" WIDTH="200" HEIGHT="55"></OBJECT></P></CENTER>
</BODY></HTML>
For a true
random HTML-based midi player, try this one created by
Dennis Espindola who has
graciously given me permission to use and modify this player. It is necessary to
use Crescendo for it to work properly,
so I highly recommend you get the plugin before viewing it. This will open a new
window in your browser, as it's not meant for frames. Also, please go to the midi player frame here first, and press the "STOP" button on the player, or else none of the midis will start in the Crescendo Jukebox.
Crescendo Jukebox
The song
which plays first is the one that downloads first, so it is a true random event.
Please go ahead and view/copy/save the document source code along with the
graphics. Permission is freely given for their use. You will need a graphics
editor to add text to the buttons, so if you don't have one, please be sure to
visit the Helpful HTML Links Page to
find a good one to download.
Still want a javascript based player? Well, okay, but remember that most versions of Microsoft Internet Explorer will not be able to hear this. This works only with Netscape, due to conflicts between the Browsers. Also known as "Browser Wars." This is in the form of a .txt file, so it should open up in your browser. If it doesn't, you should be able to right click on the file and choose the "Save Link As" command to get it. Save it to your own directory, and use the parts from <SCRIPT> to </SCRIPT> The rest of the directions are above those tags.
| The Basics | Basics Page 2 | Basics Part 3 | Basics Part 4 | Color Chart | Color Tester | Downloads | Geocities FAQ's | Font Viewer | Graphics Help | Gif Wizard | Helpful Links | Midi Tips and Tricks | Page Builder | Good Page Design Tips | Intro Page |Simple Frames | Tables |
Page
Design, Content and Graphics
copyright ©1997 by
Sue Hunter EMT-S/IC
All Rights Reserved