MID QB FILE SPECIFICATION ========================= - revision date : 2007-12-09 - 2007-12-09 : updated HO/PO details as per tests by GameZelda, and discussion with Debr5836 (and indirectly, katamakel). Introduction ============ This document describes the specific layout and variable types used in the mid.qb files from Guitar Hero 3 for the PS2. The Xbox/PC (.xen) versions of the mid.qb files are very similar and you will probably be able to use this as a guide for those files too. For more details on the variable types and overall qb file structure, please refer to the qb file specification which can be found here: http://moto-coda.org/gh/qb.spec.txt Some of the following information was collated from the ScoreHero and Frets on Fire forums, as well as a lot of my own theorising and testing. I would like to thank Debr5836, GameZelda and LocalH from the ScoreHero forums, and pudding and YMS from the Frets on Fire forums, for all their help determining the various meanings of certain sections and their ongoing encouragement; JCirri and all the moderators at ScoreHero.com for creating such a great community; and my girlfriend for putting up with me spending days looking at HexDumps and Perl coding. -tma MISC NOTES ========== All held notes appear to be a 1/4 note shorter in the actual game than in this mid file, however the points for the remainder of the hold note are still awarded. No extra star power is awarded for these "hidden" hold sections. In processing some files, notably "One", some hold notes are indicated in the midi file but do not show up in game. This is still a mystery at this time. MID File Basic Structure ======================== (This section is only rough, I will flesh it out more later). The basic structure of the file is as follows: empty section x1 (only on ps2?) guitar notes x4 guitar star power x4 guitar battle mode stars x4 rhythm notes x4 rhythm star power x4 rhythm battle mode stars x4 (unused?) co-op guitar notes x4 co-op guitar star power x4 co-op guitar battle mode stars x4 (unused?) co-op rhythm notes x4 co-op rhythm star power x4 co-op rhythm battle mode stars x4 (unused?) p1 face off active sections x1 p2 face off active sections x1 p1 boss battle active sections x1 (unused?) p2 boss battle active sections x1 (unused?) time signatures x1 fret bars x1 markers x1 - (section names) scripts x1 anim x1 triggers x1 cameras x1 lightshow x1 crowd x1 drums x1 performance x1 scripts x1 anim x1 triggers x1 cameras x1 lightshow x1 crowd x1 drums x1 performance x1 (not sure why the last 8 sections are duplicated, some are nulled in the first batch, and different ones are nulled in the second. go figure). MID File Specific Values ======================== Name: Note Chart Type: ARRAY (0x00010100) Description: groups of 3 x DWORD 1 - time index - milliseconds from start of track 2 - length index - length of note in milliseconds 3 - note pattern and HO/PO status: bit 1 (0b00000001) = green fret bit 2 (0b00000010) = red fret bit 3 (0b00000100) = yellow fret bit 4 (0b00001000) = blue fret bit 5 (0b00010000) = orange fret bit 6 (0b00100000) = toggle HO/PO status for this note A note will automatically be a HO/PO if it is near enough to the previous note, unless it's the same note. Chords to a single note always count as a different note. Only single notes can be a HO/PO, but can follow a chord. Bit 6 will force a note to be a HO/PO, and will also force it to NOT be a HO/PO if it's already one because of proximity to another note. === Name: Star or Battle Phrase Chart Type: ARRAY (0x000C0100) of ARRAYS (0x00010100) Description: one array per star power phrase each phrase is 3 DWORDS 1 - time index - start of phrase in milliseconds from start of track 2 - length - length of the phrase in milliseconds 3 - note count - number of notes in the phrase === Name: Face Off Note Sections Type: ARRAY (0x000C0100) of ARRAYS (0x00010100) Description: There is one of these sections for each player. They describe which sections of the note chart are enabled for that player. Each array contains two DWORD values. 1 - time index - position in ms from start of track 2 - length - length of active note section === Name: Time Signatures Type: ARRAY (0x000C0100) of ARRAYS (0x00010100) Description: This section describes the time signature changes for the song. Each array contains 3 DWORD values. 1 - time - position in ms from start of track 2,3 - define the time signature, e.g. 3 and 4 would indicate 3/4 time. === Name: Fret Bars (beat marker) Type: ARRAY (0x00010100) Description: This array defines the positions of each beat in the song. Each DWORD is a time index in milliseconds describing the beat position. Combined with the time signature section to determine the measures. === Name: Markers (song section markers) Type: array of two variable entries Description: Contains two variables: 1 - integer - "time" - start of section in ms from start of track 2 - checksum var - "marker" - contains a checksum, which in turn contains another checksum which links to a value in the .mid_text.qb file to get the section name. ===