Simplify Accidentals is an old plugin. I did not write it, but I made some modifications to it over the years.
The way it works is that it finds all the notes in a selection that do not have quartertone accidentals (this itself was an addition to the original code). It deletes each note, and then recreates the note in the same place, without specifying the spelling. Thus Sibelius respells the note according to its rules, much as it would do if you played a note on a MIDI keyboard.
When you create a note in a plugin, you can only specify a small number of properties. This is what you can do when adding a note to an existing NoteRest object, which this plugin is doing:
"AddNote(pitch[,tied[,diatonic pitch[,string number]]]) Adds a note with the given MIDI pitch (60 = middle C), for example to create a chord. The optional second parameter specifies whether or not this note is tied (True or False). The optional third parameter gives
a diatonic pitch, which is the number of the ‘note name’ to which this note corresponds, 7 per octave (35 = middle C, 36 = D, 37 = E etc.). If this parameter is 0 then a default diatonic pitch will be calculated from the MIDI pitch. The optional fourth parameter gives a
string number for this note, which is only meaningful if the note is on a tablature stave. If this parameter is not supplied then a default string number is calculated based on the current tablature stave type and the guitar tab fingering options (specified on the Notes page
of File > Preferences). Returns the Note object created."
The plugin uses only pitch and tied, and its trick is that it does not specify the diatonic pitch, forcing Sibelius to decide on the spelling based on current conditions.
The plugin also saves off a few properties before deleting, and restores them to the new notes. These are
* notehead style
* bracket (for the note, not the accidental)
* live playback settings
* slide
Beaming is also saved and restored using some interesting tricks.
A lot of properties are lost, though. Cautionary accidentals are one. individual note Color, hidden notes are a couple more. Tied Into and LV ties also come to mind. Since plugins like this need to save and restore properties, they need to be updated as new properties are added, and that happened a few times for this plugin, but not for a long time.
As of recent times, it has been possible to create quartertone accidentals, so it should now be possible to simplify/respell quartertones.
For the immediate problem, having a dialog option to let you preserve cautionary accidentals (or just have the code skip cautionaries) would address that problem. Plugins can detect the Accidental Style of a note, which include Cautionary and Bracketed so it could be done now. The property loss, though, is something that should really be addressed.
Actually, in the current universe, one could avoid the add/delete model altogether, and use Sibelius.Execute to run the keypad Accidentals commands to change the accidental directly. I considered writing a plugin that did that once the ability to run commands was given to ManuScript. The hard part would be to decide which accidental to change to, which the current model does so nicely, so I gave up on the idea.
Having to figure out what the appropriate accidental would be in the current moment is really hard, especially when quartertones are involved.
Perhaps a new ManuScript command SimplifyAccidental(note, fKeepCautionary) could be written that would know how the note should be spelled and just change the accidental as appropriate. Having that would certainly simplify what this plugin does.
Some other shipping Accidentals plugins like RespellFlatsAsSharps could also be respelled in the same way, and avoid the complications.
Justin, if you think this might be possible and worthwhile, get in touch, and we can see if it would be feasible to add such a command, and rewrite some of these plugins to use it.
--
Bob
An experienced user of Sibelius. Sib 1.2 - 2023+, Windows 10 Pro 64 bit, 32 G RAM. Year 2023.
Free Resources: Notating Harp Music In Sibelius: http://www.bobzawalich.com/sibelius/
Execute Commands plugin documentation: https://bobzawalich.com/execute-commands-plugin-documentation/ |