Embedding more than one midi file

liunx

Guest
Is it possible to have more than one embedded midi on a page and have them run infinate loop like when you have one midi ?<br />
<br />
If so, please do tell and provide the HTML code to do it<br />
<br />
Thanks<br />
Luke (Neil NSW Australia)<!--content-->no, you can only embed 1 song at a time.<!--content-->silly me, only been dealing with sound files forever but didnt think "outside the box" when dealing with HTML coz it scares me !!<br />
<br />
easy to have multiple songs running on a single web page, just make the wavs into one single wav, job done !!!<!--content-->Using Embed and Meta Refresh this script will<br />
play any number of random midis one after another:<br />
<br />
<SCRIPT TYPE="text/javascript"><br />
/*************************************<br />
written by:[email protected]<br />
<!-- m --><a class="postlink" href="http://www.angelfire.com/art/img/">http://www.angelfire.com/art/img/</a><!-- m --><br />
<br />
<br />
var numsong equals number of songs<br />
midi=(your song url)<br />
song=(your song title)<br />
time=(number of seconds song plays)<br />
URL=(your midiplayer addy)<br />
<br />
**************************************/<br />
<br />
var numsong=6<br />
play=Math.round(Math.random()*numsong)<br />
if (play == 1)<br />
{<br />
midi=("BlueJeans.mid")<br />
song=("Baby Got Her Bluejeans On")<br />
time=("200")<br />
}<br />
else if (play == 2)<br />
{<br />
midi=("BootSctn.mid")<br />
song=("Boot Scootin'")<br />
time=("200")<br />
}<br />
else if (play == 3)<br />
{<br />
midi=("GoodbyeEarl.mid")<br />
song=("GoodBye Earl")<br />
time=("250")<br />
}<br />
else if (play == 4)<br />
{<br />
midi=("HighwayMan.mid")<br />
song=("Highway Man")<br />
time=("180")<br />
}<br />
else if (play == 5)<br />
{<br />
midi=("Trouble.mid")<br />
song=("There's Your Trouble")<br />
time=("190")<br />
}<br />
else if (play == 6)<br />
{<br />
midi=("Wabash.mid")<br />
song=("Wabash Cannonball")<br />
time=("150")<br />
}<br />
<br />
document.write('<meta http-equiv="refresh" content="' + time + ';URL=http://transload.net/~cyberrite/Willy/Codes/MidiPlayer3.shtml">');<br />
document.write('<EMBED SRC= <!-- m --><a class="postlink" href="http://www.htmlforums.com/archive/index.php/">http://www.htmlforums.com/archive/index.php/</a><!-- m -->"' + midi + '" HIDDEN="TRUE" AUTOSTART="TRUE" LOOP="FALSE" VOLUME="100%">');<br />
document.write('<br><b><font color="#0000FF">Now Playing:</font></b><i> ' + song + '</i> ');<br />
</SCRIPT><br />
<br />
<br />
<!-- m --><a class="postlink" href="http://www.transload.net/~cyberrite/Willy/Codes/MidiPlayer3.shtml">http://www.transload.net/~cyberrite/Wil ... yer3.shtml</a><!-- m --><!--content-->yeah but you are not listening to more than one song when the page loads, it has to refresh. that is wasy to do as you can make them random as well. he wanted them to play one right after the other without a refresh.<!--content-->I Amyofatha writes in part:<br />
Is it possible to have more than one embedded midi on a page and have them run infinate loop like when you have one midi ? <br />
Perhaps my comprehension has become flawed but:<br />
It appears to me that the OP is requesting a script<br />
which allows numerous midi's to play one after another,<br />
as opposed to one midi continuously looping.<br />
<br />
Scout writes in part:<br />
yeah but you are not listening to more than one song when the page loads,<br />
Of course you can not listen<br />
to more than one midi at a time.<br />
If that was possible PIP would be<br />
elevated to new heights of irritation.<br />
<br />
Scout writes in part:<br />
he wanted them to play one right after the other without a refresh.<br />
Sorry, I missed that stipulation. :eek: <br />
But, using refresh is the trick to playing<br />
more than one midi on a page (or throughout site)<br />
However, to prevent the page itself from refreshing<br />
(flickering) the script needs to be placed in either a:<br />
<br />
FRAMESET with the midiplayer in a small frame (1%)<br />
and the content in a larger frame (99%)<br />
<br />
IFRAME using style and setting visibility:hidden<br />
<br />
EXTERNAL .JS placed in the body and called onLoad<br />
<br />
Scout writes in part:<br />
that is wasy to do as you can make them random as well<br />
I didn't comprehend this statement<br />
but the script does play randomly and<br />
can easily be modified to play sequentially ;) <br />
<br />
.....Willy<!--content-->
 
Back
Top