Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[musicxml2hum] Fix missing lines when nowevents includes nonzerodur elements #88

Merged
merged 18 commits into from
Dec 12, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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