LibMusicXML 3.22
|
A score visitor to produce a Guido representation.
#include <xml2guidovisitor.h>
Public Member Functions | |
xml2guidovisitor (bool generateComments, bool generateStem, bool generateBar=true, int partNum=0, int beginMeasure=0, int endMeasure=0, int endMeasureOffset=0) | |
Sguidoelement | convert (const Sxmlelement &xml) |
void | generatePositions (bool state) |
int | getTransposeInstrumentChromatic () |
MARK: Query methods. | |
std::string | getTransposeInstrumentName () |
int | getStavesForFirstPart () |
std::vector< std::string > | getAllClefsOfFirstPart () |
int | getTotalStaves () |
std::pair< long, long > | getStartPosition () |
std::pair< long, long > | getEndPosition () |
int | getTotalMeasures () |
std::map< double, int > | getMeasureMap () |
Returns a map<double,int> where the first are beat positions and second are measure numbers. | |
double | getTotalDuration () |
int | getPartsAvailable () |
Returne the number of parts in this XML Score. | |
Public Member Functions inherited from partlistvisitor | |
partGroup * | find_first_of_partID_inGroup (std::string partID) |
Returns the part group with first occurence of partID (string) | |
void | partID2range (partGroup &pGroup) |
Converts XML Part ID list to Guido's Staff range string. | |
bool | checkLonelyBarFormat (int staffID) |
Checks if current staff is lonely in terms of BarFormat definition. | |
Public Member Functions inherited from visitor< S_score_part > | |
virtual void | visitEnd (S_score_part &elt) |
Public Member Functions inherited from visitor< S_part_group > | |
virtual void | visitEnd (S_part_group &elt) |
Public Member Functions inherited from transposevisitor | |
virtual void | reset () |
Public Member Functions inherited from visitor< S_transpose > | |
virtual void | visitEnd (S_transpose &elt) |
Public Member Functions inherited from visitor< S_diatonic > | |
virtual void | visitEnd (S_diatonic &elt) |
Public Member Functions inherited from visitor< S_chromatic > | |
virtual void | visitEnd (S_chromatic &elt) |
Public Member Functions inherited from visitor< S_octave_change > | |
virtual void | visitEnd (S_octave_change &elt) |
Public Member Functions inherited from visitor< S_double > | |
virtual void | visitEnd (S_double &elt) |
Public Member Functions inherited from visitor< S_score_partwise > | |
virtual void | visitEnd (S_score_partwise &elt) |
Public Member Functions inherited from visitor< S_movement_title > | |
virtual void | visitEnd (S_movement_title &elt) |
Public Member Functions inherited from visitor< S_creator > | |
virtual void | visitEnd (S_creator &elt) |
Public Member Functions inherited from visitor< S_defaults > | |
virtual void | visitEnd (S_defaults &elt) |
Public Member Functions inherited from visitor< S_part > | |
virtual void | visitEnd (S_part &elt) |
Public Member Functions inherited from visitor< S_staves > | |
virtual void | visitEnd (S_staves &elt) |
Public Member Functions inherited from visitor< S_sign > | |
virtual void | visitEnd (S_sign &elt) |
Public Member Functions inherited from visitor< S_line > | |
virtual void | visitEnd (S_line &elt) |
Public Member Functions inherited from visitor< S_clef_octave_change > | |
virtual void | visitEnd (S_clef_octave_change &elt) |
Static Public Member Functions | |
static void | addPosition (Sxmlelement elt, Sguidoelement &tag, float yoffset) |
MARK: Position Helpers. | |
static void | addPosition (Sxmlelement elt, Sguidoelement &tag, float yoffset, float xoffset) |
static void | addPosY (Sxmlelement elt, Sguidoelement &tag, float yoffset, float ymultiplier) |
static void | addPosX (Sxmlelement elt, Sguidoelement &tag, float xoffset) |
static void | addRelativeX (Sxmlelement elt, Sguidoelement &tag, float xoffset) |
static void | addPlacement (Sxmlelement elt, Sguidoelement &tag) |
static float | getYposition (Sxmlelement elt, float yoffset, bool useDefault) |
static float | getXposition (Sxmlelement elt, float xoffset) |
static void | addDirection (Sxmlelement elt, Sguidoelement &tag) |
Protected Member Functions | |
virtual void | visitStart (S_score_partwise &elt) |
virtual void | visitStart (S_movement_title &elt) |
virtual void | visitStart (S_creator &elt) |
virtual void | visitStart (S_defaults &elt) |
virtual void | visitStart (S_part &elt) |
virtual void | visitStart (S_staves &elt) |
virtual void | visitEnd (S_clef &elt) |
Sguidoelement & | current () |
Protected Member Functions inherited from partlistvisitor | |
void | visitStart (S_score_part &elt) |
void | visitStart (S_part_group &elt) |
Protected Member Functions inherited from transposevisitor | |
virtual void | visitStart (S_transpose &elt) |
virtual void | visitStart (S_diatonic &elt) |
virtual void | visitStart (S_chromatic &elt) |
virtual void | visitStart (S_octave_change &elt) |
virtual void | visitStart (S_double &elt) |
Protected Member Functions inherited from clefvisitor | |
void | reset () |
virtual void | visitStart (S_clef &elt) |
virtual void | visitStart (S_sign &elt) |
virtual void | visitStart (S_line &elt) |
virtual void | visitStart (S_clef_octave_change &elt) |
Protected Attributes | |
bool | previousStaffHasLyrics |
int | fCurrentAccoladeIndex |
int | fPartNum |
int | fPartsAvailable |
int | fBeginMeasure |
int | fEndMeasure |
int | fEndMeasureOffset |
rational | fBeginPosition |
Guido Position corresponding to fBeginMeasure. | |
rational | fEndPosition |
Guido Position corresponding to fEndMeasure (without fEndMeasureOffset) | |
std::map< std::string, int > | stavesInPart |
std::map< std::string, std::set< std::string > > | clefsInPart |
std::string | currentPart |
int | fTotalMeasures |
Number of total measures in score. | |
std::map< double, int > | measurePositionMap |
Map containing measure number and Position (double output of Rational) | |
double | fTotalDuration |
Protected Attributes inherited from partlistvisitor | |
int | fPartGroupIncrementer |
std::vector< int > | fCurrentPartGroupIndex |
std::map< std::string, int > | part2staffmap |
int | staffCreatorCounter |
Static Protected Attributes | |
static int | defaultStaffDistance |
Additional Inherited Members | |
Public Types inherited from clefvisitor | |
enum | { kStandardLine , kTrebleStdLine =2 , kBassStdLine =4 , kCStdLine =3 , kTabStdLine =5 } |
enum | { kNoNumber = -1 } |
Public Attributes inherited from partlistvisitor | |
std::map< int, partGroup > | fPartGroups |
std::map< std::string, partHeader > | fPartHeaders |
Public Attributes inherited from transposevisitor | |
int | fDiatonic |
int | fChromatic |
int | fOctaveChange |
bool | fDouble |
Public Attributes inherited from clefvisitor | |
std::string | fSign |
int | fLine |
int | fOctaveChange |
int | fNumber |
std::vector< std::string > getAllClefsOfFirstPart | ( | ) |
Return the number of staves for the first part
int getStavesForFirstPart | ( | ) |
Return the number of staves for the first part
int getTotalStaves | ( | ) |
Return the total number of staves
References fBeginPosition.
int getTransposeInstrumentChromatic | ( | ) |
Provides Instrument Transposer of the score in Chromatic Scale
The transpose element represents what must be added to the written pitch to get the correct sounding pitch.
See (MusicXML Attribute Description)[http://www.musicxml.com/tutorial/the-midi-compatible-part/attributes/]
|
protectedvirtual |
Reimplemented from visitor< S_clef >.
|
protectedvirtual |
Reimplemented from visitor< S_creator >.
|
protectedvirtual |
Reimplemented from visitor< S_defaults >.
|
protectedvirtual |
Reimplemented from visitor< S_movement_title >.
|
protectedvirtual |
Reimplemented from visitor< S_part >.
|
protectedvirtual |
Reimplemented from visitor< S_score_partwise >.
|
protectedvirtual |
Reimplemented from visitor< S_staves >.