The simplest method of adding sound/music to your pages is via a text or an image link. The link points to the audio file. When you click on this link, the audio file is downloaded from the server. The browser detects the file type and either launches another program or use a plug-in to play the file.
If an external program is used, a small window opens with the audio file. In case of a plug-in, the file is loaded in the same window (you can change this with the TARGET attribute of <A> tag).
Here I’ll use a graphical button as a link to a song from Pink Floyd’s The Final Cut. The song is in MIDI file format. If you are working under Windows, Media Player or ActiveMovie Control should be launched (depending how your system has been configured) to play this file.
Note: Internet Explorer may present a pop-up window before launching the external program. It asks you whether you would like to “open” the file or “save” it. Select “Open this file from its current location” and click on OK.
<A HREF="finalcut.mid"><IMG SRC="keys.gif" BORDER="0"></A>
There are two common ways to do this.
Use <BGSOUND> tag as
<BGSOUND SRC="some_file.mid" LOOP="INFINITE">
The LOOP attribute can take a number as value, which determines the number of times the file shall play or INFINITE, which makes the sound file play endlessly.
For a browser compatible background sound, use <EMBED> (see below for more details on this tag).
<EMBED SRC="desprado.mid" HIDDEN="TRUE" AUTOSTART="TRUE"></EMBED>
If you want to make use of a plug-in, you would have to put the audio file inside an <EMBED> tag.
<EMBED SRC="desprado.mid" CONTROLS="CONSOLE" HEIGHT="60" WIDTH="145" AUTOSTART="FALSE"><EMBED>
The <EMBED> tag takes many attributes. Some important ones are.
FYI, iLike.com is an online service that lets you create a songs playlist and include it on your web page. There is no need to register or open an account… in fact, you can create your playlist in a few minutes. For step by step instructions, please read how to add songs and music on web site using iLike.com.
Though the digital data on the Internet resides on millions of interconnected servers, the net itself is just data transfer which takes place by electrons and radio waves. Russell Seitz, a physicist, tried to find the weight of the Internet based on this. His calculations, using Einstein's famous e = mc2 formula, revealed that the mighty Internet weighs as much as a strawberry. [more...]