Playing of MIDI music files in HTML5 Audio Era

Source: Internet
Author: User

As we all know, HTML5 Audio labels support wav, webm, mp3, ogg, acc and other formats, but there is a very important music file format midi (extension mid) however, there is no built-in support in various browsers, because the mid file does not record the sound sampling information as other sound files, but records the playing instructions of the instrument. The two principles are completely different.

The most prominent part of the mid file format is that the file size is very small. The music for a few minutes may only contain a few KB of file size, and other formats such as mp3 must be at least a few MB, therefore, midi has great advantages on mobile phones and web, especially suitable for making various ringtones and background music.

<Bgsound> labels are outdated and are no longer supported by many browsers.

Both standard organizations and browser vendors advocate the use of <audio> to play audio files.

Considering the widespread demand for support for MIDI, W3C has appointed a draft Web midi api, which is still very new and not supported by browsers.

To enable midi to be played on html5 audio, Javascript must be used for processing.

 


Here I recommend three very good Javascript-implemented audio playing midi:

 


MIDI. js-Sequencing in Javascript.


This is a js library that encapsulates some interfaces for web developers to call to play mid music files.

 

 

 

Color Piano V2

This is a colorful piano. You can play it manually or automatically play the Dynamically Loaded mid file.

 

 

 

Audiotool


This is a powerful electronic music synthesis tool. If you have no knowledge of instrumental music, you may not be familiar with it, for example, me.

 
Author: cuixiping
 


 

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.