944,124 Members | Top Members by Rank

Ad:
-1

Play a midi file (.mid) on your browser (HTML).

by on Jan 4th, 2005
Lots of good instrumental music out on the web in the form of midi files. You can incorporate background music as part of your web page. Here is the short code.
HTML and CSS Code Snippet (Toggle Plain Text)
  1. <HTML>
  2.  
  3. <!-- Experiments with midi sound vegaseat -->
  4. <!-- embed src, hidden, autostart, loop -->
  5.  
  6. <HEAD>
  7.  
  8. <TITLE>Embedded MIDI</TITLE>
  9.  
  10. </HEAD>
  11.  
  12. <body bgcolor="#FFFF00" text="#FF66CC">
  13.  
  14. <center>
  15. <h2>This starts the midi file automatically!</h2>
  16. </center>
  17.  
  18. <!-- the given midi file comes with Win XP, you may need to change this -->
  19. <!-- to something you have!!!!!!!!!! -->
  20. <!-- hide play buttons, autostart and loop once -->
  21. <EMBED SRC="C:\Windows\Media\Onestop.mid" hidden=true autostart=true loop=1>
  22.  
  23. </body>
  24. </HTML>
Comments on this Code Snippet
Dec 23rd, 2010
0

Re: Play a midi file (.mid) on your browser (HTML).

Does not work for me.
Newbie Poster
EdgarSwank is offline Offline
3 posts
since Dec 2010
Dec 25th, 2010
0

Re: Play a midi file (.mid) on your browser (HTML).

Click to Expand / Collapse  Quote originally posted by EdgarSwank ...
Does not work for me.
Do you have windows (any version) as this will not work unless you change the path if you are not using windows
html Syntax (Toggle Plain Text)
  1. \/
  2. <EMBED SRC="C:\Windows\Media\Onestop.mid" hidden=true autostart=true loop=1>
Change to a absolute url to the file or to the folder it is in.
Last edited by Matthew N.; Dec 25th, 2010 at 6:43 pm.
Junior Poster in Training
Matthew N. is offline Offline
91 posts
since Jul 2010
Dec 26th, 2010
0

Re: Play a midi file (.mid) on your browser (HTML).

I already changed that to the absolute URL I wanted.

http://americancryonics.org/caldream.mid

When I use your suggestion, Firefox says to click to download plugin, but when I do it says not available. When I click manual install, it just re-installs Quicktime I already have installed, but Embed still doesn't work.

I also tried IE, but it wants to install a RealPlayer plugin, which it can't find either.

I've searched for a solution, but all discussion appears to be years old. Years ago, Embeds of MID files worked OK for me, but then they stopped working. If you have something that works today with either FireFox or Seamonkey, I would be eternally grateful.
Newbie Poster
EdgarSwank is offline Offline
3 posts
since Dec 2010
Dec 28th, 2010
0

Re: Play a midi file (.mid) on your browser (HTML).

Your code is deprecated, and your method is outdated. NO ONE should use this.

Regards, Arkinder
Posting Pro in Training
Arkinder is offline Offline
441 posts
since Nov 2010
Dec 28th, 2010
0

Re: Play a midi file (.mid) on your browser (HTML).

If this method of playing MIDI files is outdated, then what is the current method? Is it possible to play MIDI files via HTML at all?
Newbie Poster
EdgarSwank is offline Offline
3 posts
since Dec 2010
Message:
Previous Thread in HTML and CSS Forum Timeline: CSS Non-static Background Image
Next Thread in HTML and CSS Forum Timeline: ftp problem





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC