Setting the NoteHead scheme from normal to pitchname?

• Apr 11, 2025 - 02:08

In the UI, it is right-clink on staff -> "Staff/Part Properties" -> "Advanced style properties..."->"Notehead scheme:"

This NoteHead class is in the documentation. https://musescore.github.io/MuseScore_PluginAPI_Docs/plugins/html/class…

But got no idea how to set to retrieve and set it:

var style = curScore.style;
....
find the NoteHead-object
...
nh.Scheme = "HEAD_PITCHNAME"

or maybe with set/get from curScore.style?


Comments

If it helps, you can also set it on each individual note under Properties panel / Note / Head / Show more / Notehead scheme. (I had never seen it on Staff/Part properties, so thanks for showing me something new!)

If there is a way to globally set the notehead scheme it doesn't seem to be documented (it could be done by editing the mscx file, though). If you want to create a plugin to automate the notehead scheme change the easiest thing is to find/assign it via the 'headScheme' property of each individual note; but it wouldn't save much time compared to the method proposed by 'TheHutch' with a global selection of notes.

In reply to by Jojo-Schmitz

The only property that seems to be accessible in the mscx file refers to a single staff. If we change the appearance of the note head scheme with the 'headScheme' property, this affects the entire score (or a portion, or whatever you want). I'll leave you with the final philosophical disquisition on the subject.

In reply to by ILPEPITO

So what would be the syntax then? I tried inserting a line at line 39 in the staff->voices->chords->note loop of the Notes Names Solfege plugin.

    notes[i].headScheme = Scheme.HEAD_PITCHNAME; # Crashes MuseScore
    notes[i].headScheme = NoteHeadScheme.HEAD_PITCHNAME; # Does nothing

But these don't seem to work.

In reply to by dvrehen

I have no idea what plugin you are referring to. The correct syntax is the second one, but preceded and followed by these lines:
curScore.startCmd();
notes[i].headScheme = NoteHeadScheme.HEAD_PITCHNAME;
curScore.endCmd();
it works perfectly here for me (both 3.6.2 and 4.5.1), if it doesn't work for you I don't know what the reason could be.

In reply to by ILPEPITO

Okay, it is working now. Thanks. The previous line didn't have an ending ;

Anyway to view compile error easily in MuseScore 4.5.1? The plugin creator (seems missing in 4.5.1) in MuseScore 3.6.1 seems to crash MuseScore here even with the correct scripts, so hard to do plugin development there then.

Do you still have an unanswered question? Please log in first to post your question.