Music in webpage

For the time beeing, I have always the same midi file playing when viewing my weather page.
I have a few midi files and I’d like to randomly (once a day) play automatically another midi file. How is it possible?
Thanks and a happy new year to all of you and Brian and his family in particular.

The below link contains a random music javascript code:
http://www.mfwp101.com/how_to_add_music.htm

This one appears to have a couple of suggested javascript solutions for random music and midis:

Seaching Google with “play random music” will probably turn up quite a few other solutions as well…

Hope this helps,
Bob

Disclaimer: None of the above have been tried by myself…

Thanks jaxweather.
Exactly what I 'd like.
Cheers. :lol:

The problem with playing midi’s on web pages is that anyone browsing your site who is already listening to their own music can be driven mad by the combining of the different sounds. If you really must have music on your site, make sure that the viewer can easily switch it off. Remember that the music you like might not be the same taste as the viewer!!! Before putting anything on your web page, ask yourself “do I really need this (eg. music) on the site and what value does it actually add?”. Gimmicks are fine but they can put people off returning / recommending your piece of “art”, not to mention slowing down your page.

I agree but it’s just a short midi file! :roll:

Unless I hit your page at 3am and dont realize my speakers are up #-o

OK. I will adjust the volume to 33 %. 8)

Just taken a look at your website. I guess having music is a personal thing but I for one prefer sites without it. I did not realise my speakers were on full and got deafened by your music :o

Anyway I also think it might provide a better viewing experience if you split up your page as it takes a very long time to load (I have broadband) with all those graphics. I’d put up some summary stuff and have links to other pages with the other graphics etc on them, so people can view them if they wish. I believe most people visit weather sites to see a quick summary of the weather, at least most of the time. If they want detail then they are usually happy to go to different pages to see what they want.

Thinking about it I’d be quite interested in peoples views about web pages and should they be very full of detail or should they be a summary with links to the detailed stuff.

Personally speaking - if talking about weather websites (or any websites in general) then the main page of the site should be the most attention grabbing one for your visitors - quick loading with the important data that you want to get across (like a weather summary). Then have links via a menu or something so that the visitor has a choice to visit other sections if they want.

Obviously the default page of data WD creates is fine for those with little HTML knowledge - but if you have the know how then you can use the custom webpage function in WD to great effect and design a website with the myriad of weather data from WD supplied on separate pages.

We mustn’t forget that although broadband is getting more widespread, a high percentage of the world’s population is still suffering on dial-up so graphically intensive pages will take several minutes to load. So that has to be considered too when designing websites, especially if the webmaster is on broadband and used to fast speeds.

As for music - well I only find it annoying if I visit a site that I wasn’t expecting to hear music on. If it is a musically related site then I would sort of expect it - as long as it is not “in my face” and that the MIDI controls are supplied on the page so I can hit the pause button for example to turn off the music if I did not like what I was hearing.

Just my thoughts of course.

Heh heh.I thought my old page was fine until one day it sunk in that not everyone has a 5 meg connection. So I rewrote my pages and made an entrance that allows users to pick a broadband page with graphics, etc. or a dialup page with just 1 graphic and the data. And I split up everything on the broadband page too., so you just get the current report, and all else is via links.

Very Nice Jeep. 8)

Hello Jeep,
which software did you use to create your dial-up slow speed internet connection page.
Thanks.
I like the design.
Thanks. :smiley:

A major part of my role with the IT company I work for a web development. One thing that is generally frowned upon is web pages that play music uninvited (or any sound for that matter).

If you want to put music on your web page put a button that the person has to click on to hear the music. This can be done quite easily in javascript.

Also, when I spend my working day browsing the web, rather than working, it alerts my Boss

The viewmaster link in your sig http://www.viewmaster.co.uk/index.htmbrings up a strange page with Error 404!! on it, should it be index.asp not index.htm?

totally red faced my end. Yes, thank you for pointing this out. mmmmmmmm, my next appraisal will say “should pay more attention to detail”

cheers

Keith :oops:

I agree clatters. I’d like still to play a midi file but at a very low volume but so far I didn’t succeed. :roll:

Try this script I’ve just knocked up. It will play a randomly selected file each time the page is refreshed. If you don’t want the console showing just set width and height to 0.

The only problem I see is that Windows XP users will get a warning about active content the first time they run the page. Have three midi files, mid1.mid, mid2.mid and mid3.mid in the same directoy as the htm page containing this script.

Good luck

Keith

Thanks clatters.
I adapted your code. But even if I set the volume at 10%, le midi file is played with the volume cursor at 50%. The result is the same with Opera or Internet Explorer.
Thanks for any reply.
:frowning:

Hi clatters.
Thanks to Google, I found the way to adjust the volume. Setting the volume attribute to a value between -10000 and 0 allows you to control the volume of the sound, with -10000 being no sound and 0 being the full sound.
I adjusted it to -3500. Test it, it shouldn’t disturb you anymore???
Cheers.

Hi lehautfourneau,

thanks for the follow-up. I had been searching for a fix but couldn’t find anything, well done!

still don’t like music on a web page though