MIDI WONDERLAND
|
|
Midi Instructions and JavaScripts
BEST VIEWED USING IE 4+
A BRIEF TUTORIAL ON HOW TO USE MIDI FILES IN WEB PAGES AND A SMALL COLLECTION OF MIDI RELATED JAVASCRIPTS FOR USE IN WEB PAGE DEVELOPMENT. I INCLUDE
CREDIT TO THE AUTHORS WHENEVER I HAVE THE INFORMATION.
FEEL FREE TO
SEND ME ANY SCRIPTS YOU MAY HAVE OR
THE LINKS WHERE TO FIND THEM.
MIDI PLAYER EXAMPLES
RANDOM MIDI PLAYER
MIDI PLAYER EXAMPLES
SIMPLY CUT AND PASTE THE CODE INTO YOUR HTML
Various Audio <EMBED> Examples
Here you'll find several examples of how to EMBED a MIDI or another sound file on your HTML pages.
Note that these only work with Netscape 3.0 and its built in LiveAudio feature. The results will be different if one uses MS Internet Explorer or if one has a 3rd party MIDI plugin.
Here's a brief overview of some of the OPTIONS:
Hidden="TRUE | FALSE": If set to TRUE, no control box will be visible or placed.
Height="XXX" Width="YYY": These allows you to control the dimensions of the control panels if visible.
Loop="TRUE | FALSE": This allows you to loop the song. Set it to FALSE if you only want it to play once.
Volume="XXX" Use the VOLUME option to set the initial playback level of the sound file. You can specify a range from 0 to 100.
AutoStart="TRUE | FALSE" Set AutoStart to TRUE if you want the song to automatically begin playing when it loads. If set to false,
the visitor has to hit the playbutton in order to start the song.
And now, the examples... :
Standard Console
<EMBED SRC="songs/EternalFlame.mid" Hidden="FALSE" AutoStart="FALSE" Volume="75" Loop="FALSE" Height="60" Border="0" Width="145" Controls="TRUE">
Small Console
<EMBED SRC="songs/EternalFlame.mid" Hidden="FALSE" AutoStart="FALSE" Volume="75" Loop="FALSE" Height="15" Border="0" Width="145" Controls="SmallConsole">
Play Button Only
<EMBED SRC="songs/EternalFlame.mid" Hidden="FALSE" AutoStart="FALSE" Volume="75" Loop="FALSE" Height="24" Border="0" Width="35" Controls="PlayButton">
RETURN TO TOP
RANDOM MIDI PLAYER
SIMPLY CUT AND PASTE THE CODE INTO YOUR HTML
JavaScript provided by
The JavaScript Source
<!-- ONE STEP TO INSTALL RANDOM MIDI:
1. Paste the coding into the BODY of your HTML document -->
<!-- STEP ONE: Put this code into the BODY of your HTML document -->
<BODY>
<CENTER>
<SCRIPT LANGUAGE="JavaScript">
<!-- This script and many more are available free online at -->
<!-- The JavaScript Source!! http://javascript.internet.com -->
<!-- Begin
nummidi = 3
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=("mid1.mid")
if (x == (2))
midi=("mid2.mid")
if (x == (3))
midi=("mid3.mid")
document.write('<EMBED SRC= ' + midi + ' autostart=true loop=true ')
document.write('volume=100 align="center" width=50 height=15 controls=smallconsole>')
// End -->
</SCRIPT>
</CENTER>
<p><center>
<font face="arial, helvetica" size="-2">Free JavaScripts provided<br>
by <a href="http://javascriptsource.com">The JavaScript Source</a></font>
</center><p>
<!-- Script Size: 0.83 KB -->
RETURN TO TOP