I've embedded midi files on a number of pages on one of my sites but when I want to open one of these pages I get a Windows IE info message:
Click to run an ActiveX control on this webpage
I click on OK and nothing happens.:sad:
The message disappears, I can access the page but no background music.
An embedded MP3 file plays OK, though.

HELP,
Ray

Dani AI

Generated

A concise diagnostic + practical fixes based on the thread: the symptoms described (IE “Click to run an ActiveX control” then no sound), ’s observation about forwarding/paths, and ’s note about local synths all point to a small set of common problems — and a few modern, reliable workarounds.

What’s likely happening

  • Internet Explorer is prompting because it is trying to instantiate a plugin/ActiveX control to play the embedded object; IE also blocks or prompts for out‑of‑date ActiveX controls. (learn.microsoft.com)
  • A root‑relative or otherwise incorrect path can make the browser request the .mid from the wrong host when you use URL forwarding; relative URLs resolve against the document’s base URL unless you set an explicit <base> href. (This matches ’s path hypothesis.) (developer.mozilla.org)
  • Even if the file is reachable, browsers rely on the OS/plugin synth to render MIDI (a MIDI file contains instructions, not audio), so playback can vary by machine or fail if the client has no handler. That explains ’s soundcard observations and why QuickTime/WMP differences appear. (midi.org)

Practical troubleshooting (fast)

  1. Open the .mid file URL directly in the browser (or use a HEAD request) to confirm it returns 200 and the Content-Type header. Example:

    curl -I

    Look for a Content-Type of audio/midi or audio/x-midi. (proxidize.com)

  2. If the URL is wrong when accessed from the forwarded domain, use an absolute URL (full https://... path) or add a proper <base href="..."> in the page head so relative paths resolve to the correct host. (developer.mozilla.org)

  3. Ensure the server serves .mid with an appropriate MIME type (AddType audio/midi or audio/x-midi in Apache/.htaccess or the equivalent in IIS). If the server sends a generic type, some players/plugins won’t run. (pdos.csail.mit.edu)

Better, more reliable fixes (recommended)

  • Convert the MIDI to a real audio file (WAV/MP3/OGG) and use the HTML5 <audio> element for cross‑browser playback:

    <audio controls>
    <source src="song.mp3" type="audio/mpeg">
    <source src="song.ogg" type="audio/ogg">
    Your browser does not support the audio element.
    </audio>

    HTML5 audio is broadly supported and avoids plugin/ActiveX issues. (developer.mozilla.org)

  • If preserving MIDI (event) data is required, use client‑side synthesis (Web MIDI / WebAudio libraries) so the browser renders MIDI via WebAudio (consistent across platforms). Libraries and approaches: Web MIDI API for device access, or WebAudioFont / MIDI.js (and modern forks) to synthesize .mid in the browser. These avoid legacy plugins altogether. (developer.mozilla.org)

If a developer workflow is needed (batch conversion), tools like FluidSynth or TiMidity++ can render MIDI to WAV/MP3 server‑side so pages serve plain audio files. (grokipedia.com)

Summary: start by verifying the .mid URL and Content-Type (curl or devtools), fix path resolution or serve the file from the actual host, then prefer converting to MP3/OGG or use a WebAudio-based MIDI player for robust, cross‑machine playback. This sequence addresses the ActiveX prompt, the forwarding/path issue raised by , and the machine‑dependent MIDI behavior noted by .

Recommended Answers

All 4 Replies

Ok Ray, I've found the solution to your problem.

Your problem isn't your browser, it's the source code in the page itself. I was viewing the source on your webpage and the backround midi is set to src="/il2/sxm/midis/peanut10.mid" The way your page is setup, it looks like your url forwards to an angelfire member page. When loading your webpage's main page() its trying to find the midi file in the directory This does not exist because when you use a URL forwarder, it ONLY forwards the url to one file, which in this case is your homepage. The solution to your problem is this: set the url for the source of the midi file on () to src="http://www.angelfire.com/il2/sxm/midis/peanut10.mid" That will fix the problem and will allow your midi file to be accessed. The reason the active x control comes up anyway is because the source code "<embed" tells internet explorer to open up an object so it can play the file.

Check the source on all your other pages that contain midis and make sure they all point to "" instead of "/il2/sxm/midis/peanut10.mid"

let me know how it goes. ;)

Thanx Monte,
but that didn't work. The midis have played on my laptop w/o the http://www.angelfire.com preceding on the index.html page.
I don't have QuickTime on the desktop but have it on my laptop where it plays the midi files.
Ray

on my computer, quicktime doesn't play the midi files.. god knows why.. on my laptop it plays through windows media player perfectly

Maybe you have to be registered or logged in to their service to be allowed to play the file.

Also, for a MIDI file, the soundcard must have a sounder included. The sounder driver must be installed and enabled, and the browser must be told which driver to use. If any of these are missing, you won't hear anything.

Be aware that each computer will play the MIDI file differently, using the sound samples that came with the soundcard. So what sounds good on one computer can sound quite awful on another. Note that not all soundcards can download samples.

I ran into this problem when I composed a piece using the synth drum sound. One of my soundcards has a 12-note-per-octave (chromatic) scale of synth drum sounds, and the song sounded good. The other one has a 24-note-per-octave (quaretertone) scale for the synth drums, and it sounds awful. I had to change it to steel drums to get it to play universally.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.