Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how to play more than 1 midi file

Status
Not open for further replies.

tmryan2

Programmer
Jun 5, 2000
16
CA
<br>I use the following code to play a midi file on a web page:<br><br>&lt;embed src=&quot;file1.mid&quot; Autostart=&quot;TRUE&quot; LOOP=FALSE TYPE=&quot;audio/midi&quot;&gt;<br><br>However, is there a way to play more than one midi on the same web page? ie. play file1.mid, then play file2.mid, then file3.mid, etc...?<br><br><br>
 
You can play multiple files, but you want to do one of a few things.&nbsp;&nbsp;<br><br>1)&nbsp;&nbsp;Have it so that they can chose the file.&nbsp;&nbsp;Create a drop down list that will run a specific midi.&nbsp;&nbsp;Just create a drop list and depending on which song they chose, have a &quot;Switch&quot; statement play that embedded midi.&nbsp;&nbsp;(might want to cache them first.)<br><br>2)&nbsp;&nbsp;Have a script play a random file.&nbsp;&nbsp;You can create a script that grabs a number between 1 - 10 and assign a different embed to each number.&nbsp;&nbsp;<br><br>3)&nbsp;&nbsp;Have a script play one file after another finishes.&nbsp;&nbsp;This will need a lengthy script, but time the songs and create a script using window.setTimeOut() to start another song just after another ends.<br><br>Email me at <A HREF="mailto:Lordhollow@aol.com">Lordhollow@aol.com</A> if you need more information.<br><br>Jonathan<br><br>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top