Plug-in Developer’s Notebook: The Colored Notehead Style Project

Tips

zawalich3This blog post is written by Bob Zawalich, composer, guitarist, software designer, and creator of hundreds of useful plug-ins for Sibelius. In this post about colored notehead styles, Bob describes his process working around Sibelius’s limitations in order to create a way to color individual noteheads within a chord, eventually resulting in the Colored Notehead Styles plug-in suite.

Sibelius has long had the ability to apply colors to notes, as well as to other objects. Unfortunately, if you apply a color to any note in a chord of notes in the same voice, all the notes in that chord will be given the same color.

colored-noteheads-1

I have written a number of color-related plug-ins over the years (Apply Named Color, Color Enharmonic Pitches, Color Harp Strings, and others), and it has always bothered me that they could only be used with very simple music that had only single notes, or that people would have to split up chords into separate voices to get separate colors in chords. This made the plug-ins awkward at best in real-world musical situations.

I had complained about this problem to Sibelius for years, but a fix was never made. Quite possibly nobody besides me cared all that much.

I was recently answering questions on the Sibelius tech support forum about the Add Note Names to Noteheads plug-in (shipping with Sibelius as Notations > Noteheads > Add Note Names), and Kai Struck was asking questions about how the notehead styles in that plug-in were created (we made noteheads from symbols out of SVG format graphics files, which were first supported in Sibelius 7). He eventually created some SVG graphics to make up solfege (Do, Re, Mi) noteheads. I was mentioning my frustration with coloring of noteheads, and he suggested that SVG noteheads could be used for coloring.

I decided that if we limited ourselves to Normal shapes in the Opus font, and to the named colors I use in other plug-ins, we could get a full set of colors in 24 notehead styles, which would fit in scores that did not already have user defined notehead styles.

Kai agreed to create a set of SVG graphics noteheads for the project, and I created symbols using the graphics, and then made up notehead styles for all these colors. I created a score that used each of the colors (with a quarter, half and whole note for each color) and each color labeled by its name.

My plan was to create house styles using the colors, but I found that when I imported such a house style, it could replace the text in the score with whatever was in the score that made the house style. So instead I decided to copy notes from the data file I had set up into other scores. This has the useful side effect of transferring the symbols and notehead styles that make up the copied noteheads, without bringing over the text styles.

I created a score that contained all the definitions I needed, which looked like this:

colored-noteheads-5

You can see that the chords have notes with separate colors, which is what I was going for.

It was certainly possible to stop development here. With the score, one could copy notes with desired colors, paste them into another score (then delete the pasted notes), and then use Notations > Noteheads > Type to apply colored noteheads to notes. But I was looking for a less hands-on approach.

I was considering how to distribute the data file so people could use it to copy notes out of. Attaching the score to a post on the tech forum could work, but those disappear quickly. When I was playing with the plug-in installer in Sibelius 7, I found that if you put a .sib score file in the zip file on the download page, it will place the .sib file in the Manuscript Paper folder.

I thought that having a plug-in create a new score might be a cool mechanism, so I wrote a plug-in that just created a new score using the data file as its Manuscript Paper. It worked fine. A copy of the data file would be left open, and you could copy out of it and then close the data file, and the original file would not get messed with and corrupted. This became the plug-in Colored Notehead Data File.

I thought then that it would be useful to have enough tools available so you could do real work with this coloring mechanism. I started incorporating some code to import colored notehead styles into existing plug-ins and realized that it would be simpler to put all this code into a single separate plug-in that other plug-ins could call. This became Import Colored Notehead Styles, which I decided could be useful to humans as well as to other plug-ins as a way to import specific color definitions. It has a dialog that looks like this:

colored-noteheads-3

I then adapted the existing plug-in Color Enharmonic Pitches to use the notehead importing code, and it can now color different pitches using the colored notehead styles.

We now had a reasonable set of tools. If you installed the Colored Notehead Styles plug-in suite, you could just run the updated Color Enharmonic Pitches, and it would apply colored noteheads to any notes, based on their pitches.

However, there were a few more things I wanted to do. I wrote some new plug-ins, including Colored Noteheads On Harp Strings, which lets you color notes based on which strings of a harp the notes appear on (so C/Cb/C# will always be on the same string). I always wanted a way to color notes in harp music so notes on the C string would be red, and those on the F string blue, which matches the coloring of the strings on a harp. Now I can do it, even with chords! You can color the other strings as well; gray instead of black is an interesting effect.

colored-noteheads-4

I wrote Remove Colored Noteheads, and then modified Filter Other to handle these notehead styles.

At this point I figured I had all the code I needed to get work done, so I stopped writing code, wrote up a document on how to use all these things, and had it put up on the Sibelius plug-in download page.

And then on to something else!

The Colored Notehead Styles plug-in suite may be downloaded directly through Sibelius 7 and higher at File > Plug-ins > Install Plug-ins > Color. Users may also install it manually in Sibelius 7 or higher by visiting the plug-in download page and following the usual manual installation procedure, or by using the Install New Plug-in plug-in. The plug-in suite is not supported in Sibelius 6 or earlier.

Comments

  1. Margaret

    Could be applicable to the colour strings method which prints the notes on the G, D A and E strings in different colours so kids can learn to read quickly. These books are expensive and this might help teachers to type up their own programs to amplify the bought materials.

    1. Bob Zawalich

      The Color Notes On String plugin (category Color) will color notes according to the string. Unlike the harp, where you know exactly which string every pitch is on, fingerboard instruments like violin or guitar can have the same note appear on multiple strings.

      By default Sibelius does not know which string a note is on. It only knows the string if the note has been copied to a tablature staff and then copied back to the notation staff.

      Color Notes on Strings will only color notes which have the string associated with a note by copying to a tablature staff and copying back. This is not all that useful for a violin, which rarely uses tablature.

      I can look at upgrading that plugin to use notehead styles and also to default to the “lowest fret” for a given note if notes are not explicitly marked. That will have limitations, but would probably handle most simple music in the first position, which is the likely use for this feature.

      I was considering upgrading the plugin when I was doing all this, but it was too complicated to deal with at the time. I will work on it when I get a chance, though.

      1. Margaret

        Thank you VERY much. I am learning my way with Sib.7 having learned on 6, it still seems easier….I am in awe of writing such programs never mind using them skilfully. cheers m

  2. Laurence Payne

    Now, that is SERIOUSLY ingenious!

    1. Bob Zawalich

      It is indeed seriously ingenious, but it was really a bit of a community effort that made it possible.

      It had crossed my mind that it would be possible to use colored notehead styles back when we used SVG graphics for named noteheads, but I thought there were just too many limitations (Sib 7 only, a limited number of possible noteheads, and I did not want to figure out how to create the SVG noteheads).

      Kai questioned some of my assumptions, plus he volunteered to create the SVG graphics, so that was the impetus to try to do this.

      Also, I should mention that neither Kai nor I noticed that the rhythm dots, tied, and articulations were colored differently using notehead styles than if you use Sibelius coloring. I showed this to Philip Rothman, and he pointed it out immediately.

      It took a moment to realize that this really is a feature, not a bug (especially for articulations), so I was able to point this out in the source data file so people would not be surprised.

      Left to my own devices, this probably would not have happened at all, though once it started, I had to use up quite a few of my own devices :)

      There are still a lot of limitations to this mechanism, but I think it can be useful in many common uses.

  3. Gerhard Torges

    Hello Bob!

    You wrote:

    “The Colored Notehead Styles plug-in suite may be downloaded directly through Sibelius 7 and higher at File > Plug-ins > Install Plug-ins > Color. Users may also install it manually in Sibelius 6 or higher by visiting the plug-in download page and following the usual manual installation procedure, or by using the Install New Plug-in plug-in.”

    I tried to install these plugins in Sibelius 6 but failed.

    Any help?

    1. Philip Rothman

      Hi Gerhard: I’m sorry, that was my editing error. Unfortunately, because SVG import was only added in Sibelius 7, the plug-in suite will not work in Sibelius 6 or earlier.

      1. Gerhard Torges

        Oh, I see.
        Too bad! ;-)

  4. Steve

    Thank you Bob for your genius and dedication! Much appreciated!

  5. Bob Zawalich

    A new plugin, Colored Noteheads On Strings, has been added to the plugin suite, along with a new PDF file explaining how it works. It assigns colors to notes based on the string on which the notes appear. As I mentioned above, mapping pitches to strings is tricky business, and the document explains how this can be done.

  6. SHIVA

    can we colour the noteheads in sibelius . .
    i.e. can we assign any colour for C,D E,F,G,A,B, . .
    SO in any place the C OR D pitch is kept it should show that particular colour . .

  7. Bob Zawalich

    In Sibelius 8.3 or later, you can use normal Sibelius coloring even in chords and you do not need to use the notehead styles. Prior to 8.3 you would still need these plugins if you want separate coloring for notes in chords.

    The plugin Color Enharmonic Pitches (category Colors) will assign a color from a set of 25 colors to notes based on their pitch.

    Note that the colors will not update if you change a note’s pitch. You can rerun the plugin though to reset the colors.

Leave a Comment

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