66 std::stack<Sguidoelement> fStack;
72 vector<delayedElement> fDelayed;
74 bool fGenerateComments, fGenerateBars, fGeneratePositions, fGenerateAutoMeasureNum, fLyricsManualSpacing;
77 bool fInCue, fInGrace, fInhibitNextBar, fPendingBar, fBeamOpened, fBeamGrouping, fMeasureEmpty, fWavyTrillOpened, fSingleScopeTrill, fNonStandardNoteHead, fDoubleBar, fTremoloInProgress, fShouldStopOctava;
79 int fCrescPending, fDiminPending;
82 int fCurrentOctavaShift;
84 std::queue<int> fTiedOpen;
86 std::vector< std::pair<int, int> > fSlurStack;
90 bool isProcessingChord;
97 int fCurrentStaffIndex;
102 int fStartMeasure, fEndMeasure, fEndMeasureOffset;
104 long fCurrentDivision;
113 int fCurrentStemDirection;
118 if (!checkMeasureRange())
return;
120 fStack.top()->add(elt);
123 void checkDelayed (
long time,
bool before);
125 if (!checkMeasureRange())
return;
126 add(elt); fStack.push(elt);
129 if (!checkMeasureRange())
return;
133 void moveMeasureTime (
long duration,
bool moveVoiceToo=
false);
138 void checkPostArticulation (
const notevisitor& note );
140 int checkChordOrnaments (
const notevisitor& note );
142 deque<notevisitor> getChord (
const S_note& note );
143 std::vector<Sxmlelement> getChord (
const Sxmlelement& note );
144 void checkStaff (
int staff );
145 void checkStem (
const S_stem& stem );
146 void checkBeamBegin (
const std::vector<S_beam>& beams,
const S_note& elt );
147 void checkBeamEnd (
const std::vector<S_beam>& beams );
148 void checkTupletBegin(
const std::vector<S_tuplet>& tuplets,
151 void checkTupletEnd (
const std::vector<S_tuplet>& tuplets );
156 void checkSlur (
const std::vector<S_slur>& slurs );
157 void checkSlurBegin (
const std::vector<S_slur>& slurs );
158 void checkSlurEnd (
const std::vector<S_slur>& slurs );
159 bool isSlurClosing(
S_slur elt);
160 void checkTiedBegin (
const std::vector<S_tied>& tied );
161 void checkTiedEnd (
const std::vector<S_tied>& tied );
165 void checkWavyTrillBegin (
const notevisitor& nv );
168 void newNote (
const notevisitor& nv,
rational posInMeasure,
const std::vector<Sxmlelement>& fingerings);
169 void newChord (
const deque<notevisitor>& nvs,
rational posInMeasure);
176 std::vector<S_beam>::const_iterator findValue (
const std::vector<S_beam>& beams,
const std::string& val )
const;
177 std::vector<S_slur>::const_iterator findTypeValue (
const std::vector<S_slur>& slurs,
const std::string& val )
const;
178 std::vector<S_tied>::const_iterator findTypeValue (
const std::vector<S_tied>& tied,
const std::string& val )
const;
179 std::vector< std::pair<int, int> >::const_iterator findSlur (
const int xmlnum )
const;
182 void checkLyricBegin (
const std::vector<S_lyric>& lyrics );
183 void checkLyricEnd (
const std::vector<S_lyric>& lyrics );
184 std::vector<S_lyric>::const_iterator findValue (
const std::vector<S_lyric>& lyrics,
185 const std::string& val )
const;
186 std::string lyricParams;
189 static std::string alter2accident (
float alter );
192 enum { kStemUndefined, kStemUp, kStemDown, kStemNone };
193 enum { kLeaveChord=-1, kNoChord, kEnterChord } chordState;
195 virtual void visitStart(
S_backup& elt);
196 virtual void visitStart(
S_barline& elt);
197 virtual void visitStart(
S_coda& elt);
200 virtual void visitStart(
S_forward& elt);
201 virtual void visitStart(
S_measure& elt);
202 virtual void visitStart(
S_note& elt);
203 virtual void visitStart(
S_part& elt);
204 virtual void visitStart(
S_segno& elt);
208 virtual void visitEnd (
S_ending& elt);
209 virtual void visitEnd (
S_key& elt);
211 virtual void visitEnd (
S_note& elt);
212 virtual void visitEnd (
S_repeat& elt);
213 virtual void visitEnd (
S_sound& elt);
214 virtual void visitEnd (
S_time& elt);
215 virtual void visitEnd (
S_part& elt);
227 float getNoteDistanceFromStaffTop(
const notevisitor& nv);
231 std::map<int, float> fStaffDistance;
234 xmlpart2guido(
bool generateComments,
bool generateStem,
bool generateBar =
true,
int startMeasure = 0,
int endMeasure = 0,
int endMeasureOffset = 0);
238 void initialize (Sguidoelement seq,
int staff,
int guidostaff,
int voice,
bool notesonly,
rational defaultTimeSign);
239 void generatePositions (
bool state) { fGeneratePositions = state; }
240 const rational& getTimeSign ()
const {
return fCurrentTimeSign; }
241 bool hasLyrics()
const {
return fHasLyrics;}
244 std::multimap<int, std::pair< int, std::pair< rational, string > > >
staffClefMap;
248 rational fStartPosition, fEndPosition;
250 int lastMeasureNumber() {
return fMeasNum; }
252 std::map<double, int> measurePositionMap;
254 double totalPartDuration() {
return fCurrentScorePosition.toDouble(); }
261 std::map<std::string, std::map<rational, int>>
octavas;
266 std::string getClef(
int staffIndex,
rational pos,
int measureNum);
279 float distanceFromStaffTopForNote(
const notevisitor& nv);
281 bool checkMeasureRange();
286 void checkOctavaBegin();
287 void checkOctavaEnd();
291 double fPreviousPedalYPos;
294 std::queue<int> fDirectionEraserStack;
std::multimap< int, std::pair< int, std::pair< rational, string > > > staffClefMap
Map for staffNum, measureNum, voice-Position and Clef.
Definition xmlpart2guido.h:244