Skip to content

Commit

Permalink
Notenames plugins: For hidden notes skip notenames
Browse files Browse the repository at this point in the history
  • Loading branch information
Jojo-Schmitz committed May 23, 2021
1 parent b30a63f commit 3530a10
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
8 changes: 5 additions & 3 deletions share/plugins/notenames-interactive.qml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import QtQuick.Controls 2.0
import MuseScore 3.0

MuseScore {
version: "3.4"
version: "3.6"
description: qsTr("This plugin names notes as per your language setting")
menuPath: "Plugins.Notes." + qsTr("Note Names (Interactive)")
pluginType: "dock"
Expand Down Expand Up @@ -64,9 +64,11 @@ MuseScore {
function getChordName(chord) {
var text = "";
var notes = chord.notes;
var sep = "\n"; // change to "," if you want them horizontally (anybody?)
for (var i = 0; i < notes.length; i++) {
var sep = "\n"; // change to "," if you want them horizontally (anybody?)
if ( i > 0 )
if (!notes[i].visible)
continue // skip invisible notes
if (i > 0 && notes[i-1].visible)
text = sep + text; // any but top note
if (typeof notes[i].tpc === "undefined") // like for grace notes ?!?
return;
Expand Down
8 changes: 5 additions & 3 deletions share/plugins/notenames.qml
Original file line number Diff line number Diff line change
Expand Up @@ -24,17 +24,19 @@ import QtQuick 2.2
import MuseScore 3.0

MuseScore {
version: "3.4.2.1"
version: "3.6"
description: qsTr("This plugin names notes as per your language setting")
menuPath: "Plugins.Notes." + qsTr("Note Names")

// Small note name size is fraction of the full font size.
property var fontSizeMini: 0.7;

function nameChord (notes, text, small) {
var sep = "\n"; // change to "," if you want them horizontally (anybody?)
for (var i = 0; i < notes.length; i++) {
var sep = "\n"; // change to "," if you want them horizontally (anybody?)
if ( i > 0 )
if (!notes[i].visible)
continue // skip invisible notes
if (i > 0 && notes[i-1].visible)
text.text = sep + text.text; // any but top note
if (small)
text.fontSize *= fontSizeMini
Expand Down

0 comments on commit 3530a10

Please sign in to comment.