marcomusy / pianoplayer

Automatic fingering generator for piano scores
MIT License
710 stars 81 forks source link

Suggestion to UI #6

Closed mhoangvslev closed 6 years ago

mhoangvslev commented 6 years ago

Instead of writing fingering numbers as lyrics, could you consider using MuseScore's fingering notation? I think it would be more ergonomic and aesthetically more pleasing.

hofst commented 6 years ago

+1 that would be great!

hofst commented 6 years ago

did it myself ;-)

Feel free to adapt and migrate it into your project: https://github.com/marcomusy/pianoplayer/pull/7

mhoangvslev commented 6 years ago

send the author a pull request if you like.

marcomusy commented 6 years ago

@hofst following your code changes I tried shifting the numbers with adding something like

muf = Fingering(best_finger) # cannot shift them to make them visible

                # sty = Style()
                # sty.placement = 'below'
                # sty.offset = .90
                # sty.absoluteY = 30
                # muf.style = sty
                # an.note21.articulations.append(muf)

but there is no effect, so i'm switching back to the lyrics for the moment :(

hofst commented 6 years ago

@marcomusy

I also quickly noticed that there are some issues left, I believe I now have solved them all:

I will file proper pull requests when I find time. With those two patches, you will be able to emit properly fingered musicxml files.

Lastly, musescore 2 does not align fingerings properly. musescore 3 (or other programs like sibelius) should work fine. If you use musescore 2, you can either use the plugin "fixfingering" (https://musescore.org/en/project/fingering-positioner). Alternatively, as I do, you can configure the musescore2 style->text->fingerings settings as follows:

Demo: unbenannt

marcomusy commented 6 years ago

thanks @hofst this is very useful. I changed hand.py accordingly.

hofst commented 6 years ago

Pleasure ;) I applied for a a pull request for music21. Without that patch the fingerings for chords won't work yet: https://github.com/cuthbertLab/music21/pull/323

hofst commented 6 years ago

the pull request has been approved, so fingerings should now work with the next official version of music21: https://github.com/cuthbertLab/music21/pull/323#pullrequestreview-148662787