Skip to content

Commit

Permalink
Read first note of chords
Browse files Browse the repository at this point in the history
  • Loading branch information
lpugin committed Sep 9, 2014
1 parent b608809 commit a2d7f97
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion src/iomei.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1085,7 +1085,12 @@ bool MeiInput::ReadMeiLayerElement( pugi::xml_node xmlElement )
else if ( std::string( xmlElement.name() ) == "app" ) {
vrvElement = ReadMeiApp( xmlElement );
}
// unkown
// chord - temporary, read only the first note
else if ( std::string( xmlElement.name() ) == "chord" ) {
LogDebug("Only first note of chords is read" );
ReadUnsupported(xmlElement);
}
// unknown
else {
LogDebug("Element %s ignored", xmlElement.name() );
}
Expand Down Expand Up @@ -1457,6 +1462,13 @@ bool MeiInput::ReadUnsupported( pugi::xml_node element )
}
m_measure = NULL;
}
else if ( std::string( element.name() ) == "chord" ) {
pugi::xml_node note = element.child("note");
note.append_attribute( "dur" ) = element.attribute("dur").value();
if (ReadMeiLayerElement( note )) {
LogMessage( "<note> in chord read!" );
}
}
else if ( std::string( element.name() ) == "tupletSpan" ) {
if (!ReadTupletSpanAsTuplet( element )) {
LogWarning( "<tupletSpan> not readable as <tuplet> and ignored" );
Expand Down

0 comments on commit a2d7f97

Please sign in to comment.