View Full Version : web site music
thunder3davis
10-23-2003, 04:58 PM
I have midi files loaded on a page for a client and now he wants to have his visitors be able to turn the music on or off with a click of a button.
any idea on how to do that?
TAKE NOTE: I'm not a user of flash
here is the site I made www.jsplace.biz the music is annoying to some users so the owner wants to make it more user friendly
LiviLou
10-24-2003, 08:14 AM
I'm no expert on this, but here is how someone told me to find out how to do something with my site. Save a site that has this feature and look at it through your webpage designer program to see how they did. I have learned alot by looking at sites that way.
I'm sure others with more experience will give you a better answer.
carbonize
10-24-2003, 10:00 AM
You probably have to use javascript to achieve this. Try http://www.dynamicdrive.com as I know it has a DHTML midi player on there so may have othre audio scripts as well.
tikanet
10-24-2003, 11:56 AM
Flash's sound object has a lot of methods for delivering and manipulating audio. I saw that your bienvenidos banner is a Flash file, so you're already using the technology.
thunder3davis
10-24-2003, 01:15 PM
tikanet: yea the other site has the flash feature on it but that was there before I did the site and all I had to do was save it and reinsert it in the site so I didn't have to work with flash.
carbonize: Thanks for the link I will check out the site and see what all they offer.
ImaDunce:yea I been looking for sites like that but I haven't found any with the on/off feature for their music files.
amorphic8
10-27-2003, 11:14 PM
MIDI files on a web page? It's a snap.
Don't use <bgsound> as that automatically implies that user controls aren't going to be required.
As for Flash, forget it. I haven't played around with Flash MX 2004, yet, but from my extensive experience with 4, 5 and the first MX version, I can say there is no support for MIDI file playback or control.
JavaScript? Nope. Why make your life difficult? This is an easy problem to solve.
Simply use <object> and <embed> tags to lay your MIDI file somewhere in the page. Specify a plugin such as Quicktime or Windows Media Player to take control of the MIDI file (I strongly recommend QuickTime)and specify a height of 16 pixels, and enough width as you feel is apporopriate. You can use the code below as a guide:
For using the Quicktime player:
<object classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" width="100" height="16" codebase="http://www.apple.com/qtactivex/qtplugin.cab>
<param name="src" value="PATH TO YOUR MIDI FILE HERE">
<embed src="PATH TO YOUR MIDI FILE HERE" width="100" height="16" pluginspage="http://www.apple.com/quicktime/download/"></embed>
</object>
All you have to do is replace the "PATH TO YOUR MIDI FILE HERE" with, well, the path to your MIDI file and it should work for you.
Notice the <embed> element is within the <object> element and that you have to specify the src, width, height, and plug-in two times. This is the best way of doing it which supports both the MS activex plugin model and the simpler embed that Netscape introduced years ago. If you're certain that your page visitors have up-to-date web browsers (a dangerous assumption, at best), using the <embed> by itself may work out fine.
In addition, you may want to specify additional parameters such as "autostart" to make the file begin playing automatically, or enable kiosk mode to prevent people from downloading and saving your MIDI files.
It is ALWAYS a good idea to put controls on any web pages that have music embedded in them, because if the visitor wants to disable it and can't, it will surely drive him/her away from your site.
REMEMBER:
There is nothing more annoying than backgound music that can't be disabled, so use the technology appropriately and ALWAYS give your visitor the option to turn it off and/or adjust the volume.
If you need more information, visit www.apple.com and click the Quicktime link in the menu header or visit the page I set up for my NYU class, Sound Design for the Web:
http://homepages.nyu.edu/~rjc223/SoundDesign
As an alternative to MIDI files, which can sound 'cheezy,' try creating a small Flash movie that plays an audio file (Mp3) of the music and also offers controls. The only thing is that using Flash to do it requires writing actionscript, but once you do it one time, you can put it in your bag of tricks for the next site.
OR
You can simply set a path to an MP3 file instead of a MIDI file (using the same code above), and the Quicktime plug in will play that instead. The advantage to using Quicktime is that is will mimic 'streaming' using what Apple calls 'progressive download.' What this means is that the music will begin playing back as soon as a small amount has been buffered by the Quicktime plug-in. In other words, the visitor doesn't have to wait for the whole file to download before playback begins.
A final thought:
be aware of copyright issues if you are using someone else's music:
IT IS AN INFRINGEMENT OF COPYRIGHT to use someone's music without permission.
Make sure you have the proper permission to use the music or that the music is in the public domain.
If you need professional sound design for your web sites, please consult my company, amorphicmedia.
link below.
carbonize
10-27-2003, 11:42 PM
Thereby forcing them to download yet another plugin they will rarely, if ever, use. Not to mention using more memory to run the Quicktime plugin.
redcircle
10-28-2003, 12:50 AM
Anyone know of a quicktime plugin for linux? I haven't found one yet.
I'd use flash.
Narasinha
10-28-2003, 05:38 PM
Personally, I loathe background music on web pages. I have my browsers set to not play MIDI files. I have yet to see a page where a MIDI file actually added to the browsing experience.
At least the client wants a way for people to be able to turn it off. How about turning it off by default, and have a button for people to turn it on if they want?
softwaresubmit
10-28-2003, 05:48 PM
You might want to check out:
http://javascript.internet.com/miscellaneous/midi-menu.html
or
http://developer.irt.org/script/191.htm
ranjan
10-29-2003, 02:15 AM
While I do find sounds irritating on websites that do not warrant them, there are websites that need them. A musicains website for eg.
Flash does support the midi format and hence is an excellent choice for sound control if your website requires sound. The reasons are:
1. Flash plugin is popular
2. Flash works consistently across platforms and browsers.
3. With Flash MX your sound controls can be made accessible.
A Midi Control Tutorial can be found at:
http://www.sonify.org/tutorials/links/pages/flash_audio/advanced/midisynth/
Also search the Macromedia Exchange for Smart Clips and Extensions to handle sound
carbonize
10-29-2003, 07:48 AM
Musicians would hardly be using midi files to demonstrate their work.
minstrel
10-29-2003, 08:07 AM
Musicians would hardly be using midi files to demonstrate their work.
Well, maybe Midi Vanilli...
ok... you said "musicians"... bad example...
thunder3davis
10-31-2003, 11:45 AM
Thank you all for the help but the has decided to just let the music play on it's own (bad decision. I know.
but the good news is he is speculating on having the music removed in the future when he wants the site redone.
I am sorry it took me this long to reply for I been on vacation.
again thank you all for the help.
have a great day and a happy but spooky ween night.
anuj_pandit1
11-05-2003, 12:47 AM
Hi,
Simplay make online samll player or default player that will play your midi file online.
I think u can download this type of players from www.flashkit.com
I hope it will help you....
Regards
Alok Kumar Upadhyay