Setting the NoteHead scheme from normal to pitchname?
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 If there is a way to… by ILPEPITO
Not globally, but a staff property
In reply to Not globally, but a staff… by Jojo-Schmitz
Globally, in the sense of changing the appearance of the head not one note at a time but all together. In the context, the clarification seemed unnecessary to me.
In reply to Globally, in the sense of… by ILPEPITO
OK, then globally by setting the corresponding staff property
In reply to OK, then globally by setting… 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 The only property that seems… by ILPEPITO
As I said, it is a staff property...
In reply to If there is a way 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.
But these don't seem to work.
In reply to So what would be syntax then… 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 I have no idea what plugin… 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.
In reply to Okay, it is working now… by dvrehen
Why using 3.6.1?
Anyway, crashing there is a bad sign for that plugin
In 4.x the only option is to check the logs for output from the plugin