ColorVoices only colours noteheads
Musescore 3.6.2
I thought colorvoices coloured stems & beams as well but I'm only getting the following:
Musescore 3.6.2
I thought colorvoices coloured stems & beams as well but I'm only getting the following:
Do you still have an unanswered question? Please log in first to post your question.
Comments
Look close: it does color the stems (and the flags), but indeed not the beams.
As per the code it should do beams too, need to investigate why it doesn't
Actually the code reads:
So this is by current design, as it'd only work for beams connecting an odd number of chords. Better solution wanted.
In reply to Actually the code reads: … by Jojo-Schmitz
Thanks
In reply to Actually the code reads: … by Jojo-Schmitz
The beam could take the colour of the note at the start of the beam, which is often the same as the note at the end of the beam. Where these are different the user could manually stop beaming or change the colour manually, (or it could be automatically to a dark grey, for example.)
In reply to The beam could take the… by yonah_ag
Good idea (esp. as there are no cross-voice beams, as far as I can tell), but how to find out (in a plugin) whether a chord is starting a beam / whether a beam starts at a chord?
Beam::Mode
won't tell.In reply to Good idea, but how to find… by Jojo-Schmitz
I'm not sure whether this helps:
https://musescore.github.io/MuseScore_PluginAPI_Docs/plugins/html/class…
For some plugin situations I have had to select a range to capture the elements that I'm interested in and build a segment position map to use in conjunction with the plugin's main processing.
In reply to I'm not sure whether this… by yonah_ag
No, that doesn't help.
Indeed building a map, collecting already worked on beam IDs and skipping those might be a way.
Quite some effort for a small effect
In reply to No, that doesn't help… by Jojo-Schmitz
Inded — but satisfying if the have the time. 🙂
I'm not sure that you would have to detect "already worked on beams". If you can map the segment tick and voice of the beams, (in pass 1), then you should be able to check each beam-tick as you process the notes ticks and voices in pass 2.
I have taken this approach in tying articulations, like staccato, to tick position for processing a score's notes measure-by-measure as the plugin API does not expose articulations to this method of processing.
In reply to Inded — but satisfying if… by yonah_ag
Yes, in a 2-pass approach. Building a list of beam IDs and skipping those already recorded would only need one pass
In reply to Yes, in a 2-pass approach… by Jojo-Schmitz
Neat: I might redo my code. Could the recorded beam IDs be deleted from the map rather than flagged as recorded or is this a waste of cpu?
In reply to Neat: I might redo my code… by yonah_ag
Probably not even a map is needed
Entirely untested yet.
Will have a look at it later.
In reply to Probably not even a map is… by Jojo-Schmitz
Looks good and satisfyingly simple.
In reply to Looks good and satisfyingly… by yonah_ag
Unfortunatly it seems the id is not available to the plugin API
In reply to Unfortunatly it seems the id… by Jojo-Schmitz
Back to mapping.
In reply to Back to mapping. by yonah_ag
Have you tried
element.beam.is(beam)
? This is the intended way to check if in-score elements are the same or notIn reply to Have you tried element.beam… by XiaoMigros
Sample code?
In reply to Sample code? by Jojo-Schmitz
see for example https://github.com/XiaoMigros/Auto-Slur-Melismas/blob/448beba4c4f635198…
In reply to see for example https:/… by XiaoMigros
Ah, I see
OK, check the updated ColorNotes plugin now.
In reply to Ah, I see OK, check the… by Jojo-Schmitz
Yup, looks good
In reply to Yup, looks good by XiaoMigros
But
element.beam !== prevbeam
works too, apparently (and seems the way to go in Mu2's plugins)In reply to But element.beam !==… by Jojo-Schmitz
That's interesting. I remember dimitrio specifically advising not to do that, but I doubt I can locate where he said that..
In reply to That's interesting. I… by XiaoMigros
Dimitrio might have had Mu3 (edit: and later) in mind
In reply to Dimitrio might have had Mu3… by Jojo-Schmitz
is it different for mu4 now?
In reply to is it different for mu4 now? by XiaoMigros
No, but might have been different for Mu2. There at least the
is()
method doesn't existIn reply to No, but might have been… by Jojo-Schmitz
Works great with 3.*, thank you.
In reply to No, but might have been… by Jojo-Schmitz
it was introduced in mu3.3
In reply to it was introduced in mu3.3 by XiaoMigros
Ah, so I may need to use the other method for older versions
In reply to Ah, so I may need to use the… by Jojo-Schmitz
Let's hope this latest version now still works for all 3.x and 4.x