After this commit the note/octave offset-related stuff works really well for most cases but there are still a few things to think about and fix, mostly relating to < A0 and > C8.
I mean, as much as 88 keys makes sense, there exist now 108-key grand pianos, so we should probably only special-case anything outside of the range C0 - B8.
Relevant code here, here, here, here and here.
After this commit the note/octave offset-related stuff works really well for most cases but there are still a few things to think about and fix, mostly relating to < A0 and > C8.
I mean, as much as 88 keys makes sense, there exist now 108-key grand pianos, so we should probably only special-case anything outside of the range C0 - B8.
Relevant code here, here, here, here and here.