20 #ifndef __IMPORTGTP_H__    21 #define __IMPORTGTP_H__    52 static const int GP_MAX_LYRIC_LINES = 5;
    53 static const int GP_MAX_TRACK_NUMBER = 32;
    54 static const int GP_MAX_STRING_NUMBER = 7;
    55 static const int GP_DEFAULT_PERCUSSION_CHANNEL = 9;
    56 static const int GP_INVALID_KEYSIG = 127;
    57 static const int GP_VOLTA_BINARY = 1;
    58 static const int GP_VOLTA_FLAGS = 2;
    66       uchar 
volume, pan, chorus, reverb, phase, tremolo;
   127       static const uchar EFFECT_BEND = 0x1;
   128       static const uchar EFFECT_STACATTO = 0x1;
   129       static const uchar EFFECT_HAMMER = 0x2;
   130       static const uchar EFFECT_PALM_MUTE = 0x2;
   131       static const uchar EFFECT_TREMOLO = 0x4;
   132       static const uchar EFFECT_LET_RING = 0x8;
   133       static const uchar EFFECT_SLIDE_OLD = 0x4;
   134       static const uchar EFFECT_SLIDE = 0x8;
   135       static const uchar EFFECT_GRACE = 0x10;
   136       static const uchar EFFECT_ARTIFICIAL_HARMONIC = 0x10;
   137       static const uchar EFFECT_TRILL = 0x20;
   138       static const uchar EFFECT_GHOST = 0x01;
   141       static const uchar ARPEGGIO_UP = 0xa;
   142       static const uchar ARPEGGIO_DOWN = 0x2;
   145       static const uchar NOTE_GHOST = 0x04; 
   146       static const uchar NOTE_DEAD = 0x20; 
   147       static const uchar NOTE_DYNAMIC = 0x10; 
   148       static const uchar NOTE_FRET = 0x20; 
   149       static const uchar NOTE_FINGERING = 0x80; 
   150       static const uchar NOTE_MARCATO = 0x02; 
   151       static const uchar NOTE_SFORZATO = 0x40; 
   152       static const uchar NOTE_SLUR = 0x8;
   153       static const uchar NOTE_APPOGIATURA = 0x02;
   156       static const uchar BEAT_VIBRATO_TREMOLO = 0x02;
   157       static const uchar BEAT_FADE = 0x10;
   158       static const uchar BEAT_EFFECT = 0x20;
   159       static const uchar BEAT_TREMOLO = 0x04;
   160       static const uchar BEAT_ARPEGGIO = 0x40;
   161       static const uchar BEAT_STROKE_DIR = 0x02;
   162       static const uchar BEAT_DOTTED = 0x01;
   163       static const uchar BEAT_PAUSE = 0x40;
   164       static const uchar BEAT_TUPLET = 0x20;
   165       static const uchar BEAT_LYRICS = 0x4;
   166       static const uchar BEAT_EFFECTS = 0x8;
   167       static const uchar BEAT_MIX_CHANGE = 0x10;
   168       static const uchar BEAT_CHORD = 0x2;
   171       static const uchar SCORE_TIMESIG_NUMERATOR = 0x1;
   172       static const uchar SCORE_TIMESIG_DENOMINATOR = 0x2;
   173       static const uchar SCORE_REPEAT_START = 0x4;
   174       static const uchar SCORE_REPEAT_END = 0x8;
   175       static const uchar SCORE_MARKER = 0x20;
   176       static const uchar SCORE_VOLTA = 0x10;
   177       static const uchar SCORE_KEYSIG = 0x40;
   178       static const uchar SCORE_DOUBLE_BAR = 0x80;
   181       static const int SHIFT_SLIDE = 1;
   182       static const int LEGATO_SLIDE = 2;
   183       static const int SLIDE_OUT_DOWN = 4;
   184       static const int SLIDE_OUT_UP = 8;
   185       static const int SLIDE_IN_ABOVE = 16;
   186       static const int SLIDE_IN_BELOW = 32;
   188       static const int MAX_PITCH = 127;
   189       static const char* 
const errmsg[];
   195       int last_tempo          { -1 };
   214       QTextCodec* _codec { 0 };
   217       void skip(qint64 len);
   218       void read(
void* p, qint64 len);
   221       QString readPascalString(
int);
   222       QString readWordPascalString();
   223       QString readBytePascalString();
   225       QString readDelphiString();
   227       virtual void readBend(
Note*);
   228       virtual bool readMixChange(
Measure* measure);
   229       virtual int readBeatEffects(
int track, 
Segment*) = 0;
   232       void setTuplet(
Tuplet* tuplet, 
int tuple);
   233       void setupTupletStyle(
Tuplet* tuplet);
   235       void addDynamic(
Note*, 
int d);
   237       void applyBeatEffects(
Chord*, 
int beatEffects);
   238       void readTremoloBar(
int track, 
Segment*);
   239       void readChord(
Segment* seg, 
int track, 
int numStrings, QString name, 
bool gpHeader);
   241       void createSlur(
bool hasSlur, 
int staffIdx, 
ChordRest* cr);
   242       void createOttava(
bool hasOttava, 
int track, 
ChordRest* cr, QString value);
   243       void createSlide(
int slide, 
ChordRest* cr, 
int staffIdx, 
Note* note = 
nullptr);
   244       void createCrecDim(
int staffIdx, 
int track, 
const Fraction& tick, 
bool crec);
   246       void addPalmMute(
Note*);
   247       void addLetRing(
Note*);
   252       void createTuningString(
int strings, 
int tuning[]);
   261       void setTempo(
int n, 
Measure* measure);
   262       void initGuitarProDrumset();
   263       QString 
title, subtitle, artist, album, composer;
   266       GpTrack channelDefaults[GP_MAX_TRACK_NUMBER * 2];
   272          GP_EOF, GP_BAD_NUMBER_OF_STRINGS
   277       virtual bool read(QFile*) = 0;
   288       bool readNote(
int string, 
Note* note);
   289       virtual int readBeatEffects(
int track, 
Segment*);
   293       virtual bool read(QFile*);
   304       virtual bool read(QFile*);
   312       virtual int readBeatEffects(
int track, 
Segment* segment);
   316       virtual bool read(QFile*);
   327       bool readNote(
int string, 
int staffIdx, 
Note* note);
   328       virtual int readBeatEffects(
int track, 
Segment* segment);
   329       virtual bool readMixChange(
Measure* measure);
   330       int convertGP4SlideNum(
int slide);
   334       virtual bool read(QFile*);
   343       int _beat_counter{ 0 };
   345       void readPageSetup();
   346       virtual int readBeatEffects(
int track, 
Segment* segment);
   347       bool readNote(
int string, 
Note* note);
   348       virtual bool readMixChange(
Measure* measure);
   349       void readMeasure(
Measure* measure, 
int staffIdx, 
Tuplet*[], 
bool mixChange);
   350       int readArtificialHarmonic();
   352       void readMeasures(
int startingTempo);
   354       bool readNoteEffects(
Note*);
   358       virtual bool read(QFile*);
   370       const int GPX_HEADER_UNCOMPRESSED = 1397113666;
   372       const int GPX_HEADER_COMPRESSED = 1514554178;
   376       const int BITS_IN_BYTE = 8;
   389       void parseFile(
char* filename, QByteArray* data);
   390       int readBit(QByteArray* buffer);
   391       QByteArray getBytes(QByteArray* buffer, 
int offset, 
int length);
   392       void readGPX(QByteArray* buffer);
   393       int readInteger(QByteArray* buffer, 
int offset);
   394       QByteArray readString(QByteArray* buffer, 
int offset, 
int length);
   395       int readBits(QByteArray* buffer, 
int bitsToRead);
   396       int readBitsReversed(QByteArray* buffer, 
int bitsToRead);
   397       void readGpif(QByteArray* data);
   399       void readChord(QDomNode* diagram, 
int track);
   401       void readMasterTracks(QDomNode* masterTrack);
   402       void readDrumNote(
Note* note, 
int element, 
int variation);
   405       void readTracks(QDomNode* tracks);
   407       Fraction rhythmToDuration(QString value);
   408       Fraction fermataToFraction(
int numerator, 
int denominator);
   409       QDomNode getNode(
const QString& 
id, QDomNode currentDomNode);
   410       void unhandledNode(QString nodeName);
   411       void makeTie(
Note* note);
   413       void addTremoloBar(
Segment* segment, 
int track, 
int whammyOrigin, 
int whammyMiddle, 
int whammyEnd);
   418       void readNote(
int string, 
Note* note);
   419       virtual int readBeatEffects(
int track, 
Segment*);
   423       virtual bool read(QFile*);
 Fraction _lastTick
Definition: importgtp.h:367
QMap< int, QList< GPFermata > * > fermatas
Definition: importgtp.h:197
int * previousDynamic
Definition: importgtp.h:412
Definition: importgtp.h:99
Definition: importgtp.h:64
Definition: importgtp.h:69
QList< GpBar > bars
Definition: importgtp.h:269
int version
Definition: importgtp.h:190
Type
Definition: vibrato.h:59
int repeats
Definition: importgtp.h:106
GuitarPro2(MasterScore *s, int v)
Definition: importgtp.h:303
int curPos
Definition: importgtp.h:202
GuitarPro5(MasterScore *s, int v)
Definition: importgtp.h:357
QString direction
Definition: importgtp.h:108
QDomNode rhythms
Definition: importgtp.h:384
int staves
Definition: importgtp.h:267
std::vector< Vibrato * > _vibratos
Definition: importgtp.h:256
std::map< std::pair< int, int >, Note * > slideMap
Definition: importgtp.h:415
Definition: importgtp.h:365
Definition of Score class. 
one measure in a system 
Definition: measure.h:65
GuitarPro3(MasterScore *s, int v)
Definition: importgtp.h:315
std::vector< int > ottavaFound
Definition: importgtp.h:205
QString title
Definition: importgtp.h:263
std::vector< QString > directions
Definition: importgtp.h:113
QDomNode beats
Definition: importgtp.h:382
BarLineType barLine
Definition: importgtp.h:104
int previousTempo
Definition: importgtp.h:203
int keysig
Definition: importgtp.h:102
QMap< int, FretDiagram * > fretDiagrams
Definition: importgtp.h:388
QDomNode bars
Definition: importgtp.h:380
QString error(GuitarProError n) const
Definition: importgtp.h:278
GuitarProError
Definition: importgtp.h:271
int index
Definition: importgtp.h:86
int beatCounter
Definition: importgtp.h:95
GuitarPro6(MasterScore *s)
Definition: importgtp.h:422
std::vector< Segment * > segments
Definition: importgtp.h:93
Definition of classes Clef. 
QDomNode notes
Definition: importgtp.h:383
QMap< int, int > * slides
Definition: importgtp.h:374
Definition: importgtp.h:285
std::vector< std::string > tunings
Definition: importgtp.h:259
std::list< Note * > slideList
Definition: importgtp.h:124
Example of 1/8 triplet: _baseLen = 1/8 _actualNotes = 3 _normalNotes = 2 (3 notes played in the time ...
Definition: tuplet.h:37
QStringList comments
Definition: importgtp.h:265
void createMeasures(const ReducedFraction &firstTick, ReducedFraction &lastTick, Score *score)
Definition: importmidi.cpp:819
uchar volume
Definition: importgtp.h:66
Score::FileError importGTP(MasterScore *score, const QString &name)
Definition: importgtp.cpp:2708
Definition: importgtp.h:91
GuitarPro1(MasterScore *s, int v)
Definition: importgtp.h:292
Definition: importgtp.h:311
Definition: importgtp.h:378
int slide
Definition: importgtp.h:212
std::map< std::pair< int, int >, bool > dead_end
Definition: importgtp.h:342
QDomNode voices
Definition: importgtp.h:381
QFile * f
Definition: importgtp.h:201
Hairpin ** hairpins
Definition: importgtp.h:199
FileError
Definition: score.h:395
int voltaType
Definition: importgtp.h:70
Definition: importgtp.h:300
Definition: aeolus.cpp:26
std::vector< int > curDynam
Definition: importgtp.h:324
std::map< int, std::pair< int, bool > > tempoMap
Definition: importgtp.h:207
std::vector< Ottava * > ottava
Definition: importgtp.h:198
int previousDynamic
Definition: importgtp.h:204
int tempo
Definition: importgtp.h:208
std::vector< QString > ottavaValue
Definition: importgtp.h:206
int voltaSequence
Definition: importgtp.h:213
QMap< int, int > slides
Definition: importgtp.h:209
Slur ** legatos
Definition: importgtp.h:386
Graphic representation of a chord. 
Definition: chord.h:55
Fraction timesig
Definition: importgtp.h:100
int timeDivision
Definition: importgtp.h:87
MasterScore * score
Definition: importgtp.h:200
Definition: importgtp.h:323
Repeat repeatFlags
Definition: importgtp.h:105
Definition: chordrest.h:48
QDomNode masterBars
Definition: importgtp.h:379
QString type
Definition: importgtp.h:88
std::vector< LetRing * > _letRings
Definition: importgtp.h:255
QStringList lyrics
Definition: importgtp.h:92
Definition: importgtp.h:122
Score::FileError readScore(MasterScore *score, QString name, bool ignoreVersionError)
Import file name. 
Definition: file.cpp:2257
Repeat
Definition: measurebase.h:34
std::vector< PalmMute * > _palmMutes
Definition: importgtp.h:254
Definition: importgtp.h:85
int measures
Definition: importgtp.h:268
QList< int > voltaInfo
Definition: importgtp.h:71
Graphic representation of a note. 
Definition: note.h:212
ClefType
Definition: clef.h:37
Definition: fraction.h:46
QString directionStyle
Definition: importgtp.h:109
bool freeTime
Definition: importgtp.h:101
GPLyrics gpLyrics
Definition: importgtp.h:211
Align
Definition: types.h:439
int fromBeat
Definition: importgtp.h:94
Definition: importgtp.h:341
GuitarPro4(MasterScore *s, int v)
Definition: importgtp.h:333
QString marker
Definition: importgtp.h:103
int patch
Definition: importgtp.h:65
QString transcriber
Definition: importgtp.h:264
BarLineType
Definition: mscore.h:199
GPVolta volta
Definition: importgtp.h:107
std::vector< int > tupleKind
Definition: importgtp.h:325
int lyricTrack
Definition: importgtp.h:96