Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What file format does midi refer to?

2025-04-02 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/02 Report--

This article is to share with you about what file format midi refers to. The editor thinks it is very practical, so share it with you as a reference and follow the editor to have a look.

Midi is a file in binary format, the basic structure of this file is generally "file header + data description", and the file header generally includes the type of file, while the data of MIDI is made up of several sub-data of the same format, which records all the information of a track in a multi-track format.

MIDI files are binary files, which generally have the following basic structure: file header + data description file header generally includes the type of file, because Midi files only use. Mid has class 0 and class 1 with an extension, and there are more familiar bitmap file formats, so there are things like file headers.

Unlike the waveform file, the MIDI file does not sample the music, but records each note of the music as a number, so the file is much smaller than the waveform file, which can meet the needs of music for a long time. The MIDI standard specifies the mixing and pronunciation of various tones, and these numbers can be resynthesized into music by an output device.

The main limitation of MIDI music is that it lacks the ability to reproduce real natural sounds, so it cannot be used in situations where voice is needed. In addition, MIDI can only record the limited combination of instruments specified in the standard, and the playback quality is limited by the synthesis chip of the sound card. In recent years, wave table method is widely used in foreign popular sound cards for music synthesis, which greatly improves the music quality of MIDI.

MIDI files have several alternative formats, such as RMI and CIF. The CMF file (creative music format) is a music file used with the Sound Blaster card. The RMI file is a subformat of the RIFF (resource interchange file format) file used by Windows, called RMID, which contains the MIDI file.

The composition of midi format:

The data of MIDI is made up of several sub-data of the same format, which record all the information of a track in the multi-track format. Add one more track and simply append the data to the previous track, but don't forget to change the nn nn (number of tracks) in the file header.

Let's take a look at the global track. The global track includes additional information about the song (such as title and copyright), song speed and system code (Sysx). Whether it is a global track or a track with notes, it starts with "4D 54 72 6B", which is actually the ASCII character "MTrk", followed by a 4-byte integer that marks the number of bytes of the track, excluding the first 4 bytes and its own 4 bytes. We can understand this in later examples.

Then there is the place where the data is recorded, and each data has the same structure: time difference + events. The so-called time difference refers to the number of time from the previous event to that event, and its unit is tick (the minimum time unit of MIDI). Its composition is quite special, and it will be explained in binary here.

Thank you for reading! This is the end of the article on "what file format midi refers to". I hope the above content can be of some help to you, so that you can learn more knowledge. if you think the article is good, you can share it out for more people to see!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report