2 Parsing utilities for GuitarPro (version 2, 3 and 4) files
3 (c) 2004 Jelmer Vernooij <jelmer@samba.org>
5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; either version 3 of the License, or
8 (at your option) any later version.
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
15 You should have received a copy of the GNU General Public License
16 along with this program; if not, write to the Free Software
17 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
26 #if defined(_MSC_VER) && !defined(PTB_CORE)
27 #pragma comment(lib,"ptb.lib")
31 typedef unsigned char uint8_t;
32 typedef unsigned short uint16_t;
33 typedef unsigned long uint32_t;
49 const char *version_string;
57 const char *instruction;
59 const char *copyright;
60 uint32_t notice_num_lines;
65 uint32_t lyrics_track;
75 uint32_t num_instruments;
76 struct gp_instrument {
85 #define GP_BAR_PROPERTY_CUSTOM_RHYTHM_1 0x01
86 #define GP_BAR_PROPERTY_CUSTOM_RHYTHM_2 0x02
87 #define GP_BAR_PROPERTY_REPEAT_OPEN 0x04
88 #define GP_BAR_PROPERTY_REPEAT_CLOSE 0x08
89 #define GP_BAR_PROPERTY_ALT_ENDING 0x10
90 #define GP_BAR_PROPERTY_MARKER 0x20
91 #define GP_BAR_PROPERTY_CHANGE_ARMOR 0x40
92 #define GP_BAR_PROPERTY_DOUBLE_ENDING 0x80
104 struct gp_color color;
116 #define GP_BEAT_PROPERTY_DOTTED 0x01
117 #define GP_BEAT_PROPERTY_CHORD 0x02
118 #define GP_BEAT_PROPERTY_TEXT 0x04
119 #define GP_BEAT_PROPERTY_EFFECT 0x08
120 #define GP_BEAT_PROPERTY_CHANGE 0x10
121 #define GP_BEAT_PROPERTY_TUPLET 0x20
122 #define GP_BEAT_PROPERTY_REST 0x40
129 #define GP_BEAT_EFFECT1_VIBRATO 0x01
130 #define GP_BEAT_EFFECT1_WIDE_VIBRATO 0x02
131 #define GP_BEAT_EFFECT1_NATURAL_HARMONIC 0x04
132 #define GP_BEAT_EFFECT1_OTHER_HARMONIC 0x08
133 #define GP_BEAT_EFFECT1_FADE_IN 0x10
134 #define GP_BEAT_EFFECT1_4_STROCKE_EFFECT 0x20
135 #define GP_BEAT_EFFECT1_TREMOLO_BAR 0x20
136 #define GP_BEAT_EFFECT1_STROCKE 0x40
137 #define GP_BEAT_EFFECT2_RASGUEADO 0x01
138 #define GP_BEAT_EFFECT2_PICK_STROCKE 0x02
139 #define GP_BEAT_EFFECT2_TREMOLO_BAR 0x04
147 uint8_t new_instrument;
161 uint8_t strings_present;
167 #define GP_NOTE_PROPERTY_DURATION_SPECIAL 0x01
168 #define GP_NOTE_PROPERTY_DOTTED 0x02
169 #define GP_NOTE_PROPERTY_GHOST 0x04
170 #define GP_NOTE_PROPERTY_EFFECT 0x08
171 #define GP_NOTE_PROPERTY_NUANCE_CHANGE 0x10
172 #define GP_NOTE_PROPERTY_ALTERATION 0x20
173 #define GP_NOTE_PROPERTY_ACCENTUATED 0x40
174 #define GP_NOTE_PROPERTY_FINGERING 0x80
176 #define GP_NOTE_ALTERATION_LINKED 0x02
177 #define GP_NOTE_ALTERATION_DEAD 0x03
180 #define GP_NOTE_EFFECT1_BEND 0x01
181 #define GP_NOTE_EFFECT1_HAMMER 0x02
182 #define GP_NOTE_EFFECT1_SLIDE 0x04
183 #define GP_NOTE_EFFECT1_LET_RING 0x08
184 #define GP_NOTE_EFFECT1_APPOGIATURE 0x10
186 #define GP_NOTE_EFFECT2_STACCATO 0x01
187 #define GP_NOTE_EFFECT2_PALM_MUTE 0x02
188 #define GP_NOTE_EFFECT2_TREMOLO_PICKING 0x04
189 #define GP_NOTE_EFFECT2_SLIDE 0x08
190 #define GP_NOTE_EFFECT2_HARMONIC 0x10
191 #define GP_NOTE_EFFECT2_TRILL 0x20
192 #define GP_NOTE_EFFECT2_VIBRATO 0x40
195 struct gp_note_effect_bend_point
220 uint8_t previous_note;
237 uint32_t num_strings;
241 struct gp_track_string {
244 struct gp_color color;
250 extern struct gpf *gp_read_file(const char *filename);
251 extern void gp_free(struct gpf *);
257 #endif /* __GP_H__ */