MIDI music file playback in the HTML5 audio era

MIDI music file playback in the HTML5 audio era

Source: Internet
Author: User

As we all know, HTML5 audio tag can support WAV, WEBM, MP3, OGG, ACC and other formats, but there is a very important music file format midi (extension mid) But there is no built-in support in the major browsers, Because the mid file does not record the sound's sampled information like other sound files, it records the instrument's performance instructions, which differ in principle. The most prominent bit of the mid file format is that the file is extremely small, and a few minutes of music may only

  

As we all know, HTML5 audio tag can support WAV, WEBM, MP3, OGG, ACC and other formats, but there is a very important music file format midi (extension mid) But there is no built-in support in the major browsers, Because the mid file does not record the sound's sampled information like other sound files, it records the instrument's performance instructions, which differ in principle.

Mid file format the most prominent is a little file, a few minutes of music may only a few K file size, MP3 and other formats are at least a few more than a few m, so MIDI in the mobile phone and the web has a great advantage, especially suitable for doing a variety of ringtones, background music.

The label is obsolete and many browsers are no longer supported.

Both standard organizations and browser vendors advocate the use of audio files for playback.

Given the wide range of calls for support for MIDI, the website has designated a draft web MIDI API, but the draft is also very new and browsers are not yet supported.

In order for MIDI to play on HTML5 audio, you need to use JavaScript to handle it.

I recommend here 3 very good JavaScript implementations of audio playback MIDI:

Midi.js-sequencing in Javascript.

This is a JS library that encapsulates a number of interfaces to facilitate web developer calls to play mid music files.

Color Piano V2

This is a color piano, you can play it manually, or you can automatically play a dynamically loaded mid file.

Audiotool

This is a powerful electronic music synthesis tool, without a bit of instrumental knowledge, may not understand the basic use, such as me.

This article from Cuixiping's blog, the original address: http://blog.csdn.net/cuixiping/article/details/7826138

Large-Scale Price Reduction
  • 59% Max. and 23% Avg.
  • Price Reduction for Core Products
  • Price Reduction in Multiple Regions
undefined. /
Connect with us on Discord
  • Secure, anonymous group chat without disturbance
  • Stay updated on campaigns, new products, and more
  • Support for all your questions
undefined. /
Free Tier
  • Start free from ECS to Big Data
  • Get Started in 3 Simple Steps
  • Try ECS t5 1C1G
undefined. /

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.