MuseScore
3.4
Music composition and notation
|
#include <importmxmlpass2.h>
Public Member Functions | |
MusicXMLParserPass2 (Score *score, MusicXMLParserPass1 &pass1, MxmlLogger *logger) | |
Score::FileError | parse (QIODevice *device) |
Parse MusicXML in device and extract pass 2 data. More... | |
void | addSpanner (const MusicXmlSpannerDesc &desc) |
MusicXmlExtendedSpannerDesc & | getSpanner (const MusicXmlSpannerDesc &desc) |
void | clearSpanner (const MusicXmlSpannerDesc &desc) |
Private Member Functions | |
void | initPartState (const QString &partId) |
Initialize members as required for reading the MusicXML part element. More... | |
SpannerSet | findIncompleteSpannersAtPartEnd () |
Score::FileError | parse () |
Start the parsing process, after verifying the top-level node is score-partwise. More... | |
void | scorePartwise () |
Parse the MusicXML top-level (XPath /score-partwise) node. More... | |
void | partList () |
Parse the /score-partwise/part-list node. More... | |
void | scorePart () |
void | part () |
Parse the /score-partwise/part node. More... | |
void | measChordNote () |
void | measChordFlush () |
void | measure (const QString &partId, const Fraction time) |
Parse the /score-partwise/part/measure node. More... | |
void | attributes (const QString &partId, Measure *measure, const Fraction &tick) |
Parse the /score-partwise/part/measure/attributes node. More... | |
void | measureStyle (Measure *measure) |
Parse the /score-partwise/part/measure/measure-style node. More... | |
void | print (Measure *measure) |
Parse the /score-partwise/part/measure/print node. More... | |
void | barline (const QString &partId, Measure *measure, const Fraction &tick) |
Parse the /score-partwise/part/measure/barline node. More... | |
void | key (const QString &partId, Measure *measure, const Fraction &tick) |
Parse the /score-partwise/part/measure/attributes/key node. More... | |
void | clef (const QString &partId, Measure *measure, const Fraction &tick) |
Parse the /score-partwise/part/measure/attributes/clef node. More... | |
void | time (const QString &partId, Measure *measure, const Fraction &tick) |
Parse the /score-partwise/part/measure/attributes/time node. More... | |
void | divisions () |
Parse the /score-partwise/part/measure/attributes/divisions node. More... | |
void | transpose (const QString &partId) |
Parse the /score-partwise/part/measure/attributes/transpose node. More... | |
Note * | note (const QString &partId, Measure *measure, const Fraction sTime, const Fraction prevTime, Fraction &missingPrev, Fraction &dura, Fraction &missingCurr, QString ¤tVoice, GraceChordList &gcl, int &gac, Beam *&beam, FiguredBassList &fbl, int &alt, MxmlTupletStates &tupletStates, Tuplets &tuplets) |
Parse the /score-partwise/part/measure/note node. More... | |
void | notePrintSpacingNo (Fraction &dura) |
Parse the /score-partwise/part/measure/note node for a note with print-spacing="no". More... | |
FiguredBassItem * | figure (const int idx, const bool paren) |
Parse the /score-partwise/part/measure/harmony/figured-bass/figure node. More... | |
FiguredBass * | figuredBass () |
Parse the /score-partwise/part/measure/harmony/figured-bass node. More... | |
FretDiagram * | frame () |
Parse the /score-partwise/part/measure/harmony/frame node. More... | |
void | harmony (const QString &partId, Measure *measure, const Fraction sTime) |
Parse the /score-partwise/part/measure/harmony node. More... | |
Accidental * | accidental () |
void | beam (Beam::Mode &beamMode) |
Parse the /score-partwise/part/measure/note/beam node. More... | |
void | duration (Fraction &dura) |
Parse the /score-partwise/part/measure/note/duration node. More... | |
void | forward (Fraction &dura) |
Parse the /score-partwise/part/measure/note/forward node. More... | |
void | backup (Fraction &dura) |
Parse the /score-partwise/part/measure/note/backup node. More... | |
void | timeModification (Fraction &timeMod, TDuration &normalType) |
void | stem (Direction &sd, bool &nost) |
Parse the /score-partwise/part/measure/note/stem node. More... | |
void | doEnding (const QString &partId, Measure *measure, const QString &number, const QString &type, const QString &text) |
void | staffDetails (const QString &partId) |
Parse the /score-partwise/part/measure/attributes/staff-details node. More... | |
void | staffTuning (StringData *t) |
Parse the /score-partwise/part/measure/attributes/staff-details/staff-tuning node. More... | |
void | skipLogCurrElem () |
Skip the current element, log debug as info. More... | |
void | setMultiMeasureRestCount (int count) |
Set the multi-measure rest counter. More... | |
int | getAndDecMultiMeasureRestCount () |
Return current multi-measure rest counter. More... | |
Ms::MusicXMLParserPass2::MusicXMLParserPass2 | ( | Score * | score, |
MusicXMLParserPass1 & | pass1, | ||
MxmlLogger * | logger | ||
) |
|
private |
void Ms::MusicXMLParserPass2::addSpanner | ( | const MusicXmlSpannerDesc & | desc | ) |
|
private |
Parse the /score-partwise/part/measure/attributes node.
|
private |
Parse the /score-partwise/part/measure/note/backup node.
|
private |
Parse the /score-partwise/part/measure/barline node.
|
private |
Parse the /score-partwise/part/measure/note/beam node.
Sets beamMode in case of begin, continue or end beam number 1.
void Ms::MusicXMLParserPass2::clearSpanner | ( | const MusicXmlSpannerDesc & | desc | ) |
|
private |
Parse the /score-partwise/part/measure/attributes/clef node.
|
private |
Parse the /score-partwise/part/measure/attributes/divisions node.
|
private |
|
private |
Parse the /score-partwise/part/measure/note/duration node.
|
private |
Parse the /score-partwise/part/measure/harmony/figured-bass/figure node.
Return the result as a FiguredBassItem.
|
private |
Parse the /score-partwise/part/measure/harmony/figured-bass node.
TODO check description: Set the FiguredBass state based on the MusicXML <figured-bass> node de. Note that onNote and ticks must be set by the MusicXML importer, as the required context is not present in the items DOM tree. Exception: if a <duration> element is present, tick can be set. Return the result as a FiguredBass if valid, non-empty figure(s) are found. Return 0 in case of error.
|
private |
|
private |
Parse the /score-partwise/part/measure/note/forward node.
|
private |
Parse the /score-partwise/part/measure/harmony/frame node.
Return the result as a FretDiagram.
|
private |
Return current multi-measure rest counter.
Decrement counter if possible (not beyond -1).
MusicXmlExtendedSpannerDesc & Ms::MusicXMLParserPass2::getSpanner | ( | const MusicXmlSpannerDesc & | desc | ) |
|
private |
Parse the /score-partwise/part/measure/harmony node.
|
private |
Initialize members as required for reading the MusicXML part element.
TODO: factor out part reading into a separate class TODO: preferably use automatically initialized variables Note that Qt automatically initializes new elements in QVector (tuplets).
|
private |
Parse the /score-partwise/part/measure/attributes/key node.
|
private |
|
private |
|
private |
Parse the /score-partwise/part/measure node.
|
private |
Parse the /score-partwise/part/measure/measure-style node.
Initializes the "in multi-measure rest" state
|
private |
Parse the /score-partwise/part/measure/note node.
|
private |
Parse the /score-partwise/part/measure/note node for a note with print-spacing="no".
These are handled like a forward: only moving the time forward.
Score::FileError Ms::MusicXMLParserPass2::parse | ( | QIODevice * | device | ) |
Parse MusicXML in device and extract pass 2 data.
|
private |
Start the parsing process, after verifying the top-level node is score-partwise.
|
private |
Parse the /score-partwise/part node.
|
private |
Parse the /score-partwise/part-list node.
|
private |
Parse the /score-partwise/part/measure/print node.
|
private |
|
private |
Parse the MusicXML top-level (XPath /score-partwise) node.
|
private |
Set the multi-measure rest counter.
|
private |
Skip the current element, log debug as info.
|
private |
Parse the /score-partwise/part/measure/attributes/staff-details node.
|
private |
Parse the /score-partwise/part/measure/attributes/staff-details/staff-tuning node.
|
private |
Parse the /score-partwise/part/measure/note/stem node.
|
private |
Parse the /score-partwise/part/measure/attributes/time node.
|
private |
|
private |
Parse the /score-partwise/part/measure/attributes/transpose node.
|
private |
|
private |
|
private |
|
private |
|
private |
Lyrics with "extend" requiring fixup.
|
private |
Current figured bass element (to attach to next note)
|
private |
Current slides ([0]) / glissandi ([1])
|
private |
Current hairpins.
|
private |
Current harmony.
|
private |
drumset defined TODO: move to pass 1
|
private |
|
private |
Error logger.
|
private |
|
private |
Current ottavas.
|
private |
|
private |
Current pedal.
|
private |
Current pedal type="change" requiring fixup.
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
Starting chord for current tremolo.
|
private |
Current trills.