A developer’s notebook: Recent plug-ins, spring 2014


zawalichThis blog post is written by Bob Zawalich, composer, guitarist, software designer, and creator of hundreds of useful plug-ins for Sibelius. In this post, Bob gives us an overview not only of some of his most recent plug-ins, but also an inside look into the process behind their creation.

I have written and published about 500 Sibelius plug-ins over the years. I write plug-ins for a lot of different reasons, and the process of writing them can be very different. This is the story of how some plug-ins that are now on the Sibelius plug-ins download page were written in the spring of 2014.

Delete Leading Empty Bars

Michael Ost, the new development lead for Sibelius, asked on the plug-in developers’ mailing list if anyone would be interested in writing a plug-in that would delete some empty bars Pro Tools users got when transferring to Sibelius.

I agreed to try it. It seemed simple enough until I noticed that many of the scores had lots of staves (they were mostly film scores) and many empty bars (11,000 in one case), and sometimes there was random junk in a bar about 4,000 bars in. So we had to decide what “empty” really meant.

Once we dealt with those issues, I found that sometimes it took several minutes to look through all the bars (every bar in every staff had to be checked, and 11,000 times 30 is a lot of bars). I started figuring out ways to make things faster, and in the end, even the largest scores we had were processed in well under a minute. That was good enough, and beat deleting all those bars by hand.

Gap Before Bar

In the “good old days” I worked closely with Daniel Spreadbury, and when a new version of Sibelius would be coming out, I would try to convince him that some new features added to ManuScript (the plug-in programming language) would make it possible to write plug-ins that provided things users wanted, and if I wrote a plug-in, he would not have to do it in Sibelius itself.

Around the time of Sibelius 7.1.3, we had discussed providing access to  the Bar object Gap Before Bar property, because people often dragged bars around and then reformatted pages and discovered unwanted gaps between bars.

Access to Gap Before Bar did not make it into 7.1.3, but it did show up in Sibelius 7.5. In honor of getting that facility, I wrote this plug-in to trace and optionally delete any gaps before bars. Just for the fun of it, I set up the plug-in so it could process the current score, all open scores, or a folder of scores.

Swap or Replace Text Styles

On the Sibelius tech support forum, a user asked a question about whether there was a way to swap text styles, e.g., if the title and subtitle had been given the wrong styles. I answered that there was no automated way to do that in Sibelius, but that one could write a plug-in to do that.

I did not originally think that this was a common enough problem to justify my volunteering to write that plug-in. If I am going to spend days or weeks of my time to write something, I like it to be something that a lot of people will want to use.

But I started thinking that a related problem like swapping two verses of lyrics might be useful to solve, and swapping data is itself an interesting problem (see the Exchange Staff Contents plug-in for another example). It is often tedious to do by hand because if you want to swap A and B, you can’t just find all the A’s and make them B’s, because then everything is a B and you don’t know which ones used to be B to swap to A. You need to make two lists and keep them separate.

At some point I had some ideas I wanted to try out. I wanted to list only the text styles present in the selection, since they were the styles you could swap. That might look like this:


In Sibelius, there are 3 incompatible types of text objects: staff text, (like Expression), system text, (like Title), and lyrics. You can exchange text styles within a group, but not across groups. So changing Lyrics line 1 and Lyrics line 2 makes sense in Sibelius, but swapping Lyrics line 1 and Title does not.

If a system text style like Composer was chosen, only other system text styles should be shown in the list of styles available for swapping. I had to make up three lists of available styles, and change the dialog every time the user changed the selection in the text style list.

Then there was this problem: what if there is only one lyric style and you could only swap with the same lyrics style? There would be nothing to swap with. This is not very useful, so I made the second list include both the compatible styles from the score, and any compatible built-in text styles as well. If you swapped with a style that was not in the score, you would be replacing a style with another one. You could now change Lyrics line 2 with Lyrics line 1, for example, even if Lyrics line 1 was not already in the score.

Unfortunately, there is no mechanism in ManuScript to tell a plug-in all the built-in text styles. I had, however, previously built a list by manually going through all the styles in the Create > Text menu, and I found the old code and copied the data. Now there were two lists to choose from to swap or replace:


I decided to break a rule, and let lyrics styles and staff text styles swap, to handle a common case where someone incorrectly enters lyrics in Technique text style.

This all seemed reasonable to me, and I passed copies of the plug-in to a group of Sibelius users I had worked with in the past, who generally offered good feedback. A German user told me that he was not seeing the list of built-in styles, and sure enough, the list I had built by hand would only work in English. I documented the fact that replacement was only available in English, but it bothered me that it did not work, so I built a German table as well. Most downloadable plug-ins are not set up for multiple languages, but this one at least supports two of them.

When the plug-in went up on the download page, I found the tech forum thread that had asked about it, and announced that a plug-in was available. However, I then noticed that the thread asked for a solution in Sibelius 5, and this plug-in needed at least Sibelius 6. Fortunately, the user had access to Sibelius 6 as well.

Note: Read more about Swap or Replace Text Styles and Gap Before Bar here on this blog.

Disguise Score

I wrote this one for me.

I occasionally get paid to write plug-ins, and I was having trouble figuring out how to optimize a client’s score. I wanted to show it to some other Sibelius users, but did not want to release my client’s score. I wrote a plug-in that made a copy of the score, scrambled the text and pitches, removed previous versions, and scrambled all the parts, so that it would be too hard for a nefarious music stealer to identify anything useful. I added options to leave some things, like expressions, unchanged because that would affect playback.

Now I can post a score on the Sibelius tech forum without releasing anything that is confidential, and so can anyone else:



  1. Derek Williams

    Thank you Bob for staying with this, and for all the wonderful plugins you’ve developed over the years, many of which are featured in my ‘Sibelius Wizard’ control surface, downloadable from my website.

  2. Bill Holab

    I can honestly say that my workflow and daily life have been significantly improved by many of the plugins you’ve written Bob. I’m extremely grateful to have them, and I think we’re fortunate to have you working in this small corner of the universe.

  3. Robert Puff

    Bob – I’ve got at least a dozen Sibelius plugins in my toolbox which significantly improve my workflow on a daily basis, all which were written by you. Many thanks!

  4. Tim Parkin

    Likewise Bob, I also have a number of plug-ins which I use almost on a daily basis to increase productivity, the majority of which were created by you.

  5. Dave P-B

    Bob – I can’t imagine any scores of mine in the past few years which haven’t had at least one, but probably more, of your plug-ins applied somewhere. For me, they are part of the process. Thank you

  6. Derek Williams

    *copying from post to the plugin page:

    Swap Text Styles plugin:
    Just downloaded this to try it, but find that I cannot swap Staff to System text. I know this is mentioned in the blog, as well as in the preamble and in the plugin itself, but just wondering was this impossible to do, or just not considered likely to be needed?

    The present use I would have had for this is editing a score where the composer has placed identical Staff Text over every single staff, and i wanted to simply swap one of them to System Text, and then filter and delete all the duplicates.

  7. Bob Zawalich

    > i wanted to simply swap one of them to System Text, and then filter and delete all the duplicates.

    The way the plugin works is to exchange the “Text sty;e” properties of different text objects, and system text objects are not text objects; You can manually select the staff text and change the text style in the Inspector to be a system text style, but that will not make the text system text.

    Roman Molino Dunn sells a plugin called Convert Staff Text to System text which can do what you want, and it may well be worth purchasing. I suspect that it deletes the original staff object and creates a new system object with similar properties; at least that is what I would do if I were writing such a plugin.

    1. Derek Williams

      Thanks Bob!

Leave a Comment

Your email address will not be published. Required fields are marked *