How to edit Color Notes plugin in MS 4.x
Hi all, searched but couldn't find an answer to my question.
I want to edit the Color Notes plugin to set custom note colours but my \Documents\MuseScore4\Plugins folder is empty, which I believe is where the plugin is supposed to be located?
Is it still possible to edit the plugin in 4.x? I'm aware we're in a limbo period at the moment while the plugins system gets overhauled.
Many thanks,
Joe
Comments
That folder is where your own plugins go - ones you write or download - but the pre-installed ones are in the application folder. Probably best to simply download the from the source itself - https://raw.githubusercontent.com/musescore/MuseScore/master/share/plug…
In reply to That folder is where your… by Marc Sabatella
Hi Marc, thanks so much for your reply, that's very helpful. Once I've edited that file where do I save it to for it to take effect?
In reply to Hi Marc, thanks so much for… by joecm
To your plugins folder. Be sure to change the title so you can tell it apart from the pre-installed version.
In reply to To your plugins folder. Be… by Marc Sabatella
Perfect, thank you very much.
In reply to Perfect, thank you very much. by joecm
Hi there, I'm interested in doing this as well. is there a trick to saving a .qml file? Can I just edit it in text edit, save the file, and then put it in the plug ins folder?
thanks
jordan
In reply to Hi there, I'm interested in… by jordanstern
Hi Jordan, exactly that :) just remember to give it a different 'title' in the code so you can tell them apart
In reply to That folder is where your… by Marc Sabatella
I just want to change the hex value of one of the colors on this plugin (the yellow is too lemon and hard to read). I tried to follow your instructions here and also checked with the plugins section of the handbook. I made a copy of the original color notes qml_disabled file that was in the plugins folder. I used notepad++ to put in the new hex color code and saved the file with a new name. I made sure it's in the plugins folder and that the "folders" section in preferences is pointing to the right folder. But the new plugin doesn't show up in the plugins menu. Is there something else I need to do? I'm running version 4.4.1 on a Windows 11 PC.
In reply to I just want to change the… by singinglizard1
made a copy of the original color notes qml_disabled file that was in the plugins folder
I guess that name is self-explanatory, isn't it?
In reply to made a copy of the original… by Jojo-Schmitz
I was confused by that as well, but that's the file extension of the original color notes plugin, which has been working just fine for a long time. It's also the extension for the courtesy accidentals plugin.
In reply to I was confused by that as… by singinglizard1
The extension needs to be .qml and not .qml_disabled
I have tried to modify ColorNotes_tpc.zip plugin to color only accidentals and sharps/flats, red for # and sharp notes and blue for b and flat notes, leaving all other notes as black. This is quite useful to quickly note sharps and flats if phrases are long and key is quite complex. However, manipulating TPC order leads to strange results and I failed to achieve desired effects. I have made Musescore 3 working plugin, but it does not work in Muscore 4. Perhaps someone could do it quickly as I have been struggling with this for a long time.
In reply to I have tried to modify… by Wlodzislaw
What specifically goes wrong when you try?
In reply to What specifically goes wrong… by Marc Sabatella
Here is my simple code, but it does not load.
//=============================================================================
// MuseScore
// Music Composition & Notation
//
// Changes by: Wlodzislaw Duch
//
// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License version 2
// as published by the Free Software Foundation and appearing in the file LICENCE.GPL
//=============================================================================
import QtQuick 2.9
import MuseScore 4.0
MuseScore {
version: "4.0"
description: qsTr("This plugin colors sharp notes red and flat notes blue")
menuPath: "Plugins"
}
In reply to Here is my simple code, but… by Wlodzislaw
This looks dubious to me: note.accidental.symbol === "flat"
Look at
https://musescore.org/nl/project/add-and-remove-courtesy-accidentals
how a plugin looks for accidentals via tpc
EDIT:
In the attached colornotes3.qml I added at line 83
console.log("note.accidental.symbol = ", note.accidental.symbol)
and the Plugin Creator window (MU3 only) says
Debug: hello colornotes
Debug: note.accidental.symbol = undefined
Also: https://musescore.org/en/project/colornotestpc
seems to do what you want (& more)
colornotes3.qml
In reply to This looks dubious to me:… by elsewhere
and
import MuseScore 4.0
should be 3.0
There are & in the code. Best add a qml file instead of copy/paste
In reply to and import MuseScore 4.0… by graffesmusic
What should I do with &?
In reply to This looks dubious to me:… by elsewhere
Thank you for advice. I was trying to use colornotes3, it is coloring each note in a different way and I want only sharps and flat to be clearly visible. I was experimenting with color assignments but could not get proper colors, I have made once working Musescore 3 version, but it does not work in MS4.
Accidental.FLAT; and Accidental.SHARP;
It still does not work.
In reply to Thank you for advice. I was… by Wlodzislaw
Is this what you want?
ColorNotes_tpc.qml
In reply to Is this what uou want? … by elsewhere
Yes! Thank you! the only change I'd like is to color sharp and flat the same as note.
In reply to Yes! Thank you! the only… by Wlodzislaw
I don't understand: " to color sharp and flat the same as note". Give a verbal or picture example
In reply to I don't understand: " to… by elsewhere
Sharp sign # is now black, I would like to change color to be both red, the note and # in front, to make it more visible. Same for flats, b and the note should be both blue. I have changed the colors but can't find instruction to change accidental symbols.
In reply to Sharp sign # is now black, I… by Wlodzislaw
Another problem is that it does not recognize accidentals in the scale, for example if I have D maj than C and F are sharps, but the program does not recognize that.
In reply to Sharp sign # is now black, I… by Wlodzislaw
All you need to do is after e.g. the line
note.color = "#ff0000”
add the line:
note.accidental.color = "#ff0000"
(It’s in plain sight in the colornotes3 plugin)
In reply to All you need to do is after… by elsewhere
I have tried to add it to this loop, but the plugin does not load with this line. Should it go somewhere else?
In reply to I have tried to add it to… by Wlodzislaw
You don't know anything about coding in javascript. If an 'if' statement is followed by 2 lines of code it needs to be in brackets {}. If you run you code from the plugin creator you will see error messages (often confusing), e.g.
if (note.tpc < 13){
note.color = "#0000ff"
note.accidental.color = "#0000ff"
}
In reply to You don't know anything… by elsewhere
Thank you for this reminder, indeed I have not done any JS programming for years and made an obvious error.
Accidentals placed before note change colors correctly, but those that define scale are not recognized.
Still the script does not work well. It does not color sharps and flats that are in the scale, I am just trying to color a piece where 4 scales are used and have to make manual selections in different parts.
In reply to Thank you for this reminder,… by Wlodzislaw
I give up. It's like shooting at a moving target