Little Endian Byte Ordering
DWORD - unsigned integer, 4 bytes
WORD - unsigned short, 2 bytes
BYTE - unsigned char, 1 byte
CString - Microsoft String - 1, 3 or 7 bytes = length of string,
followed by the string itself
In order to optimize space, the length is stored using variable
lengthed types. If the length of the
string is < 255 (hex = 0xff), the length is stored as a BYTE. If the length is < 65535 (hex = 0xffff),
the length is stored in a WORD that follows the first BYTE. Otherwise the length is stored as a DWORD
that follows the first BYTE and WORD.
Sample Code:
|
UINT ReadStringLength() { //
attempt BYTE length first BYTE
bLen; ReadByte(bLen); //
If length is not 0xff (255), then we've got the length, otherwise keep
reading if
(bLen < 0xff) return
bLen; //
attempt WORD length WORD
wLen; ReadWord(wLen) //
If length is not 0xffff(65535), then we've got the length, otherwise keep
reading if
(wLen < 0xffff) return
wLen; //
read DWORD of length DWORD
dwLen; ReadDWord(dwLen); return
(UINT)dwLen; } |
Header Format: Read the header variables in the following order
|
Variable |
Size |
Description |
Values |
|
File Tag |
DWORD |
Tag that uniquely identifies a Power Tab file |
should always be 1650553968 |
|
File Version |
WORD |
Version # for the file (the version of the program that saved the
file; since every file format is different, it's also the version of the
program needed to read the file) |
0 - Unknown, 1 - v1.0 2 - v1.0.2 3 - v1.5 4 - v1.7 |
|
File Type |
BYTE |
The type of Power Tab file |
0 - Song 1 - Lesson |
If
File Type = Song then
|
|||
|
File Contents |
BYTE |
Type of score contents contained in the file |
If bit 1 set, contains Guitar Score data. If bit 2 set, contains Bass Score data. |
|
Song Title |
CString |
Title of the song |
|
|
Artist |
CString |
Artist who performed song |
|
|
Release Type |
BYTE |
Type of release for the song |
0 - Public Audio 1 - Public Video 2 - Bootleg 3 - Not Released |
If
Release Type = Public Audio then
|
|||
|
Album Type |
BYTE |
Type of album |
0 - Single 1 - EP 2 - LP 3 - Double LP 4 - Triple LP 5 - Boxset |
|
Album Title |
CString |
Title of the album |
|
|
Year |
WORD |
Year album was released |
|
|
Live |
BYTE |
Was the song live? |
0 - No 1 - Yes |
else
if Release Type = Public Video
|
|||
|
Video Title |
CString |
Title of the video |
|
|
Live |
BYTE |
Was the song live? |
0 - No 1 - Yes |
else
if Release Type = Bootleg
|
|||
|
Bootleg Title |
CString |
Title of the bootleg |
|
|
Month |
WORD |
Month bootleg was recorded |
|
|
Day |
WORD |
Day bootleg was recorded |
|
|
Year |
WORD |
Year bootleg was recored |
|
endif
Release Type
|
|||
|
Author Type |
BYTE |
Type of author data |
0 - Known Author(s) 1 - Unknown Author(s); Traditional |
if
Author Type = Known Author then
|
|||
|
Music By |
CString |
Author of the music |
|
|
Words By |
CString |
Author of the lyrics |
|
endif
Author Type
|
|||
|
Arranged By |
CString |
Author who arranged this version of song |
|
|
Transcribed By 1 |
CString |
Person who transcribed Guitar Score |
|
|
Transcribed By 2 |
CString |
Person who transcribed Bass Score |
|
|
Copyright |
CString |
Copyright info |
|
|
Lyrics |
CString |
Lyrics |
|
|
Perf. Notes 1 |
CString |
Performance Notes for Guitar Score |
|
|
Perf. Notes 2 |
CString |
Performance Notes for Bass Score |
|
|
else if FileType = Lesson |
|||
|
Title |
CString |
Title of the lesson |
|
|
Subtitle |
CString |
Subtitle of the lesson |
|
|
Style |
WORD |
Music Style for the lesson |
0 - Acoustic 1 - Alternative 2 - Bluegrass 3 - Blues 4 - Christian 5 - Country 6 - Classical 7 - Exercise 8 - Experimental 9 - Fingerpick 10 - Flamenco 11 - Folk 12 - Funk 13 - Fusion 14 - General 15 - Jazz 16 - Metal 17 - Other 18 - Pop 19 - Progressive 20 - Punk 21 - Reggae 22 - Rock 23 - Swing 24 - Theory 25 - World |
|
Level |
BYTE |
Playing Level for the lesson |
0 - Beginner 1 - Intermediate 2 - Advanced |
|
Author |
CString |
Author of the lesson |
|
|
Notes |
CString |
Lesson notes |
|
|
Copyright |
CString |
Copyright for the lesson |
|
|
endif FileType |
|||
|
Song Title |
CString |
Title of the song |
|
|
Artist |
CString |
Artist who performed song |
|
|
Released On |
BYTE |
Type of release for the song |
0 - Single 1 - EP 2 - LP 3 - Double LP 4 - Triple LP 5 - Boxset 6 - Bootleg 7 - Demo 8 - Soundtrack 9 - Video 10 - None |
|
Release Title |
CString |
Title of the release |
|
|
Live |
BYTE |
Was the song live? |
0 - No 1 - Yes |
|
Music By |
CString |
Author of the music |
|
|
Words By |
CString |
Author of the lyrics |
|
|
Arranged By |
CString |
Author who arranged this version of song |
|
|
Year |
WORD |
Year album was released |
|
|
Author Type |
BYTE |
Type of author data |
0 - Known Author 1 - Traditional |
|
Copyright |
CString |
Copyright info |
|
|
Lyrics |
CString |
Lyrics |
|
* Note - Transcriber and Perf. Notes were stored within the score
portion of the file in this version, so they can't be accessed
|
Song Title |
CString |
Title of the song |
|
|
Artist |
CString |
Artist who performed song |
|
|
Released On |
BYTE |
Type of release for the song |
0 - Single 1 - EP 2 - LP 3 - Double LP 4 - Triple LP 5 - Boxset 6 - Bootleg 7 - Demo 8 - Soundtrack 9 - Video 10 - None |
|
Release Title |
CString |
Title of the release |
|
|
Live |
BYTE |
Was the song live? |
0 - No 1 - Yes |
|
Music By |
CString |
Author of the music |
|
|
Words By |
CString |
Author of the lyrics |
|
|
Arranged By |
CString |
Author who arranged this version of song |
|
|
Transcribed By |
CString |
Person who transcribed song |
|
|
Year |
WORD |
Year album was released |
|
|
Author Type |
BYTE |
Type of author data |
0 - Known Author 1 - Traditional |
|
Copyright |
CString |
Copyright info |
|
|
Lyrics |
CString |
Lyrics |
|
|
Perf. Notes |
CString |
Performances notes for the song |
|
Copyright (c) 1999-2001 Brad
Larsen. All Rights Reserved.