PDA

View Full Version : Embeding MIDIs


UltimaAvatar
11-15-2003, 05:03 AM
I'm using this really cool midi randimizer on my site and it really adds a cool effect but I have one problem. The 10th Midi - Schala's ancients is an XMIDI and it crashes the browser almost everytime it loads in real one, how can i force just that midi to load in quicktime? is it possible? if a person's browser is default to quicktime then i think it works fine but in windows media and real one it crashes the browser, my site http://www.student.gsu.edu/~tpowers3 loads the script in a popup when it opens, if someone can help me force just that midi to play in quicktime that would be awesome

<script language="JavaScript">

nummidi = 29
day = new Date()
z = day.getTime()
y = (z - (parseInt(z/1000,10) * 1000))/10
x = parseInt(y/100*nummidi,10) + 1
if (x == (1))
midi=("midis/blackmagevillage.mid")
if (x == (1))
title=("Final Fantasy 9 - Black Mage Village")
if (x == (2))
midi=("midis/bof3field.mid")
if (x == (2))
title=("Breath of Fire 3 - Second Field")
if (x == (3))
midi=("midis/ff7cityofancient.mid")
if (x == (3))
title=("Final Fantasy 7 - City of Ancients")
if (x == (4))
midi=("midis/ff7world.mid")
if (x == (4))
title=("Final Fantasy 7 - World Map Theme")
if (x == (5))
midi=("midis/ff8timecompress.mid")
if (x == (5))
title=("Final Fantasy 8 - Time Compression")
if (x == (6))
midi=("midis/gulgurvolcano.mid")
if (x == (6))
title=("Final Fantasy 9 - Gulgur Volcano")
if (x == (7))
midi=("midis/sfbiolab.mid")
if (x == (7))
title=("Saga Frontier - Biolab")
if (x == (8))
midi=("midis/branbul.mid")
if (x == (8))
title=("Final Fantasy 9 - Souless Village of Branbul")
if (x == (9))
midi=("midis/terra.mid")
if (x == (9))
title=("Final Fantasy 9 - Terra")
if (x == (10))
midi=("midis/xmidschala.mid")
if (x == (10))
title=("Chrono Trigger - Schala&nbsp;Theme&nbsp;Remix<br>(XMIDI)")
if (x == (11))
midi=("midis/anxiousheart.mid")
if (x == (11))
title=("Final Fantasy 7 - Anxious Heart")
if (x == (12))
midi=("midis/jenova.mid")
if (x == (12))
title=("Final Fantasy 7 - JENOVA")
if (x == (13))
midi=("midis/ff8saltflat.mid")
if (x == (13))
title=("Final Fantasy 8 - The Salt Flats")
if (x == (14))
midi=("midis/mtgagazet.mid")
if (x == (14))
title=("Final Fantasy 10 - Mt. Gagazet")
if (x == (15))
midi=("midis/magus.mid")
if (x == (15))
title=("Chrono Trigger - Magus Battle")
if (x == (16))
midi=("midis/seymourbattle.mid")
if (x == (16))
title=("Final Fantasy X - Seymour Battle")
if (x == (17))
midi=("midis/summonbattle.mid")
if (x == (17))
title=("Final Fantasy X - A Contest of Aeons")
if (x == (18))
midi=("midis/zanarkand.mid")
if (x == (18))
title=("Final Fantasy X - Zanarkand")
if (x == (19))
midi=("midis/metroidkraid.mid")
if (x == (19))
title=("Metroid - Kraid")
if (x == (20))
midi=("midis/xmidfrog.mid")
if (x == (20))
title=("Chrono Trigger - Frog's Theme Remix<br>(XMIDI)")
if (x == (21))
midi=("midis/ff7cave.mid")
if (x == (21))
title=("Final Fantasy 7 - Chasing the Black Caped Man")
if (x == (22))
midi=("midis/ff7chocobo.mid")
if (x == (22))
title=("Final Fantasy 7 - Chocobo Theme")
if (x == (23))
midi=("midis/ff7cid.mid")
if (x == (23))
title=("Final Fantasy 7 - Cid's Theme")
if (x == (24))
midi=("midis/ff8findyourway.mid")
if (x == (24))
title=("Final Fantasy 8 - Find Your Way")
if (x == (25))
midi=("midis/x4xtheme.mid")
if (x == (25))
title=("Megaman X4 - X's Theme")
if (x == (26))
midi=("midis/x4zero.mid")
if (x == (26))
title=("Megaman X4 - Zero's Theme")
if (x == (27))
midi=("midis/ff9place.mid")
if (x == (27))
title=("Final Fantasy 9 - The Place I'll Return to Someday")
if (x == (28))
midi=("midis/ff9NotAlone.mid")
if (x == (28))
title=("Final Fantasy 9 - You Are Not Alone")
if (x == (29))
midi=("midis/templeoftime.wma")
if (x == (29))
title=("Zelda Ocarina of Time - Temple of Time")
document.write('<EMBED SRC= ' + midi + ' autostart=true loop=true ')
document.write('width=125 height=50 controls=smallconsole><br></tr>')
document.write('<tr><p> You are listening to <font color="FFFFFF">' + title + '</font></p></tr>')

</script>

brothercake
11-16-2003, 05:22 AM
You can't force a particular media file to open in a particular player - you offer the file, and your end user, or more likely their computer, decides what it should be played in. After all - how do you know they even have quicktime?

What's different about an XMIDI file from a conventional MIDI file? Can you not convert it or something?

zoobie
11-16-2003, 06:35 AM
Real player? Quicktime? They'd have to be installed to hear.
Midi sounds like it's a cheap $10 keyboard playing...probably because it is. :D
If I were you and into muzik, I'd look into Flash so you could have real muzik playing.

UltimaAvatar
11-16-2003, 07:08 AM
ok, well the difference between an xmidi and a midi is supposed to be that an xmidi has more channels to work with and more memory almost like a different format, sounds higher quality i guess. go to my site and see for yourself if you want. the other xmidi i use works fine, its just that this one proves to be a problem when i use it in realone and windows media. windows media will think it has 999:99:99:99 long (d:h:m:s) and real one just crashes when it tries to open, but i think quicktime was the only player that didn't crash

zoobie i don't know flash and it would probably be too big to fit on my site, i just need some cool music, these midis offer pretty good sound and i give the user a way to turn it off incase it does sound like $10 keyboard playing to him/her.

brothercake
11-16-2003, 08:10 AM
If it's just that one file, maybe it's the file itself - maybe it's corrupted in some way that makes Windows Media Player choke on it.

Maybe you could get the same file from another source, and see if it's okay then. Or perhaps sacrifice a bit of quality and get a conventional MIDI file of it.

Either way, there's nothing you can do to control which media player opens it, other than for yourself on your computer. If the file itself is definitely okay, then maybe it's your Media Player - hang on - I'll try it out on mine.

brothercake
11-16-2003, 08:15 AM
Yeah that tune works okay for me, playing through Windows Media Player 8 for XP. What are you using?