0

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>

<!-- Experiments with midi sound    vegaseat  -->
<!-- embed src, hidden, autostart, loop -->

<HEAD>

  <TITLE>Embedded MIDI</TITLE>

</HEAD>

<body bgcolor="#FFFF00" text="#FF66CC">

<center>
<h2>This starts the midi file automatically!</h2>
</center>

<!-- the given midi file comes with Win XP, you may need to change this -->
<!-- to something you have!!!!!!!!!! -->
<!-- hide play buttons, autostart and loop once -->
<EMBED SRC="C:\Windows\Media\Onestop.mid" hidden=true autostart=true loop=1>

</body>
</HTML>
5
Contributors
6
Replies
14
Views
12 Years
Discussion Span
Last Post by Johannes_2
0

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

\/
<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.

Edited by Matthew N.: n/a

0

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.

0

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

Regards, Arkinder

0

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?

0

Browsers dropped support for playing MIDI files natively over time. You might want to try MIDI.js, a JavaScript based cross browser library.

Add the MIDI.js script to your webpage:

    <script type='text/javascript' src='http://www.midijs.net/lib/midi.js'></script>

Add a link to start playing:

    <a href="#" onClick="MIDIjs.play('path/to/yoursong.midi');">Play My Song</a>

Take a look at http://www.midjs.net for details.

Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.