Skip to content

Commit

Permalink
Adjustment to the proportion handing in the CMME importer
Browse files Browse the repository at this point in the history
  • Loading branch information
lpugin committed Nov 4, 2024
1 parent 6f51374 commit df057f7
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/iocmme.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ bool CmmeInput::Import(const std::string &cmme)
try {
m_doc->Reset();
m_doc->SetType(Raw);
m_doc->SetMensuralMusicOnly(BOOLEAN_true);

// Genereate the header and add a comment to the project description
m_doc->GenerateMEIHeader(false);
Expand Down Expand Up @@ -1048,10 +1049,6 @@ data_DURATION CmmeInput::ReadDuration(pugi::xml_node durationNode, int &num, int
return duration;
}

// Apply the proportion
cmmeNum *= m_mensInfo->proportNum;
cmmeDen *= m_mensInfo->proportDen;

std::pair<int, int> ratio = { 1, 1 };

if (type == "Maxima") {
Expand All @@ -1076,6 +1073,11 @@ data_DURATION CmmeInput::ReadDuration(pugi::xml_node durationNode, int &num, int
ratio.second = 8;
}

// That would apply the proportion, but not needed because CMME works the other way around
// That is, the propostion is not coded in the note value but applied by the CMME processor
// cmmeNum *= m_mensInfo->proportNum;
// cmmeDen *= m_mensInfo->proportDen;

cmmeNum *= ratio.second;
cmmeDen *= ratio.first;

Expand Down

0 comments on commit df057f7

Please sign in to comment.