Skip to content

Commit

Permalink
Merge pull request #88 from WolfgangDrescher/musicxml2hum
Browse files Browse the repository at this point in the history
[musicxml2hum] Fix missing lines when nowevents includes nonzerodur elements
  • Loading branch information
craigsapp authored Dec 12, 2023
2 parents 706808c + 7df2873 commit 6047795
Show file tree
Hide file tree
Showing 8 changed files with 289 additions and 78 deletions.
1 change: 1 addition & 0 deletions include/MxmlEvent.h
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ class MxmlEvent {
void setVoiceNumber (int value);
int getStaffNumber (void) const;
int getStaffIndex (void) const;
int getCrossStaffOffset(void) const;
int getVoiceIndex (int maxvoice = 4) const;
void setStaffNumber (int value);
measure_event_type getType (void) const;
Expand Down
3 changes: 3 additions & 0 deletions include/MxmlPart.h
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,9 @@ class MxmlPart {
string getPartAbbr (void) const;
string cleanSpaces (const string& input);
bool hasOrnaments (void) const;

vector<pair<int, int>> getVoiceMapping (void) { return m_voicemapping; };
vector<vector<int>> getStaffVoiceHist (void) { return m_staffvoicehist; };


private:
Expand Down
7 changes: 5 additions & 2 deletions include/tool-musicxml2hum.h
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ class Tool_musicxml2hum : public HumTool {
std::vector<SimultaneousEvents*>& nowevents,
HumNum nowtime,
std::vector<MxmlPart>& partdata);
void handleFiguredBassWithoutNonZeroEvent (std::vector<SimultaneousEvents*>& nowevents, HumNum nowtime);
void appendNonZeroEvents (GridMeasure* outdata,
std::vector<SimultaneousEvents*>& nowevents,
HumNum nowtime,
Expand Down Expand Up @@ -231,12 +232,14 @@ class Tool_musicxml2hum : public HumTool {
bool m_stemsQ = false;
int m_slurabove = 0;
int m_slurbelow = 0;
int m_staffabove = 0;
int m_staffbelow = 0;
char m_hasEditorial = '\0';
bool m_hasOrnamentsQ = false;
int m_maxstaff = 0;
std::vector<std::vector<std::string>> m_last_ottava_direction;
std::vector<MusicXmlHarmonyInfo> offsetHarmony;
std::vector<MusicXmlFiguredBassInfo> offsetFiguredBass;
std::vector<MusicXmlFiguredBassInfo> m_offsetFiguredBass;
std::vector<string> m_stop_char;

// RDF indications in **kern data:
Expand All @@ -249,7 +252,7 @@ class Tool_musicxml2hum : public HumTool {
std::vector<std::vector<pugi::xml_node>> m_current_brackets;
std::map<int, string> m_bracket_type_buffer;
std::vector<std::vector<pugi::xml_node>> m_used_hairpins;
std::vector<pugi::xml_node> m_current_figured_bass;
std::vector<std::vector<pugi::xml_node>> m_current_figured_bass;
std::vector<std::pair<int, pugi::xml_node>> m_current_text;
std::vector<std::pair<int, pugi::xml_node>> m_current_tempo;

Expand Down
Loading

0 comments on commit 6047795

Please sign in to comment.