Link to home
Start Free TrialLog in
Avatar of LouHall
LouHall

asked on

Midi sound not playing in html

Hello Experts:

I have my "Midiplay.exe" at two locations. Earlier, I was having problems with background noise  on a midi file when I opened the file. I rebooted, and the background sound was
eliminated. "Midiplay.exe" is at two locations because I thought I might have a path problem. If I simply open the file "Ballgam.mid", the sound is fine. If I open
"testmidi.html" [below], I  get no sound from "Ball.mid".

My Midplay.exe is located with it's associated programs at:

C:\Program Files\Audiosta\Midiplay.exe
and at
C:\Voyetra\Audiosta\Midiplay.exe

They are duplicates

This is my source coding:

<HTML>
<HEAD>
<TITLE>testmidi</TITLE>
<BODY BGCOLOR=FFFFFF TEXT=000000>
<H1>Hey Test Midi</H1>
<EMBED SRC="Ballgam.mid"
HIDDEN="True">
<BGSOUND SRC="Ballgam.mid">
</HEAD>
</BODY>
</HTML>

It is located at C:\Program Files\Coffeecup Software\
working\testmidi.html

I would appreciate any suggestions of how I might get my sound to work in an HTML file. I have other HTML files
with sound files on my disk. They do not produce sound as of now.

Lou
Avatar of cutetech
cutetech

Make sure the midi file is located in the same directory of the HTML file. And the correct format of your HTML file will be....

<HTML>
  <HEAD>
    <TITLE>testmidi</TITLE>
  </HEAD>
  <BODY BGCOLOR=FFFFFF TEXT=000000>
    <H1>Hey Test Midi</H1>
    <EMBED SRC="Ballgam.mid" HIDDEN="True">
    <BGSOUND SRC="Ballgam.mid">
  </BODY>
</HTML>
ASKER CERTIFIED SOLUTION
Avatar of johnt082197
johnt082197

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
First, I can now say that you have a midi problem taht is independant from your HTML code. The option "autostart=true" means it should start automatically.
Second, to help you more with this, could I ask you to send me your entire site, along with GIF's, JPG's, and MIDI's all zipped up at: johnt@mail.club-internet.fr
Third, I'm gonna try to answer all your questions one ny one:
1) The console is just there for the user to be able to start / stop the midi from playing. It's not indispensable.
Instead of writing:
<hr size="5" align="left" noshade width="80">
<em>Midi player</em><br>
<embed src="Ballgam.mid" align="baseline" border="0" width="50" height="15" autostart="true" loop="true" controls="smallconsole">
<hr size="5" align="left" noshade width="80">
Write:
<embed src="Ballgam.mid" autostart="true" loop="true hidden=true" > 
In any case, the option "autostart=true" should automatically start the midi file.
2) The crash might not be caused by the midi player, but that's not 100% sure. First test, try to remove Norton from memory and see if you actually crash. If you do, uninstall your browser and reinstall it. If it still doesn't work, install another midi player.
3) As I said before. the option "autostart=true" should allow you to not clic on the play button for the sound to start.
4) Yes, i think you might need to get another midi player. Or at least start with reinstalling the one you currently have. As for the midi player you should get, I guess any would do.
5) The option "hidden=true" hides the console
6) Your code: <Embed SRC="Ballgam.mid" Width=1 Height=1>
does effectively hide the console, but try this instead:
<Embed SRC="Ballgam.mid" hidden=true>

Thanks for the points :)