Eliminating Duplicate Plugins in Sibelius

sib-plugins

If you have multiple copies of a plugin in different locations (typically a downloadable plugin you have forgotten about installing, and so you installed it again to a different location), you may not be running the copy of the plugin you expect. This is true even if you explicitly run it from one of the plugin menus (or in Sibelius 6 and earlier, from the single plugin menu).

If the plugin files are identical it doesn’t matter which copy is run, but you may have installed an update which has different code, and you will find that you are not seeing the effects of the change.

An Example of a duplicate plugin

Here is an example. I have installed the plugin Test Duplicate Plugins in both my Text and Notes and Rests user plugin folders. All the plugin does when it runs is to trace the file location of the plugin itself.

If I run it from the Notes and Rests menu (under the Notations pane in Sib 7+), I see this, as I would expect:

Test duplicate plugin. File location is: C:\Users\Bob\AppData\Roaming\Avid\Sibelius 7.5\Plugins\Notes and Rests\TestDuplicatePlugin.plg

If I run it from the Text menu in the Text pane, I would expect that the plugin that is run would be found in the Text subfolder. Instead, I see this again:

Test duplicate plugin. File location is: C:\Users\Bob\AppData\Roaming\Avid\Sibelius 7.5\Plugins\Notes and Rests\TestDuplicatePlugin.plg

It was run from the Notes and Rests subfolder, which is not what I expected.

How Sibelius decides which copy to run

When Sibelius runs a plugin all it looks at is the file name excluding the path, and it chooses the first plugin with that file name that it finds. So in this case, it is looking for

TestDuplicatePlugin.plg

ignoring the rest of the file name.

The plugin ordering that Sibelius uses is a bit mysterious, but if you look in Preferences > Keyboard Shortcuts > Plugins you will see that each plugin has a number. For duplicate plugins, the copy with the lowest number is the one that will always be run.

My downloadable plugin List Plugins, which runs in Sibelius 4 or later and can be installed from http://www.sibelius.com/download/plugins/index.html?plugin=65, in category Developers’ Tools, will list plugins by name, showing the plugin number, and on my machine I see, right next to each other,

Test Duplicate Plugin (437) – C:\Users\Bob\AppData\Roaming\Avid\Sibelius 7.5\Plugins\Notes and Rests\TestDuplicatePlugin.plg

Test Duplicate Plugin (596) – C:\Users\Bob\AppData\Roaming\Avid\Sibelius 7.5\Plugins\Text\TestDuplicatePlugin.plg

So in my case, the copy in Notes and Rests has number 437, and the one in Text has 596. The file with the lower number is the one that will be run, so Notes and Rests wins out.

If the files are identical, it really does not matter which file gets run, but if the copy that is not run is an update of the other file, you can have unexpected results, as fixes you might expect will not be encountered.

Detecting and removing duplicates

Plugins that run other plugins, such as Run Plugins By Name, or My Plugins, both of which run in Sibelius 6 or later, are aware of this problem, and will warn you if there are duplicates. If you install and run Run Plugins By Name, and you have duplicates, the Plugin Trace Window will show something like:

Test Duplicate Plugin was found in multiple locations, most recently:

C:\Users\Bob\AppData\Roaming\Avid\Sibelius 7.5\Plugins\Text\TestDuplicatePlugin.plg, (No version available), Create date: Wednesday, January 13, 2016 1:06:44 PM.

whenever that name is chosen, the copy of the plugin that will run is:

C:\Users\Bob\AppData\Roaming\Avid\Sibelius 7.5\Plugins\Notes and Rests\TestDuplicatePlugin.plg, (No version available), Create date: Sunday, February 28, 2016 8:32:23 AM

Run Plugins By Name will tell you which version it will run. If you see duplicates, you should probably get rid of all but one of them. If you are not actively modifying the plugins, one approach is to delete all the plugins with that name, then reinstall the plugin from the download page. In Sib 7, you can reinstall with File>Plug-ins>Install Plug-in. In Sib 6 it might be better to choose the most recent of the plugin files and delete the others, though personally even in that case I would personally delete them all and install the most recent version.

Use your computer’s file system to find and delete the files, or you can go to File>Plug-ins>Edit Plug-in and delete the files from there.

After you delete the plugins, close and restart Sibelius before running a plugin.

There is one situation where it is OK to have 2 copies of a plugin, and that is when you have made a copy of a plugin that ships with Sibelius using Edit Plug-in. When you do that (to look at the code of make a private variation of the plugin, for example), Sibelius tells you it is making a copy, and it puts it in the same category in your user plugin folders that it was in the shipping folders. So I might have

C:\Users\Bob\AppData\Roaming\Avid\Sibelius 7.5\Plugins\Text\AddFingeringToNotes.plg,

which is a copy of

C:\ProgramData\Avid\Sibelius 7.5\Resources\en.lproj\Plugins\Text\AddFingeringToNotes.plg.

In this case, as long as the file name and category are the same, Sibelius will always run the copy in the user folder, not the shipping copy. This is a feature, not a problem!

And so…

I hope this will help you avoid what can be a mysterious situation!

One Reply to “Eliminating Duplicate Plugins in Sibelius”

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.