ColorNotes v2 ( colors also stem and beam)
Just did a review on the Musescore's 2 standard plugin Color Notes ( colornotes.qml ).
You'll normally find it here:
Plugins/Notes/Color Notes .
(or may need to enable in Plugins/Plugin Manager .)
Cleaned up and optimized source code.
Added some more comments and just for fun made it even more colorful by also including the stem and beam of the notes when applying the colors. As you see on the picture:
Well delete or uncomment the following piece of code if you don't like this / want the default behavior back:
//
// color also the stem and beam of the Note
//
var the = cursor.element;
applyColorOn( the.stem );
applyColorOn( the.hook);
applyColorOn( the.beam);
applyColorOn( the.stemSlash);
so I'll look again like this:
Note uncommenting can be done like this
/* var the = cursor.elem...
applyColorOn( the.stemSlash);
/*
via /* .. */ or by adding // at the beginning of each line.
Installation:
To install this download attached colornotes.qml and copy it to
%ProgramFiles%\MuseScore 2\plugins\colornotes.qml
... and make it readonly. (right click properties Attribute read only)
So it'll may survive/resist an update to a new version.
or better & cleaner
1. copy it to %USERPROFILE%\.musescore\plugins\colornotes.qml
2. and disable the old + add & enable it via Plugins/Plugin Manager
// History:
//
// 2.1 Jul 2015 by Djamana
// * Rainbow scale applied to circle of fifth┤s
//
// 2.0 Jul 2015 by Djamana
// * cleaned up & reordered source code
// * #,b and . color is now always linked to the note
// * color also the stem and beam of the notes
//
Attachment | Size |
---|---|
colornotes.qml | 6.34 KB |
Comments
Thank you for the review.
However, it's a bad idea to change files in the MuseScore installation directory. You can just copy the file in Documents/MuseScore 2/Plugins and it will survive between updates.
In reply to Thank you for the by [DELETED] 5
Oh yes good point - else the file will get killed by the update.
However maybe the intentions was that one of the Musecore developer may review it and put it partly or full inside Musecore 2 so it'll be in the next update. *smile*
Someone of them in here reading reading this?
Or how to contact them make a contribution to the source?
However path should be:
%USERPROFILE%\.musescore\plugins\
It'll get expanded to somewhat like
c:\Users\Alpenmilch\.musescore\plugins\
I'll edit the initial post.
As that plugin colors notes as per their pitch, to make it easier to play them, it probably isn't a good idea to color stems and flags too, as these belong to the chords, of which the note is just one of potentially several. For beams it is even worse, they most likely connect chords of different pitches, so these changes would cause confusion rahter than clarity, IMHO.
In reply to As that plugin colors notes by Jojo-Schmitz
Of course it's a compromise
even the implementation is a little hackish.
But i got the idea when searching this forum for 'ColorNotes' before creating a new thread.
Crossreading the posts I saw that there were somewhere the need to also color the stem and beams of to notes. I a thought hmm maybe nice to 'prepare' try out this ability.
And I kinda liked it so I keeped it in.
And of course I'm award of the clash
Mostly there are single notes with on head + stems.
The highest note is what leads the melody
So you may see where the melody heading. Kinda of it's edges, turning points.
But so far to the theory in practice I confess it'll also look kind da mess to me:
compared to:
btw that's the score http://musescore.com/user/589901/scores/393171
However one a second glance I start liking the first, even more colorful scope - I'll follow some rules and if you can intuitively grab it - it's helping you digesting the notes easier.
But if not - don't hesitate to drop/ disable the too colorful part of the code (mentioned in the initial post).
The only thing that really disturbs me here is the tone of the yellow. it has a really bad contrast on white.
So and why a little hackish? (Sorry for offtopic)
property variant cursor : curScore.newCursor();
function applyToNotesInSelection() {
...
putting cursor out of the function 'applyToNotesInSelection'
and later also using it in the function colorNote
var the = cursor.element;
What is not so good is the tendency of 'cursor' becaming a 'global variable'.
Better/cleaner style maybe to pass it as parameter like:
colorNote(TheNote, cursor.element)
or the use of closures
function applyToNotesInSelection() {
var cursor = curScore.newCursor();
function colorNote( TheNote ) {
...
var the = cursor.element;
...
}
...
}
so the scope of cursor get's more tight and close to it's use.
In reply to Of course it's a by Djamana
Update:
Extented Colors notes plugin to it also support coloring chords according to its root or bass tone (if present)
Download:
colornotes_0.qml
In reply to Of course it's a by Djamana
Sorry, new version fixed that... Thaks for the plugin.
(Is there an easy way to alter the colours? Changing it manually (in the plugin editor) resulted in a mess...)
In reply to Sorry, new version fixed by Ernst Jandl
Changing them in the plugin itself is the only way.
This doesn't work for just one note. If you select only one note, it colors the entire score.
In reply to This doesn't work for just by kzh
Try to select the note with Shift + click
In reply to Try to select the note with by [DELETED] 5
That works! Thanks.
In reply to This doesn't work for just by kzh
It works on a range selection, not a list selection
Is there any way to modify the code (easily) to color notes by pitch -and- octave?
Thanks.
Kate
Just notice that the color plugin CRASHes
Musescore 2.0.3 Rev(3c7a69d)
It's a known bug #115971: Regression: Qml access to annotations leads to crash
and already fixed in Musescore 3 that is currently only available via
Freelinking: Unknown plugin indicator
So to fix just get a newer (or maybe older also works) version
OR
Edit colornotes_0.qml. Look and delete these lines:
That will avoid triggering the bug. But now the script doesn't color chord symbols anymore.
In reply to Just notice that the color by Djamana
That bug will be fixed in the upcoming 2.1 too.
hi, I tried this plugin, but the colors of the stems are not preserved if exported and then imported as MusicXML, is there a way to provide colors to the stems in that xml format? Specifically I need a transparent alpha channel to the stems. Regards!
In reply to hi, I tried this plugin, but by nandopen
This is not related at all to this plugin, but the way MuseScore does XML Export or whether MusicXML supports color at all
In reply to This is not related at all to by Jojo-Schmitz
MusicXML does support stem color, together with alpha channel http://usermanuals.musicxml.com/MusicXML/Content/EL-MusicXML-stem.htm Not sure if many software would support it but MuseScore probably could. Someone wants to file an issue? https://musescore.org/en/project/issues/musescore
In reply to MusicXML does support stem by [DELETED] 5
See #166686: MusicXML: MuseScore should export stem color and alpha channel to XML