Guitar Pro 4.06 File Format Description

GUITAR PRO FILE FORMAT v4.06

Version: 1.0RC1 English
Author: Laurent Vromman
Translator: Avery Ceo, Matthieu Wipliez
Conversion to HTML: Mauricio Gracia Gutiérrez (corrections, added information)
Property Of: Arobas-Music

Summary


I. GENERAL
II. VERSIONS
III. FILE STRUCTURE
IV. HEADERS
1. Version
2. Information about the piece
3. Lyrics
4. Other information about the piece
V. FILE BODY
1. Measures
2. Tracks
3. Measure-Track pairs
4. Beats
5. Chord diagrams
6. Effects on the beats
7. Mix table change event
8. Notes
9. Effects on the notes
a. Effects on the notes
b. Grace notes
10. Bends
VI. CHORDS DIAGRAMS

I. GENERAL


Values of type "integer" are stored in 4 bytes.
Values of type "short int" are stored in 2 bytes.
Values of type "byte" are stored in 1 byte.

Values of type "integer" and "byte" presented in this document
are written from left to right of the the LSB (least significant byte)
to the MSB (most significant byte).

The colors are stored in 4 bytes in the following way, the data is written from left to right of
the LSB (least significant byte) to the MSB (most significant byte):
   __
3 |__| <- White byte, it always evaluates to 0x00;
2 |__| <- Blue;
1 |__| <- Green;
0 |__| <- Red.
When this document uses the expression "character string," it means a couple of
a first byte encoding the number 'n' of characters in the string (consequently limited to 255 characters),
followed by the 'n' characters themselves.

The musical notes are stored as integers. The value of the C(0) is 0, and each incrementation of
the variable represents a half tone:
- C#(0) = 1;
- C (1) = 12;
- E (2) = 28 ...
Summary

II. VERSIONS

The Guitar Pro format has evolved with the program to integrate the new functionalities that it provides.

This document describes the structure of the Guitar Pro version 4.06 files only.

Summary

III. File Structure


_______________________________________________________
| | |
| | Version |
| |_______________________________________________|
| | |
| | Tablature |
| |_______________________________________________|
|Headers| |
| | Lyrics |
| |_______________________________________________|
| | |
| | Other Tablature Information |
|_______|_______________________________________________|
File | | |
| | Measures |
| |_______________________________________________|
| | |
| | Tracks |
| |_______________________________________________|
| | | | |
| | | | Note 1 |
|Body | | Beat 1 |_______________|
| | | | |
| | | | Note i ... |
| | Measure-Track |_______________|_______________|
| | Pairs | | |
| | | | Note 1 |
| | | Beat i ... |_______________|
| | | | |
| | | | Note i ... |
|_______|_______________|_______________|_______________|
| |
| Chord Diagrams |
|_______________________________________________________|

Summary

IV. HEADERS


The difficulty in reading about the Guitar Pro files resides in the variable
size of the file's header. Reading the file must therefore be done sequentially.


	Structure
_
|
| Version
|_
|
| Tablature Information
|_
|
| Lyrics
|_
|
| Other Tablature Information
|_

Summary

1. Version


0x00000000: 30 character string (not counting the byte announcing the real length of
the string as explained in I. GENERAL) representing the version number. Only the first n
characters (n being given by the value described previously) characters are considered.
The different values possible at this time are:
FICHIER GUITARE PRO v1
FICHIER GUITARE PRO v1.01
FICHIER GUITARE PRO v1.02
FICHIER GUITARE PRO v1.03
FICHIER GUITARE PRO v1.04
FICHIER GUITAR PRO v2.20
FICHIER GUITAR PRO v2.21
FICHIER GUITAR PRO v3.00
FICHIER GUITAR PRO v4.00
FICHIER GUITAR PRO v4.06
FICHIER GUITAR PRO L4.06

*Translator's Note: "Fichier" is French for "File".  It is left untranslated above, as 
the program expects the string in French.
Only the specifications relating to version "FICHIER GUITAR PRO v4.06" are described here.
After this point (0x0000001F), the data is written sequentially without a precise address.


Summary

2. Information About the Piece


The follollowing information is presented in the form of a block of data containing:
- an integer representing the size of the stored information + 1;
- the string of characters representing the data
This structure requires that a null string be written 01 00 00 00 00 in the file.
The information concerned is, in order of reading within the file:
- The title of the piece;
- The subtitle of the piece;
- The interpret of the piece;
- The album from which the piece was taken;
- The author of the piece;
- The copyright;
- The name of the author of the tablature;
- An 'instructional' line about the tablature.
The following section contains information regarding the 'notice' (note) field in the piece's properties.
It begins with an integer containing the number of lines of Nb_Notice notes, then Nb_Notice instances of
the structure previously described, each containing lines of notes.
The file then contains a byte determining the 'TripletFeel' attribute of the piece.  
If TripletFeel is activated, the value is 1. If not, the integer value is 0.

Summary

3. Lyrics

	
The next section of the file contains the lyrics associated with the piece.
WARNING: The strings presented in this section and in this section only do not conform to the 
format presented in "I. General", but are written directly.
The lyrics section begins with an integer giving the number of the track with which the 
lyrics are associated.
Then, for each of the 5 lines of lyrics generated by Guitar Pro 4, the file contains an 
integer representing the number of characters in the string followed by the character string itself.

Summary

4. Other information about the piece

	
The next data is:

The tempo: Integer

The key: Byte
This value encodes the key (signature) at the beginning of the piece. It is encoded as:
- 0: C
- 1: G (#)
- 2: D (##)
- -1: F (b) ...

The Octave: Byte
The standard value is 0. It becomes 8 if the sheet is to be played one octave higher (8va).

This functionality is not yet used, but is presented as a preview of a revision of the GP4 format.

Midi Channels:
Table of midi channels. There are 4 ports and 16 channels, the channels are stored in this order:
port1/channel1 - port1/channel2 ... port1/channel16 - port2/channel1 ...

Each element of the table has the following form:
Instrument: Integer
Volume: Byte
Balance: Byte
Chorus: Byte
Reverb: Byte
Phaser: Byte
Tremolo: Byte

blank1: byte => Backward compatibility with version 3.0
blank2: byte => Backward compatibility with version 3.0

Number of Measures: Integer
Number of Tracks: Integer

Summary

V. FILE BODY

	 _________________________________
|
| Mesures
|_________________________________
|
| Tracks
|_________________________________
| | |
| | | Note 1
| | Beat 1 |_
| | |
| | | Note i ...
| Measure-track |_______________|_
| Pairs | |
| | | Note 1
| | Beat i ... |_
| | |
| | | Note i ...
|_______________|_______________|_



Summary

1. Measures

	
The measures are written one after another, their number having been specified previously.

The first byte is the measure's header. It lists the data given in the current measure.
__
7 |__| <- Presence of a double bar;
6 |__| <- Tonality of the measure;
5 |__| <- Presence of a marker;
4 |__| <- Number of alternate ending;
3 |__| <- End of repeat;
2 |__| <- Beginning of repeat;
1 |__| <- Denominator of the (key) signature;
0 |__| <- Numerator of the (key) signature.

Each of these elements is present only if the corresponding bit is a 1.

The different elements are written (if they are present) from lowest to highest bit.

Exceptions are made for the double bar and the beginning of repeat whose sole presence
is enough, complementary data is not necessary.

Numerator of the (key) signature: Byte
Numerator of the (key) signature of the piece

Denominator of the (key) signature: Byte
Denominator of the (key) signature of the piece

End of repeat: Byte
Number of repeats until the previous Beginning of repeat.
Nombre de renvoi jusqu'au début de renvoi précédent.

Number of alternate ending: Byte
The number of alternate ending.

Marker:
The markers are written in two steps. First is written an integer equal to
the marker's name length + 1, and then a string containing the marker's
name. Finally the marker's color is written.

Tonality of the measure: Byte
This value encodes a key (signature) change on the current piece.
It is encoded as:
- 0: C
- 1: G (#)
- 2: D (##)
- -1: F (b) ...

Summary

2. Tracks


The tracks are written one after another, their number having been specified previously.

The first byte is the track's header. It precises the track's attributes:
__
7 |__| <- Blank bit;
6 |__| <- Blank bit;
5 |__| <- Blank bit;
4 |__| <- Blank bit;
3 |__| <- Blank bit;
2 |__| <- Banjo track;
1 |__| <- 12 stringed guitar track;
0 |__| <- Drums track.

Name: String
A 40 characters long string containing the track's name.

Number of strings: Integer
An integer equal to the number of strings of the track.

Tuning of the strings: Table of integers
The tuning of the strings is stored as a 7-integers table, the "Number of
strings" first integers being really used. The strings are stored from
the highest to the lowest.

Port: Integer
The number of the MIDI port used.

Channel: Integer
The number of the MIDI channel used. The channel 10 is the drums channel.

ChannelE: Integer
The number of the MIDI channel used for effects.

Number of frets: Integer
The number of frets of the instrument.

Height of the capo: Integer
The number of the fret on which a capo is present. If no capo is used, the
value is 0x00000000.

Track's color: Color
The track's displayed color in Guitar Pro.

Summary

3. Measures-Tracks pairs


The list of beats per track and per measure is then written to the file in the
following order:

Measure 1/Track 1
Measure 1/Track 2
...
Measure 1/Track M
Measure 2/Track 1
...
Measure 2/Track M
...
Measure N/Track 1
Measure N/Track 2
...
Measure N/Track M

A measure-track pair is written in two steps. We first write the number of beats
in the current pair:

Number of beats: Integer
Integer indicating the number of beats the measure-track pair contains.

After what we directly write the beat details (which are described in the next section).

Summary

4. A beat


The first byte is the beat header. It lists the data present in the current beat:
__
7 |__| <- Blank bit;
6 |__| <- Status: True if the beat is empty of if it is a rest;
5 |__| <- The beat is a n-tuplet;
4 |__| <- Presence of a mix table change event;
3 |__| <- Presence of effects;
2 |__| <- Presence of a text;
1 |__| <- Presence of a chord diagram;
0 |__| <- Dotted notes.


Status: Byte
If the bit 6 is true, we start by writing the beat status. The value is
0x00 if the beat is empty and 0x02 if it is a rest.

Beat duration: Byte
The basic beat duration is a eighth note, which is equivalent to a
time duration of 1. We thus obtain the following relations:
* -2: Whole note;
* -1: Half note;
* 0: Quarter note;
* 1: Eighth note;
* 2: Sixteenth note;
* 3: Thirty-second note;
* ...

N-tuplet: Integer
If the bit 5 of the header byte is true, this integer corresponds to the
'n' in 'n-tuplet': 3, 5, 6, 7, 9, 10, 11, 12 and 13.

Chord diagram:
If the presence of a chord diagram is indicated by the bit 1 of the
header, it is then written here. The detail of this operation is specified
in paragraph V.5 Chords diagrams.

Text:
If the presence of a text is indicated by the bit 2 of the header, it is
written here. It behaves like most of the previous strings. We
first find an integer coding the text length + 1, followed by the string
containing the text (at the format described in I. GENERAL).

Effect on beats:
If the presence of an effect is indicated by the bit 3 of the header, it
is written at this place. The detail of this operation is specified in the
paragraph V.6 Effects on beats. Effects on beats include tremolo bars,
bends...

Mix table change event:
If the presence of an event linked to the mix table is indicated by the
bit 4 of the header, it is written here. The detail of this operaion is
specified in the paragraph V.7 Mix table change event.

Note:
The note itself is written here. The detail of this operation is specified
in the paragraph V.8 Note.

Summary

5. Chords diagrams


Header: Byte
This value is 0x01, indicating a Guitar Pro 4 format chord.

Sharp: Byte
Determines if the chord is displayed sharp or flat.

Blank1,
Blank2,
Blank3: Bytes
Blank bytes needed for ascendant compatibility with versions 3 of the software.

Root: Byte
* -1 for the customized chords
* 0: C
* 1: C#...

Major/minor: Byte
Determines the chord type as followed:
- 0: M
- 1: 7
- 2: 7M
- 3: 6
- 4: m
- 5: m7
- 6: m7M
- 7: m6
- 8: sus2
- 9: sus4
- 10: 7sus2
- 11: 7sus4
- 12: dim
- 13: aug
- 14: 5

Nine, Eleven of Thirteen: Byte
Determines if the chord goes until the ninth, the eleventh, or the thirteenth.

Bass: Integer
Lowest note of the chord. It gives the chord inversions.

Diminished/Augmented Integer
Tonality linked with 9/11/13:
0: perfect ("juste")
1: augmented
2: diminished

add: Byte
Allows to determine if a 'add' (added note) is present in the chord.

Name: String
20 characters long string containing the chord name.


Blank4,
Blank5: Bytes
Blank bytes needed for ascendant compatibility with versions 3 of the software.

Fifth: Byte
Tonality of the fifth:
0: perfect ("juste")
1: augmented
2: diminished

Ninth: Byte
Tonality of the ninth:
0: perfect ("juste")
1: augmented
2: diminished
This tonality is valid only if the value "Nine, Eleven or Thirteen" is 11 or 13.

Eleventh: Byte
Tonality of the eleventh:
0: perfect ("juste")
1: augmented
2: diminished
This tonality is valid only if the value "Nine, Eleven or Thirteen" is 13.

Base fret: Integer
Shows the fret from which the chord is displayed.

Frets: List of 7 integers.
Corresponds to the fret number played on each string, from the highest to the lowest.
-1 means a string unplayed.
0 means a string played "blank" (ie no fret).

Number of barres: Byte
Indicates the number of barres there are in the chord. A chord can contain up to 5 barres.

Fret of the barre: List of 5 Bytes
Indicates the fret number of each possible barre.

Barre start: List of 5 Bytes
Indicates the first string of the barre, 1 being the highest.
The list order matches the chord different barres frets list order.

Barre end: List of 5 Bytes
Indicates the first string of the barre, 1 being the lowest.
The list order matches the chord different barres frets list order.

Omission1,
Omission3,
Omission5,
Omission7,
Omission9,
Omission11,
Omission13: Bytes
Gives the notes there are in the chord.
If the value is 0x00, the note is not in the chord, and if the value is
0x01, the note is in the chord. 9, 11 or 13 can only be present
for a "Nine, Eleven or Thirteen" big enough.

Blank6: Byte
Blank byte needed for ascendant compatibility with versions 3 of the software.

Fingering: List of 7 Bytes
Describes the fingering used to play the chord.
Below is given the fingering from the highest string to the lowest:
-2: unknown;
-1: X or 0 (no finger);
0: thumb;
1: index;
2: middle finger;
3: annular;
4: little finger.

ShowDiagFingering: Byte
If it is 0x01, the chord fingering is displayed.
If it is 0x00, the chord fingering is masked.

Summary

6. Effects on beats


The first byte is the header of effects linked to beats. It gives information about existing effects:
__
7 |__| <- Blank bit;
6 |__| <- Stroke effect;
5 |__| <- Tapping, popping or slapping effect;
4 |__| <- unused bit -> remainings of version 3;
3 |__| <- unused bit -> remainings of version 3;
2 |__| <- unused bit -> remainings of version 3;
1 |__| <- unused bit -> remainings of version 3;
0 |__| <- unused bit -> remainings of version 3.

The 2nd byte is linked with effects new to the version 4 of the software.
__
7 |__| <- Blank bit;
6 |__| <- Blank bit;
5 |__| <- Blank bit;
4 |__| <- Blank bit;
3 |__| <- Blank bit;
2 |__| <- Tremolo Bar;
1 |__| <- Pickstroke;
0 |__| <- Rasguedo.

The effects, if any, are then written in the following order:

Tapping/Popping/Slapping: Byte
The presence of this effect is set by the bit 5 of the first header byte.
It is written as:
0: None
1: Tapping
2: Slapping
3: Popping (bass guitar)

Tremolo Bar: Bend
The presence of this effect is set by the bit 2 of the second header byte.
The tremolo bar is saved as a BEND, as described in the paragraph V.10 Bends.

UpStroke: Byte
The presence of this effect is set by the bit 6 of the first header byte.
It can take different values depending on the stroke speed:
0: none;
1: hundred twenty eighth note;
2: sixty-fourth note;
3: thirty-second note;
4: sixteenth note;
5: eighth note;
6: quarter note.

DownStroke: Byte
The presence of this effect is set by the bit 6 of the first header byte.
It can take different values depending on the stroke speed:
0: none;
1: hundred twenty eighth note;
2: sixty-fourth note;
3: thirty-second note;
4: sixteenth note;
5: eighth note;
6: quarter note.

Rasguedo:
The rasguedo is set if the bit 0 of the second header byte is set. It is
a complement to the strokes, so it does not need any additional data.


Pickstroke: Byte
The presence of this effect is set by the bit 1 of the second header byte.
It can take different values:
0: none;
1: going up;
2: going down.


Summary

7. Mix table change event

 		
Instrument: Byte
Gives the number of the new instrument. The value is -1 if no instrument change occurs.

Volume: Byte
Gives the new volume value. The value is -1 if no volume change occurs.

Pan: Byte
Gives the new pan value. The value is -1 if no pan change occurs.

Chorus: Byte
Gives the new chorus value. The value is -1 if no chorus change occurs.

Reverb: Byte
Gives the new reverb value. The value is -1 if no reverb change occurs.

Phaser: Byte
Gives the new phaser value. The value is -1 if no phaser change occurs.

Tremolo: Byte
Gives the new tremolo value. The value is -1 if no tremolo change occurs.

Tempo: Integer
Gives the new tempo value. The value is -1 if no tempo change occurs.

Volume change duration: Byte
Gives the volume change duration in beats.

Pan change duration: Byte
Gives the pan change duration in beats.

Chorus change duration: Byte
Gives the chorus change duration in beats.

Reverb change duration: Byte
Gives the reverb change duration in beats.

Phaser change duration: Byte
Gives the phaser change duration in beats.

Tremolo change duration: Byte
Gives the tremolo change duration in beats.

Tempo change duration: Byte
Gives the tempo change duration in beats.

The next byte precises if the changes apply only to the current track (if the
matching bit is 0), or to every track (if it is 1).
__
7 |__| <- Blank bit;
6 |__| <- Blank bit;
5 |__| <- Tremolo;
4 |__| <- Phaser;
3 |__| <- Reverb;
2 |__| <- Chorus;
1 |__| <- Pan;
0 |__| <- Volume.

Summary

8. Note


The first byte is the note header. It lists the information about the different
parameters linked to the note:
__
7 |__| <- Right hand or left hand fingering;
6 |__| <- Accentuated note;
5 |__| <- Note type (rest, empty note, normal note);
4 |__| <- Note dynamic;
3 |__| <- Presence of effects linked to the note;
2 |__| <- Ghost note;
1 |__| <- Dotted note;
0 |__| <- Time-independent duration.

Note type: Short Int
If the bit 5 is true, we start by writing the note type. The value is:
0x0100 if the note is normal;
0x0200 if the note is a ghost note;
0x0300 if the note is a tie note.

Note duration:
If the bit 0 is true, we write the 2 following information linked to the
note duration.

Time duration: Byte
The basic time duration is the quarter note, which is equivalent
to a time duration of 1. Therefore, we obtain the relations:
* -2: Whole Note;
* -1: Half note;
* 0: Quarter note;
* 1: Eighth note;
* 2: Sixteenth note;
* 3: Thirty-second note;
* ...

N-tuplet: Byte
This int matches the N in "N-tuplet" (ie 3, 5, 6, 7, 9, 10, 11, 12, 13).

Note dynamic: Byte
If the bit 4 of the header byte is true, we write here the note strength
with the following rule:
- 1: ppp
- 2: pp
- 3: p
- 4: mp
- 5: mf
- 7: f
- 8: ff
- 9: fff
If the bit 4 is false, we then consider that the note is forte (value 6).

Fret number: Byte
If the bit 5 is true, we write here the number of the fret on which the note
is applied.

Fingering: List of 2 bytes
If the bit 7 is true, we write here successively the fingerings left hand,
then right hand, each of them being written on one byte. The fingering
is coded this way:
-1: nothing;
0: thumb;
1: index;
2: middle finger;
3: annular;
4: little finger.

Effects on the note:
If the presence of an effect is indicated by the bit 3 of the header, it
is saved at this place. The details of this operation is specified in the
next paragraph. Those include for example vibratos, palm muting,
slides, harmonices...

Summary

9. Effects on the notes

a. Effects on the notes

The effects presence for the current note is set by the 2 header bytes.

First byte:
__
7 |__| <- Blank bit;
6 |__| <- Blank bit;
5 |__| <- Blank bit;
4 |__| <- Grace note presence;
3 |__| <- Let ring;
2 |__| <- Presence of a slide from the current note (version 3);
1 |__| <- Presence of a hammer-on or a pull-off from the current note;
0 |__| <- Presence of a bend.

Second byte:
__
7 |__| <- Blank bit;
6 |__| <- Left hand vibrato;
5 |__| <- Trill;
4 |__| <- Harmonic note;
3 |__| <- Presence of a slide from the current note;
2 |__| <- Tremolo picking;
1 |__| <- Palm Mute;
0 |__| <- Note played staccato.

Bend:
If the bit 0 of the first header byte is true, we write here the bend as
described in section V.10. Bends.

Grace Note:
If the bit 4 of the first header byte is true, we write here the data
relative to the Grace Note, as described in section V.9.b Grace Notes.

Tremolo Picking: Byte
If the bit 2 of the second header byte is true, the information linked to
tremolo picking are saved here. It is encoded like this:
- 1: eighth note;
- 2: sixteenth note;
- 3: thirty-second note.

Slide: Byte
If the bit 3 of the second header byte is true, the information linked to
the slide is stored here and is coded like this:
* -2: slide into from above
* -1: slide into from below
* 0: no slide
* 1: shift slide
* 2: legato slide
* 3: slide out of downwards
* 4: slide out of upwards

Harmonics: Byte
If the bit 4 of the second header byte is true, the information linked to
the harmonics is stored here and is coded like this:
- 0: None
- 1: Natural
- 15: Artificial+5
- 17: Artificial+7
- 22: Artificial+12
- 3: Tapped
- 4: Pitch
- 5: Semi

Trill:
If the bit 5 of the second header byte is true, the information linked to
the Trill effect is stored here. It is written in two steps:
Fret: Byte
The fret the trill is made with.

Period: Byte
The period between each note. The value is encoded as:
- 0: Quarter note;
- 1: Eighth note;
- 2: Sixteenth note.

The following effects are present if the bit of the header is true:
- Let ring
- Presence of a hammer-on or a pull-off from the current note
- Left hand vibrato
- Palm Mute
- Note played staccato.

Summary

b. Grace notes


The grace notes are stored in the file with 4 variables, written in the following
order.

Fret: Byte
The fret number the grace note is made from.

Dynamic: Byte
The grace note dynamic is coded like this:
- 1: ppp
- 2: pp
- 3: p
- 4: mp
- 5: mf
- 6: f
- 7: ff
- 8: fff
The default value is 6.

Transition: Byte
This variable determines the transition type used to make the grace note:
- 0: None
- 1: Slide
- 2: Bend
- 3: Hammer

Duration: Byte
Determines the grace note duration, coded this way:
- 3: Sixteenth note.
- 2: Twenty-fourth note.
- 1: Thirty-second note.


Summary

10. Bends

 		
Type: Byte
Gives the bend type. Different types are allowed and are context-dependent (tremolo bar or bend).
The model list is:
Common:
- 0: None

Bend specific:
- 1: Bend
- 2: Bend and Release
- 3: Bend and Release and Bend
- 4: Prebend
- 5: Prebend and Release

Tremolo bar specific:
- 6: Dip
- 7: Dive
- 8: Release (up)
- 9: Inverted dip
-10: Return
-11: Release (down)

Value: Integer
Bend height. It is 100 per tone and goes by quarter tone.
* Normal position: 0;
* Quarter tone: 25;
* Half tone: 50;
* Three-quarters tone: 75;
* Whole tone: 100;
... until
* Three tones: 300.


Number of points: Integer
Number of points used to display the bend. Is followed by the list of points.

List of points:
Each point is written like this:
Absolute time position Integer
Gives the point position from the previous point. This value goes between 0 and 60
and represents sixties of the note duration.

Vertical position Integer
It is 100 per tone and goes by quarter tone.
* Normal position: 0;
* Quarter tone: 25;
* Half tone: 50;
* Three-quarters tone: 75;
* Whole tone: 100;
... until
* Three tones: 300.

Vibrato Byte
Determines how to play the section, with different vibrato types:
- 0: none
- 1: fast
- 2: average
- 3: slow

Summary

VI. CHORDS DIAGRAMS


Number of chords: Integer
Number of chords to write in the chords diagram list.

Then comes the written chords list, as described in V.5 Chords diagrams.





This page is part of the DGuitar Home Page