Back Programming Next

Articles Index

The Music Data Base is the third - and last - Yamaha-chunk in a style file following the OTS data.

MDB Editor software program.

This Music Data Base is stored in the style file, and must not be mixed up with Music Finder Data, which is stored in the keyboard. Read here.

The MDB section has a chunk identifier; and a number of records.

To demonstrate, this is the MDB section in a 4 style file; which opened in a hex editor looks like this:

TIP:
Read Hex Numbers for converting between hexadecimal and decimal numbers.

MDB Section Format

Lets take a closer look at the section!

MDB Section Format

At position 12 in the first line comes the 4 byte chunk identifier = "FNRc"

Then the 4 byte length (red underlined) of the entire MDB chunk - not including the chunk identifier and this 4 "length" bytes.
In this case: "00 00 01 6A" (hex) = (0 * 256 * 256 * 256) + (0 * 256 * 256) + (1 * 256) + 106 = 362 bytes.

Next is the record identifier "FNRP" (green underlined) and the length of the record (blue underlined) - not including the record identifier and this 4 "length" bytes.
The record length is 4D (hex) = 77 (dec) bytes.

Then 3 bytes "0C 0B E1" (orange underlined) which defines the tempo calculated as:
Tempo = 60000000 / (1.byte * 256 * 256 + 2.byte * 256 + 3.byte)
In this case - when remembering to convert the hexadecimal values to decimal - the result is:
Tempo = 60000000 / (12 * 256 * 256 + 11 * 256 + 225) = 60000000 / 789473 = 76

Next 2 bytes "04 04" (black underlined) which defines the Time Signature. In this case 4/4 - no calculations required...!

Next 8 bytes "4D 6E 61 6D 00 00 00 0F" (yellow underlined) which is the Music Name (Song Title) identifier "Mnam" and the length of Music Name. In this case "0F" (hex) = 15 (dec)

Next the 15 bytes defining the song title = "As Time Goes By".

In a similar way comes
• Genre (identifier "Gnam") - violet underlined. The record reads: "All Time Hits"
• Keyword1 (identifier "Kwd1") - light green underlined. The record reads: "40,movie,sam"
• Keyword2 (identifier "Kwd2") - pink underlined. The record reads: ""

Notice that there is no data in Keyword2 (data length = 0).