Adding Audio to a Website
Audio and background music can be a nice addition on certain web pages. However, these can be annoyances to many visitors so think hard that do you really need it.
Another thing, mind copyrights when playing music. Make sure you have the permission to distribute the music.
Where to Find Music?
Do you want to use midi files? They are not so great as MP3s but load alot faster. Then Midi Database is the place to search from.
Big hit MP3 files can be very hard to get without breaking a copyright law. Also they are larger and can load very long times.
Adding the Audio
1) Upload the files in the desired place, surely you may want a separate folder for them like http://www.yoursite.com/audio
2) Now add the following code to the wanted page to make it play automatically.
<embed src="MyMusic.wav" autostart="true" loop="false">
Things changeable in the code:
- Only necessary thing to change is MyMusic.wav, replace it with the path to your file such as http://www.mysite.com/audio/MyMusic.wav (absolute path) or alternatively /audio/MyMusic.wav (relative path).
- Attribute autostart can be true or false, it tells the browser if it should automatically start playing the file.
- Attribute loop can be true or false aswell and defines whether the file should be looped or not.
- An attribute called "hidden" can be added there too (not there now) and can be true or false. It tells if the player is hidden or not. By default, this is false.
- You can adjust the size of the player with the values "width" and "height".
With all the extra attributes the code could look like this:
<embed src="MyMusic.wav" autostart="true" loop="false" hidden="false" height="200" width="300">
Streaming Audio and Web Radio Station
Want a player with songs to choose from? Try Wimpy player. There are many kinds of players.
If you want your own broadcasts, Pirate Radio is a good choice. This software is easy to setup and inexpensive. Pirate Radio is an Internet broadcasting product which allows anyone to quickly start their own Internet-based radio station as long as they have a computer and a dial-up connection.
