Figure 7 Playing different instruments: how midi works.
Related Figures (5)
The mlm that have IDI messages are sent as a sequence of one or more bytes. T ollow depend on the type of the message. For instance, the fo he first byte is a com- mand (STATUS) byte, often followed by data (DATA) bytes with additional parameters. The command byte determines the type of the command. The number of DATA bytes lowing two commands different number of data bytes: FF 58 04 04 02 30 08 and 90 3C 28. The main com- mands in midi files are Note-on (0x90) and Note-off (0x80) that al playing a single musical note. There are at least two playing modes, namely mono and poly. Monophonic: the start of a new “note-on” command implies the termination of the previous note. Polyphonic: multiple notes may be sounding at once, until the notes reach the end of their decay envelope, or when explicit “note-off” commands are received. ows starting/stopping Table 1: Understanding delta times in a sequence of events. The main messages are the NOTE ON and NOT] EH} OFF messages. The NOT] EF} ON message is sent when the performer hits a key of the music keyboard. It contains specify the pitch of the note as well as the velocity (i.e. intensity of the note when it is hit). When a synthesizer receives this message, it starts playing that note with the correct pitch and force level. When the NOTE OFF message is received, the corresponding note is switched off by the synthesizer. The channels are numbered 1-16, but their actual corresponding binary encoding is 0-15. MIDI commands can be further decomposed into a command type nibble (four bytes) and a chan nel number nibble (Fig. [2). parameters to Figure 2: Command type nibble (four bytes). Figure 4: Number of ticks for the relative duration of a note. Time value are expressed in terms of the number of ticks. However, the hex-value to record the time value is not obtained just converting the number of ticks. A special format is used, which is referred to Variable Length Values (VLV, see |7| for details). Notice that time values sometime are two bytes in length, and sometimes they are one byte in length. Using more than one byte for the delta time implies a longer time value. For example, here is some data from a simple monophonic MIDI file (in hex): 00 FF 58 04 04 02 30 08 00 FF 59 02 00 00 00 90 3C 28 81 00 90 3C 00 00 90 3C 1E 81 00 90 3C 00 00 90 43 2D 81 00 90 43 00 00 90 43 32 81 00 90 43 00 00 90 45 2D 81 00 90 45 00 00 90 45 32 81 00 90 45 00 00 90 43 23 82 00 90 43 00 00 90 41 32 81 00 90 41 00 00 90 41 2D 81 00 90 41 00 00 90 40 32 40 90 40 00 40 90 40 28 40 90 40 00 40 90 3E 2D 40 90 3E 00 40 90 3E 32 40 90 3E 00 40 90 3C 1E 82 00 90 3C 00 00 FF 2F 00 Do have then to look at the header of the MIDI file to understand what the units mean. For this example, the time units are 128 ticks to the quarter note, so 128 is a quarter note duration, 256 is a half-note, and 64 is an eighth-note duration (Fig. |4). Figure 6: Excerpt of a score presented in Fig. | Figure 5: Excerpt of a score. We are particularly interested in the midi perspective for musicians (2), [7]. Let us take a straightforward example. corresponding notegram (Fig. |6 It is easier to build the MIDI cod ing generating the to excerpt of score displayed in Fig. 5 The list of midi events is 00 90 40 40 00 90 43 40 81 00 80 43 00 00 90 45 40 81 00 80 45 00 00 80 40 00 00 90 3C 40 00 90 47 40 81 00 80 47 00 00 90 48 40 81 00 80 48 00 00 80 3C 40.