polyrhythm-project / polyrhythm-website

3 stars 3 forks source link

Dynamics attached to grace note and not regular note #52

Open craigsapp opened 4 years ago

craigsapp commented 4 years ago

Related to issue https://github.com/polyrhythm-project/polyrhythm-website/issues/16

For R809, the dynamics are not correct in the translation from MusicXML to Humdrum. But there is one problem to fix:

Screen Shot 2020-01-21 at 22 47 21

desired position of ppp is on the durational note, not the grace note:

Screen Shot 2020-01-21 at 22 49 35
craigsapp commented 4 years ago

In the MusicXML data, the decrescendo and the ppp dynamic are both ending on the first grace note:

                        <direction>
                                <direction-type>
                                        <wedge type='stop' number='1' relative-x='-8'/>
                                </direction-type>
                                <offset>-3</offset>
                                <staff>1</staff>
                        </direction>
                        <direction>
                                <direction-type>
                                        <dynamics  default-y='-70' relative-x='-6'>
                                                <ppp/>
                                        </dynamics>
                                </direction-type>
                                <staff>1</staff>
                        </direction>
                        <note>
                                <grace slash='no'/>
                                <pitch>
                                        <step>C</step>
                                        <octave>6</octave>
                                </pitch>
                                <voice>1</voice>
                                <type>16th</type>
                                <accidental>natural</accidental>
                                <stem>up</stem>
                                <staff>1</staff>
                                <notations>
                                        <slur type='start' number='1'/>
                                </notations>
                        </note>

Therefore the dynamic is being displayed properly in the conversion (and the MusicXML export from Sibelius is wrong). The decrescendo is attached to the timestamp rather than the notes in the conversion, and technically should end at the first grace note.

craigsapp commented 4 years ago

MuseScore is automatically moving the dynamics to the durational notes:

Screen Shot 2020-01-22 at 09 43 13

However, there are musical counter examples where the dynamic is desired to be attached to the grace notes and not to the duration notes after them. So most like this should be fixed by hand after conversion, or add an option to the convert to all moving the dynamics to the next durational note when they are attached to grace notes.