ELVIS-Project / elvis-database

:musical_score: ELVIS Database Web Application
15 stars 5 forks source link

'whole' note cannot be appended after 'breve' note #249

Closed juyaolongpaul closed 7 years ago

juyaolongpaul commented 7 years ago

In order to replace breve note, I need to change breve into whole for the original note, and append an identical whole note right after it and tie two whole note together.

If I just use layer.addChild(note), the new note will be appended as the last note of the layer in the current measure, which is not what I want. Later on, I explore the function of pymei, and find there is a function called addChildBefore, so I thought if I append the new note before the note which is after the breve note, it will be correct. Unfortunately, it does not work, when there is only one breve note in the measure (The next note is actually in different layers or even different measures, the new note is appended before this note! I found this type of error when I test the code).

addChildAfter will perfectly solve this problem, but there is no such function in pymei.

vigliensoni commented 7 years ago

It would be great if you close the issues in the actual commits. This would help to understand how you fix the issues.