Fix compatibility with newer versions of lilypond.
[jelmer/ptabtools.git] / format.tex
1 \documentclass[a4paper]{article}
2
3 \usepackage{listings}
4 \usepackage{graphicx}
5 \usepackage[pdftex]{hyperref}
6
7 \newcommand\hex[1]{\hbox{\rm\H{}\tt#1}} % hexadecimal constant
8
9 \begin{document}
10 \title{The PowerTab file format}
11 \date{2004}
12 \author{Jelmer Vernooij}
13 \maketitle
14
15 Relevant links:
16
17 \begin{itemize}
18 \item \url{http://jelmer.vernstok.nl/oss/ptabtools/}
19 \item \url{http://www.power-tab.net/}
20 \end{itemize}
21
22 \begin{abstract}
23 This document describes the format of the PowerTab format, as 
24 used by the PowerTab editor. All information 
25 in this document was obtained by analysing data in existing PowerTab files.
26
27 This document should be used by those interested in adding support 
28 for the PowerTab file format to their own guitar tablature editors.
29
30 Note that this document is still a work-in-progress.
31 \end{abstract}
32
33 \section{Introduction}
34
35 Most of the programs I use run on Linux or other Unices. However, 
36 at the moment I still need to run guitar tablature editors on Windows, 
37 because most tabs are only available in proprietary file formats from 
38 programs such as Guitar Pro 3 and PowerTab.
39
40 This is why I decided to try to figure out the structure of the PowerTab 
41 format so I could write a small utility for generating Lilypond files 
42 from PowerTab files.
43
44 This document is the result of what I have figured out about the PowerTab 
45 format so far --- it's almost complete. The conversion utilities 
46 (published under the GPL) can be found on the website mentioned on the top of 
47 this page.
48
49 \section{General layout}
50
51 Every file has 4 parts: a header, a part containing the guitar tabs, a 
52 part containing the bass parts and a footer.
53
54 Each instrument (guitar or bass) contains ``elements''. Elements themselve can 
55 (at specified places) contain lists of elements. So we get a tree. 
56 There are several types of elements.
57
58 An instrument always contains 8 lists of elements, always in the same order.
59 They are:
60
61 \begin{enumerate}
62 \item CGuitar
63 \item CChordDiagram
64 \item CFloatingText
65 \item CGuitarIn
66 \item CTempoMarker
67 \item CDynamic
68 \item CSectionSymbol
69 \item CSection
70 \end{enumerate}
71
72 \section{General techniques}
73
74 \subsection{Lists}
75
76 \subsection{Strings}
77
78 Strings are always prepended by one byte describing their length. There is 
79 no ending null character.
80
81 \subsection{Item types}
82
83 \section{Header}
84
85 \subsection{Song}
86
87 \subsubsection{Public Release: Audio}
88 \subsubsection{Public Release: Video}
89 \subsubsection{Bootleg}
90 \subsubsection{Unreleased}
91
92 \subsection{Lesson}
93
94 \section{Types}
95
96 \section{Reference}
97
98 \subsection{CGuitar}
99
100 \subsection{CFloatingText}
101 \subsection{CChordDiagram}
102 \subsection{CTempoMarker}
103 \subsection{CLineData}
104 \subsection{CChordText}
105 \subsection{CGuitarIn}
106 \subsection{CStaff}
107 \subsection{CPosition}
108 \subsection{CSection}
109 \subsection{CDynamic}
110 \subsection{CSectionSymbol}
111 \subsection{CMusicBar}
112 \subsection{CRhythmSlash}
113 \subsection{CDirection}
114
115 \end{document}