Roland MPU Song File Format (Unofficial & Preliminary - 09/04/86) Information compiled and fantasized by: David L. Kaleita _______________________________________________________________________ FILE CONTROL BLOCK (FCB) HEADER (at offset zero from bottom of memory): Byte: 0 1 2 3 Address: $00 $FD $46 $51 $31 (header) (ASCII `F') (ASCII `Q') (ASCII `1') $04 MIDI Channel of Song Track #1 $05 MIDI Channel of Song Track #2 $06 MIDI Channel of Song Track #3 $07 MIDI Channel of Song Track #4 $08 MIDI Channel of Song Track #5 $09 MIDI CHannel of Song Track #6 $0A MIDI Channel of Song Track #7 $0B MIDI CHannel of Song Track #8 ...where $90-$9F indicates MIDI channels #1-#16 respectively; $00 indicates to use the actual MIDI channel specified in the MIDI data in the file for that track.* $0C Number of notes upward transposition of Song Track #1 $0D Number of notes upward transposition of Song Track #2 $0E Number of notes upward transposition of Song Track #3 $0F Number of notes upward transposition of Song Track #4 $10 Number of notes upward transposition of Song Track #5 $11 Number of notes upward transposition of Song Track #6 $12 Number of notes upward transposition of Song Track #7 $13 Number of notes upward transposition of Song Track #8 ...where $00 = no transposition, $01 = 1 note upward transposition, $0C = 1 octave (12 note) upward transposition, $18 = 2 octave (24 note) upward transposition, $F4 = 1 octave downward transposition, etc. $14 Velocity scaling factor for Song Track #1 $15 Velocity scaling factor for Song Track #2 $16 Velocity scaling factor for Song Track #3 $17 Velocity scaling factor for Song Track #4 $18 Velocity scaling factor for Song Track #5 $19 Velocity scaling factor for Song Track #6 $1A Velocity scaling factor for Song Track #7 $1B Velocity scaling factor for Song Trcak #8 ...where $FF indicates no scaling, $7F indicates that all velocity data in that song track is to be scaled down by a factor of 2 (i.e., halved), etc. In other words, this entry indicates the FULL SCALE of allowable velocity data in the indicated track, with all velocity data in that track scaled down to be within that full scale limit. This is done by multiplying the actual song track velocity data by and then dividing that number by the full scale limit of <$FF+1>. $1C-$24 (unused)* $26 $tt $tt $uu $ll (Time Base, (Tempo (uu=upper (ll=lower 8 bits) 8 bits) Time Signature; Time Signature; "METRO/MEAS") "MIDI/METRO") $2A-$8F (unused) _______________________________________________________________________ TRACK HEADER (at top of each track of file): Byte: 0 1 2 3 Address: $00 $FD $50 $ll $hh (header) (ASCII `P') (phrase #, low) (phrase #, high) $04 ------------------- MIDI DATA ------------------ $?? ---------------$xx $FC $FE (last timing) (end of data) (ack)* $?? + 4 (next phrase... etc.) _______________________________________________________________________ NOTES: * - IMPORTANT: All above information that is identified with an asterisk ("*") is my best GUESS as to what Roland is using these bytes for in their MPS software. If anyone can supply better information than what I have indicated (or can positively confirm or deny my suspicions), PLEASE CONTACT ME so I can update this file accordingly. COMMENTS: The above song file format includes a FILE CONTROL BLOCK which appears only once at the beginning of a song file. For now, do not use any of the bytes marked "unused" for anything critical. The FCB lets the program know the number of tracks in a song (up to 255), the tempo, and the time signature (up to 15/16 time). After the FCB and before each track comes the TRACK HEADER which is only four bytes long and indicates the number of the next track. Each track ends with a timing byte and an $FC. The file structure for the music itself is explained in the MPU-401 Technical Reference Manual that comes with every MPU-401. IDENTIFIED SHORTCOMINGS WITH THIS PRELIMINARY SPECIFICATION: 1) Conductor Track is not specified. (The method used to identify one of the 255 Tracks as the Conductor Track is not understood at this time). 2) A method to specify time signature change within a Track is not indicated. SAMPLE MPU SONG FILE: Test MPS sng file. 8 traks of one bar assigned to CH1-8 (actual data not affected). Tempo-100, Time Base 192, trak 2/3 transposed by 1/2 octaves resp, trak 4/5/6 vel changed to 200/180/160 resp. Addr 0 1 2 3 4 5 6 7 8 9 A B C D E F ---- ---- ---- ---- ---- ---- ---- ---- ---- 0000 FD46 5131 9091 9293 9495 9697 000C 1800 FCB Header & MIDI assignment 0010 0000 0000 FFFF FFC8 B4A0 FFFF FF00 0000 Transposition & Velocity data 0020 0000 0000 0000 C064 0404 0000 0000 0000 Time Base & Tempo data 0030 0000 0000 0000 0000 0000 0000 0000 0000 0040 0000 0000 0000 0000 0000 0000 0000 0000 0050 0000 0000 0000 0000 0000 0000 0000 0000 0060 0000 0000 0000 0000 0000 0000 0000 0000 0070 0000 0000 0000 0000 0000 0000 0000 0000 0080 0000 0000 0000 0000 0000 0000 0000 0000 0090 FD50 0000 0090 3C78 002D 783C 3C00 003E Track #1 Header & Data 00A0 783C 3E00 002D 0000 4078 0030 783C 4000 00B0 0041 783C 0000 0030 0000 4100 0043 7800 00C0 3478 3C43 0000 4578 3C45 0000 3400 0047 00D0 7800 3778 3C47 0000 4878 3C00 0000 3700 00E0 0048 0000 F900 FCFE 0000 0000 0000 0000 00F0 FD50 0001 0090 3C78 002D 783C 3C00 003E Track #2 Header & Data 0100 783C 3E00 002D 0000 4078 0030 783C 4000 0110 0041 783C 0000 0030 0000 4100 0043 7800 0120 3478 3C43 0000 4578 3C45 0000 3400 0047 0130 7800 3778 3C47 0000 4878 3C00 0000 3700 0140 0048 0000 F900 FCFE 0000 0000 0000 0000 0150 FD50 0002 0090 3C78 002D 783C 3C00 003E Track #3 Header & Data 0160 783C 3E00 002D 0000 4078 0030 783C 4000 0170 0041 783C 0000 0030 0000 4100 0043 7800 0180 3478 3C43 0000 4578 3C45 0000 3400 0047 0190 7800 3778 3C47 0000 4878 3C00 0000 3700 01A0 0048 0000 F900 FCFE 0000 0000 0000 0000 01B0 FD50 0003 0090 3C78 002D 783C 3C00 003E Track #4 Header & Data 01C0 783C 3E00 002D 0000 4078 0030 783C 4000 01D0 0041 783C 0000 0030 0000 4100 0043 7800 01E0 3478 3C43 0000 4578 3C45 0000 3400 0047 01F0 7800 3778 3C47 0000 4878 3C00 0000 3700 0200 0048 0000 F900 FCFE 0000 0000 0000 0000 0210 FD50 0004 0090 3C78 002D 783C 3C00 003E Track #5 Header & Data 0220 783C 3E00 002D 0000 4078 0030 783C 4000 0230 0041 783C 0000 0030 0000 4100 0043 7800 0240 3478 3C43 0000 4578 3C45 0000 3400 0047 0250 7800 3778 3C47 0000 4878 3C00 0000 3700 0260 0048 0000 F900 FCFE 0000 0000 0000 0000 0270 FD50 0005 0090 3C78 002D 783C 3C00 003E Track #6 Header & Data 0280 783C 3E00 002D 0000 4078 0030 783C 4000 0290 0041 783C 0000 0030 0000 4100 0043 7800 02A0 3478 3C43 0000 4578 3C45 0000 3400 0047 02B0 7800 3778 3C47 0000 4878 3C00 0000 3700 02C0 0048 0000 F900 FCFE 0000 0000 0000 0000 02D0 FD50 0006 0090 3C78 002D 783C 3C00 003E Track #7 Header & Data 02E0 783C 3E00 002D 0000 4078 0030 783C 4000 02F0 0041 783C 0000 0030 0000 4100 0043 7800 0300 3478 3C43 0000 4578 3C45 0000 3400 0047 0310 7800 3778 3C47 0000 4878 3C00 0000 3700 0320 0048 0000 F900 FCFE 0000 0000 0000 0000 0330 FD50 0007 0090 3C78 002D 783C 3C00 003E Track #8 Header & Data 0340 783C 3E00 002D 0000 4078 0030 783C 4000 0350 0041 783C 0000 0030 0000 4100 0043 7800 0360 3478 3C43 0000 4578 3C45 0000 3400 0047 0370 7800 3778 3C47 0000 4878 3C00 0000 3700 0380 0048 0000 F900 FCFE 3C4A 0000 4C50 7800