Mark missing cautionary accidentals

• Aug 13, 2012 - 18:06

I created a prototype of an 'add cautionary accidentals' plugin. It's called 'mark' because a plugin currently cannot add an accidental to a note. Instead, it colors notes red, when there should be a cautionary accidental. It's up to you to add them and to use lasconic's blacknotes plugin to remove the color.

Warning: This is ALPHA software. Save your score before trying this!

Due to some other restrictions in the plugin framework, already discussed in http://musescore.org/en/node/17747 it does not work with scores
containing

  • key signature changes
  • transposing instruments
  • instruments without a key signature

Despite of these restrictions, it might still be of some use, and the algorithm itself would hopefully need little changes, once the plugin framework supports the missing features.

So, please test and comment.

EDIT: It only works on the selection! If nothing is selected, it'll also do nothing...

Attachment Size
markCautionary.zip 3.42 KB

Comments

How clever to workaround the limitations by using color! That's actually a nice feature because it gives the user an opportunity to review the choices. Not sure what your algorithm is (next measure only? same octave only?), but I could see having the algorithm mark things pretty aggressively - perhaps using different colors depending on whether how many measures have elapsed and whether it is the same octave. - and then the user decide how many of those suggestions to take. Even if/when the framework supports doing the actual work automatically, I think the coloring would be a nice touch to let the user review and undo if desired.

Anyhow, thanks for making this available, and I look forward to trying it out!

In reply to by Marc Sabatella

Thanks... :-)
Well, the algorithm is (supposed to do) next measure and same octave only. However, it will mark accidentals for notes on different staves of the same part as long as they actually are in the same octave.
I attached a little example file:

  • The F# of the flute in measure 3 doesn't get marked, because the Fnat was in measure 1.
  • In the piano part the Gnat in voice 1 of the right hand gets marked because of the G# in voice 2 in measure 2. The Gnat in voice 2 is later in the same measure and therefore not marked.
  • The F# in voice 2 of the right hand in measure 3 gets marked, because the Fnat in the left hand in measure 1 was tied over to measure 2 and is the same octave.

Maybe the tied note should not cause a marking in the next measure, but only the note actually carrying an accidental (the F# in m.1) should be remembered to measure 2. It would be possible to change this. (Note.tied)

Attachment Size
PluginDemo.mscz 1.97 KB

In reply to by heuchi

Yes, that's how I'd want it to work by default, and if/when it becomes possible for the plugin to add the accidentals, those are the only ones I'd want added automatically. But I like the idea of using color to identify other potential opportunities. Different octave same measure is one I often see marked. And some of my classical editions will markednotes even several measures later. Actually, I'd be curious what Elaine Gould says about this in Behind Bars, or if the subject comes up.

As fare as I'm aware these accidentals are more commonly called "courtesy accedentals", not "cautionary accidentals"? At least they are inside MuseScore, I think?

In reply to by Jojo-Schmitz

In the US, I think "courtesy" is probably more common, but I've definitely seen both. Athough maybe I've seen "cautionary" mostly from sources outside the US? Never really paid attention.

I'm not aware of any places in MuseScore where e itherterm is used in any official sesne (ie, exposed in the UI). The US English version of the handbook makes a brief mention of cautionary accidentals in the section on accidentals.

it's just a great plugin what I was searching for! thank you very much heuchi! by the way, it could be great to have this plugin included with version 2.0. there will be something like that?

In reply to by Jojo-Schmitz

I added an entry to the plugin repository. (Does not yet appear in the list. Don't know if this is just a cache/recreate index thing, or if I did something wrong.)

Regarding v2.0:
The last time I had a look at the plugin framework there was still a lot of change going on and there were still a lot of functions missing.
I don't know the current status of the plugin framework implementation, but it might not yet be the time to port it.

Do you still have an unanswered question? Please log in first to post your question.