Ask for Plugins :notename

• May 6, 2023 - 15:51

I noticed that the notename plugin cannot recognize the symbol for ”note. rest“. How can I make the notename recognize “note. rest” and output a '0'。

This is NoteName plugin's website : https://musescore.org/zh-hans/project/note-names

331.png


Comments

Well, the notenames plugin names notes, not rests, which don't have a name to begin with.
And this loop in the plugin:

            while (cursor.segment && (fullScore || cursor.tick < endTick)) {
               if (cursor.element && cursor.element.type === Element.CHORD) {
...
               } // end if CHORD
               cursor.next();
            } // end while segment

deals with chords only.

In reply to by Jojo-Schmitz

Can you add an else statement to make the rest character output "0", like this:

else { // if (cursor.isRest) { // if ( cursor.isRest() ){ // output staff_text "0"
// console.log(cursor.isRest);
switch (voice) {
case 0: text.offsetY = yPos+10; break;
case 1: text.offsetY = yPos+2+10; break;
case 2: text.offsetY = yPos+4+10; break;
case 3: text.offsetY = yPos+6+10; break;
}
text.color= fontColor;
text.offsetX= xPos;

        text.text= fontSizeTag + fontFaceTag+qsTr("0"); // ゼロを表示

        text.offsetY = -yPos;   //ゼロのY    2020.1.17
        text.offsetX = -xPos;   //ゼロのX    2020.1.17

//console.log(text.offsetY+" "+yPos)
// cursor.add(text);
......

In reply to by davil123

Add this before the cursor.next:

               else if (cursor.element && cursor.element.type === Element.REST) {
                  var text = newElement(Element.STAFF_TEXT);      // Make a STAFF_TEXT
                  text.text = "0"
                  cursor.add(text);
 
                  switch (cursor.voice) {
                     case 1: case 3: text.placement = Placement.BELOW; break;
                  }
               } // end if REST

In reply to by Jojo-Schmitz

Thank you very much !! I still have two problems making the score.
1. How to delete all extra clef information in the score through the MuseScore plugin, and
2. How to make the staff line invisible through the MuseScore plugin.
Can these two functions be achieved through the current MuseScore plugin?
invisible  staff line.png

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