Skip to content

Commit

Permalink
update m2.md
Browse files Browse the repository at this point in the history
  • Loading branch information
ZILtoid1991 committed Feb 27, 2024
1 parent 478ff95 commit 693be96
Showing 1 changed file with 22 additions and 2 deletions.
24 changes: 22 additions & 2 deletions docs/formats/m2.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Pre-implementation versions included:

# Magic bytes

Every binary m2 file must begin with `MIDI2.0`, and a file version identifier byte (zero for first initial version). Textual m2 files begin with `MIDI2.0 VER 1`, where `1` must be substituted with current version of the file.
Every binary m2 file must begin with `MIDI2.0B`, and a file version identifier word (32 bits, zero for first initial version). Textual m2 files begin with `MIDI2.0 VER 1`, where `1` must be substituted with current version of the file.

# Human-readable format

Expand All @@ -35,7 +35,27 @@ The note describing character sequence consists of
* a symbol (either `-` or `#`),
* one or more numbers (-1 octave is symbolized as `00`)

Examples: `c#000`, `d-5`, `A#3`.
Examples: `c#00`, `d-5`, `A#3`.

## Velocity format

Velocity can be entered as:
* a decimal number,
* a hexadecimal number,
* a letter combination (case insensitive) borrowed from music notation.

### Recognized letter combinations

* pppp = 0x00 / 0x/00_00
* ppp = 0x0f / 0x00_ff
* pp = 0x1f / 0x22_ff
* p = 0x2f / 0x44_ff
* mp = 0x3f / 0x66_ff
* mf = 0x4f / 0x88_ff
* f = 0x5f / 0xaa_ff
* ff 0x6f / 0xcc_ff
* fff = 0x70 / 0xee_ff
* ffff = 0x7f / 0xff_ff

## Rhythm format

Expand Down

0 comments on commit 693be96

Please sign in to comment.