About MIDI Files
MIDI (musical instrument digital interface) is a technical standard that describes a communications protocol, digital interface, and electrical connectors that connect a wide variety of electronic musical instruments, computers, and related audio devices for playing, editing, and recording music.
A MIDI file is a format that stores and exchanges the data. Advantages of MIDI include small file size, ease of modification and manipulation and a wide choice of electronic instruments and synthesizer or digitally sampled sounds.
MIDI technology was standardized in 1983 by a panel of music industry representatives, and is maintained by the MIDI Manufacturers Association (MMA).
Embedding MIDI Files on a Web Page
The HTML audio tag does not support the MIDI format so an external JavaScript-based player is required.
- In the <head> section place the link to the player's script:
<script src="https://www.midijs.net/lib/midi.js"></script>
- A free fontawesome kit is required to display the icons.
- Place the player where you want it on the page. All you need to change is the MIDI file name and/or URL. You can modify the style to match your page.
<div style="padding:3px; background-color:#eeeeee; border-radius:10px; font-size:24px; width:210px; height:26px; position:relative;">
<a href="javascript:MIDIjs.play('midi_files/chicago.mid');"><i class="far fa-play-circle" style="color:#000000;"></i></a> <a href="javascript:MIDIjs.stop();"><i class="far fa-pause-circle" style="color:#000000;"></i></a> <div style="position:absolute;right:5px;top:2px;"><a href="midi_files/chicago.mid"><i class="fas fa-download" style="font-size:20px;color:#000000;"></i></a></div></div>
MIDI Files Examples
About MOD Files
MOD files or modules are a family of music files, which all originated back on the computer known as the Commodore Amiga. It is a synthesized audio like MIDI but includes digital sampling as well. The instruments come bundled with the module file so no matter where you play it, it will always sound the same (unlike relying on MIDI wave-table samples, which vary between sound cards). MOD files bear the extensions .mod, .s3m, .xm ot .it.
Embedding MOD Files on a Web Page
It is extremely difficult to embed a native module audio file on a web page. One way is to convert into MIDI as it preserves the small file size but gives results not comparable in quality to the original. Another way is to convert it into a digital format like MP3 and use a compatible HTML5 player. Unfortunately this will increase the file size by a considerable factor(40KB becoming 2.5MB for example). The OpenMPT software can play native module files as well as export as MIDI or a digital format.
MOD Files Examples
The download icon will download the original MOD file.