This 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.
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.
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.
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.
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: