Hacker News new | ask | show | jobs
by loxias 1698 days ago
>Wish some HN coder genius would write a program that given sheet music as input, outputs the top 1-3 recommended fingerings for that music with explanations for which rules were applied.

While I am NOT claiming to be "some coder genius", a program that does exactly this is something on my "projects to-do" list. My partner (who's improving her piano skills) keeps crying out for more sheet music with fingerings...

Is there already a canonical set of rules to apply? My approach is to find fingerings through a sort of beam search, using a utility function for how hard it is to move between points in a 10 dimensional "finger space".

I'm sure this approach is Probably Wrong or at least Overkill, but it's the most mathematically interesting way... :)

4 comments

I was working on a similar project for nearly a year. I ran into trouble finding the correct fingerings and considered a very similar approach to the one you're taking - that is a simplified hand model with a cost-based heuristic.

My personal interest was more along the lines of acquiring statistical data from expert play. I'm supremely interested in this problem from a mathematical standpoint, but the data-set did not exist and I shelved the project as I'm a novice player.

I don't think the data-set would be very hard or very expensive to construct, given several experts and a program to generate note sequences. One could also sample from a large population of players, but then you have the bootstrap problem of attracting them before you offer enough value.

There are some very promising pathways for this developing if you're interested in the statistical approach. In any case I'd love to keep up with your project if you continue on.

I think it's probably not overkill, and actually I think it may need to be more complex than that (though simple methods may prove to work well enough in practice, so try them first!). There's all sorts of stuff do do with momentum, wrist angle, position back or forward on the keys, etc., so it depends on where on the keyboard the notes are and what notes are at the same time or before and after them, and so on. To look for optimal fingerings I'd probably model a hand and arm geometrically, with fingers on notes being constraints for a trajectory through hand-arm space.
> actually I think it may need to be more complex than that...

I like the way you think. thumbs up

Going the other way from mkl, I wonder if you don't really need beam search. Approximate as a finite state space, use https://en.wikipedia.org/wiki/Viterbi_algorithm
I've seen some papers about optimizing piano fingering on arxiv before. They used various kinds of machine learning. Some papers dealing with guitar fingering, too.