Hello, all. This is my first post to this list. I've written a plugin for MuseScore that places Staff Text notehead symbols (using Bravura Text font) on top of existing noteheads. I've also forked the MuseScore source on github and I'm currently working on it in Xcode. Here's what I've done so far in MuseScore, and would like some feedback from the developers before going much further or submitting a PR:
1. Added alphabetic and solfege notehead SymIds to the noteHeads array in note.cpp, and made the corresponding changes to the NoteHead Group enum in note.h, and to the heads array in inspectorNote.cpp.
2. Added a couple of getter/setter methods to the Score class which are exposed to the QML plugin - basically a getter that gets the name of the current _scoreFont in string format (rather than as a ScoreFont object, which the plugin does not recognize), and a setter that sets the _scoreFont (and the _style MusicalSymbolFont) based on string input (rather than ScoreFont input). These both have different signatures than the existing scoreFont getter/setters.
The upside to these changes is that the plugin can manipulate the musical symbol font (i.e., change to Bravura if it isn't already) and control the actual notehead of the note, rather than laying staff text on top of the notehead. The main downside I can see is that the note inspector shows all of those extra notehead groups, and if a user decides to use them within MuseScore, they only work if Bravura is the selected musical symbol font.
Looking forward to your input. Thanks!
To me, this is something that belongs in the core of MuseScore. Which is to say, rather than figuring out how to extend the framework to make it easier for a plugin to access, I think there should just be a style setting or perhaps staff property which, if set, would just do this automatically. It's something that had been discussed as a possibility for 2.1; i definitely support it. So if I were you, I would be thinking along those lines, now that you are looking at the actual MuseScore code. It seems it should actually be a fairly simple matter to hook into, hmm, probably Note::noteHead(), and return the proper head based on pitch if the style / staff option is set.
Not that exposing these noteheads in the Inspector and plugins is a bad thing. If the user has score font set to something other than Bravura, that should be made to work - we have a "fall back" font for just that purpose.
Regarding 1/, I think it's the way to go. We could also add the missing noteheads to the other fonts if needed.
Regarding 2/, if it's not needed, I would not add it to the plugin framework.
Regarding the implementation in the core, CraigFisher started a much larger endeavor here https://github.com/CraigFisher/MuseScore/tree/alternative to support many kind of alternative notations. As far as I know, it also features a way to associate a given pitch or degree to a notehead shape among many other features.