colornotes.qml fails to color grace notes

• Mar 21, 2015 - 19:55

On using the colornotes.qml plugin in Musescore 2.0 RC the grace notes remain uncolored.
A preceeding note is also commonly affected by lack of color - see the black D in the inserted screenshot above.

I am using Musescore 2.0 RC in WINE in Ubuntu (Linux Mint)

In Musescore 1.3 the colornotes.js plugin was able to color all of these grace notes.


Hmm, OK, I do now have a (hopefully) working version, based on a gist from @lasconic, see attached, but it only colors, it doesn't toggle as the previous version (for 2.0 and 1.3) did.

If I try to toggle, i.e. switch to black if the current color is not black and only color if it was black before, some elements get hit several times, and those that get hit an even amount of times end up the same color as before. This is probably the cause for that D in your example to stay black, it just got toggled twice...

On the plus side now also rests as well as the dots, beams, stems, stem-slashes and accidentals of notes and gracenotes get colored.

Attachment Size
ColorVoices.qml 4.89 KB

I don't where this has relevance or is helpful but I've noticed a very small issue about ties when colouring without a plugin.

I clicked on a bar with a mix of elements to highlight it and in the Inspector clicked on Select Colour and chose a red and clicked OK and then Set Colour.
All the elements in the bar changed to red.

Then to reset the bar's colour to black I selected the whole piece using Ctrl-A and hit Set Colour to give the default black.
All the elements turned black except for the tie in the bar which remained red!

ties not coloured black on select all.png
Above I did two bars and you can see only the tie remains red.
On highlighting the bar with the red bar in isolation (rather than by Ctrl-A) and hitting Set Colour for default black will happily return the red tie to black.

OK, I've just submitted a fixed version, 4cfe0c3. It does now color notes, stems, flags, note dots, stem slashes and accidental as per the voice.
It does not color beams (actually colors them black) yet, I couldn't get it to work properly for beams belonging to an even number of chords.
I haven't yet tried, but I guess it would have the same issue with slurs and ties (esp. the latter, as they always belong to 2 notes). Not sure even whether coloring slurs/ties via a plugin is possible at all...