Music and sounds : Editing and inserting a MIDI file
Contents ]
Eric Chautrand

Embedding the MIDI file for Netscape Navigator

Our next task is to create the son-a02-netsc.htm page which will be displayed for Netscape users.

To insert the MIDI file into your page, add the following instruction between the <BODY> and </BODY> tags:

<EMBED src="Myfile.mid" width="128" height="96" autostart="true" starttime="01:11" endtime="01:23" controls="console" loop="2" volume="75">

All the values highlighted (in red) in the above code snippet can be adapted to your desired incorporation:

  • Myfile.mid is the name of the MIDI file.

  • Make sure you specify the complete path to the file, if needed.

  • 128 and 96 respectively set the width and the height of the displayed controller.

  • If you want to hide the controller, do not assign any values between the quotes (width="" height="")

  • The value true assigned to the autostart attribute makes the file playback start as soon as the page is loaded (assign false if you do not want this behaviour).

  • With loop = 2, the MIDI file playback occurs twice.

  • You can choose any value you want.

  • controls="console" will display the console for controlling the sequence playback.

  • The starttime and endtime parameters respectively set the MIDI file playback start and end points (here, the sequence starts at 1:11 mn and stops at 1:23 mn).

  • 75 sets the volume level.

  • You can choose any value between 0 and 128.

Pay attention to the path. If the MIDI file and the HTML page referring to it are not located in the same folder, specify the complete path to the midifile.