Friday, December 28, 2012

MIDI file format

Outline of the Standard MIDI File Structure
AIBO MIDI File Format
Standard MIDI format : Meta-Events

The MIDI File Format
The data part of a track chunk contains one or more pairs. The <delta_time> is not optional, but zero is a valid delta-time. delta_time is the number of 'ticks' from the previous event, and is represented as a variable length quantity

The MIDI File Format - about MIDI

Standard MIDI-File Format Spec. 1.1
A crash course on the standard MIDI specification
http://www.piclist.com/tecHREF/io/serial/midi/midifile.html
Note names, MIDI numbers and frequencies

Running Status
The MIDI spec allows for a MIDI message to be sent without its Status byte (ie, just its data bytes are sent) as long as the previous, transmitted message had the same Status. This is referred to as running status. Running status is simply a clever scheme to maximize the efficiency of MIDI transmission (by removing extraneous Status bytes). The basic philosophy of running status is that a device must always remember the last Status byte that it received...

MIDI Channel Prefix meta message
The MIDI channel prefix meta message specifies a MIDI channel so that meta messages that follow are specific to a channel.

MIDI SysEx Tutorial
In an effort to bring System Exclusive (SysEx) messages to the masses, I embarked on a mission to produce this tutorial which will help people plumb the depths of this wonderful and powerful area of MIDI... SysEx is the only means of retrieving data from a synth.

General MIDI Controller Events

MIDI File Format - the Sonic Spot
Standard MIDI files provide a common file format used by most musical software and hardware devices to store song information including the title, track names, and most importantly what instruments to use and the sequence of musical events, such as notes and instrument control information needed to play back the song. This standardization allows one software package to create and save files that can later be loaded and edited by another completely different program, even on a different type of computer. Almost every software music sequencer is capable of loading and saving standard MIDI files.

http://www.blitter.com/~russtopia/MIDI/~jglatt/tech/midifile/ppqn.htm
The MIDI file format's Tempo Meta-Event expresses tempo as "the amount of time (ie, microseconds) per quarter note". For example, if a Tempo Meta-Event contains the 3 bytes of 07 A1 20, then each quarter note should be 0x07A120 (or 500,000) microseconds long.

To convert the Tempo Meta-Event's tempo (ie, the 3 bytes that specify the amount of microseconds per quarter note) to BPM:
BPM = 60,000,000/(tt tt tt)
For example, a tempo of 120 BPM = 07 A1 20 microseconds per quarter note.

Parse and analyze a standard MIDI file

  • File format (Type 0, 1, or 2)
  • Number of tracks
  • Number of distinct channels used
  • Number of distinct voices (instruments) used (look for Program Change messages)
  • Number of ticks per quarter note
  • Shortest two non-zero delta times, reported both in ticks and in microseconds (hint: the timing information you need here is derived from information in two distinct places)
  • Top two longest delta times, both in ticks and in microseconds
  • Minimum non-zero note-on velocity, and its channel and note number
  • Maximum note-on velocity, and its channel and note number
  • Total number of meta-events
MIDI Programming - A Complete Study Part 1 - MIDI File Basics

MIDI Pitch Bend
The two bytes of the pitch bend message form a 14 bit number, 0 to 16383. The value 8192 (sent, LSB first, as 0x00 0x40), is centered, or "no pitch bend." The value 0 (0x00 0x00) means, "bend as low as possible," and, similarly, 16383 (0x7F 0x7F) is to "bend as high as possible." The exact range of the pitch bend is specific to the synthesizer.

Understanding MIDI - MIDI Ports, Channels, and the General MIDI Standard

키워드 : midi file format specification, v_time

No comments:

Post a Comment