polyrhythm-project / polyrhythm-website

3 stars 3 forks source link

Extra Rests #86

Open aaronearlgraham opened 4 years ago

aaronearlgraham commented 4 years ago

T270 - Ives - Extra rests added in Piano mm. 3

SIB: image

VHV: image

Extra rest is also affecting horizontal spacing of notes for the remainder of excerpt

craigsapp commented 4 years ago

This is a mess caused by a bug in Sibelius MusicXML export; however, I should be able to compensate for it.

The problem is that the quintuplet 8ths are given a duration of "307", while the half note is given a duration of "1536". 5 * 307 = 1535. I already compensate for such math irregularities in Sibelius MusicXML output, but it did not catch this case. Probably because the music is written for the part in such a way that the first quintuplet 8th chord is written, then the half note, and then the four other quintuplet 8th notes.

Whenever the duration information does not add up, I switch to other parameters, such as these for a quintuplet eight note:

 <note>
                                <chord/>
                                <pitch>
                                        <step>F</step>
                                        <alter>1</alter>
                                        <octave>6</octave>
                                </pitch>
                                <duration>307</duration>
                                <voice>1</voice>
                                <type>eighth</type>
                                <accidental>sharp</accidental>
                                <time-modification>
                                        <actual-notes>5</actual-notes>
                                        <normal-notes>4</normal-notes>
                                </time-modification>
                                <stem>up</stem>
                                <staff>1</staff>
                                <notations>
                                        <arpeggiate/>
                                </notations>
                        </note>

The <type> and <time-modification> are needed to construct the correct duration rather than using the <duration> information. It is more complicated due to the need to process <dot> elements for augmentation dots, etc. My converter calculates the duration from those elements and compares it to the duration parameter, and when it does not agree it avoids the duration parameter. But in this case the disagreement was hidden by interleaving the voices in the MusicXML data.