Wikimedia blog

News from the Wikimedia Foundation and about the Wikimedia movement

Adding musical scores to Wikimedia

Sound and musical content have long trailed behind other subjects on Wikipedia, but that is beginning to change with a new musical scores extension for MediaWiki, the software running Wikipedia and thousands of other wikis. The Score extension was added to a MediaWiki deployment earlier this year and allows users to render musical scores as PNG images and transform them into audio and MIDI files.

Score utilizes the free music-engraving program LilyPond to produce musical notations and insert them into wiki code. This code is then passed on to a LilyPond renderer, which produces images that can be uploaded to Wikipedia articles. “This is somewhat similar to the way mathematical formulas are rendered in Wikipedia,” said Markus Glaser, a Wikimedian who helped develop the extension and gave a presentation on musical scores at Wikimania in 2012. Glaser said it made sense to use LilyPond because, in addition to being free and open source, “it’s text-based, can be easy, but possesses the complexities needed to fit the needs of advanced and professional notation.”

Over time, the hope is to expand on this extension and grow it into a viable resource, encouraging music teachers, music historians and the musicology community to use Score to share their knowledge.

“Studying music on the Internet is something that remains a bit confusing and fragmented. If you are after a musical performance, you can try and hunt one down on YouTube, Spotify or other similar sites,” said Chris Keating, Chair of Wikimedia UK and an amateur violinist, who explained how many of the necessary tools to analyze music still remain largely absent on the Internet. “If you’re after free sheet music, you will probably end up looking on IMSLP. And finally, if you want to read about something, say, music theory, you are likely to come to Wikipedia.”

After setup, users can embed simple LilyPond notation into wikitext using score tags.


Using the score extension, Keating added the opening bars to Johann Sebastian Bach‘s Sonata No. 1 in G minor, BWV 1001 from the Sonatas and Partitas for solo violin series. “It took me about 45 minutes to figure out, from scratch, how to do 8 bars of unaccompanied Bach violin music,” said Keating.

Keating said that a Wikipedia article is great for understanding why and how a song was written, for whom it was written and whether it was successful or a flop, well-received or controversial. But, he argued, “It is impossible to convey a piece of music without sound – whether it’s Beethoven or Lady Gaga, words will never suffice. If you want to examine a musical theme, or illustrate point of harmony or expression, it’s impossible without using musical notation.”

Keating pointed to the musical triads article as an example of the process Wikipedians have had to rely on, where they combine musical notation and sound samples together to explain a musical concept. “Editors working on this have had to create the music notation and sounds in an external application, upload them to Wikimedia Commons, and then insert them into the file,” he said. “People have done that to good effect. But until very recently it has literally been easier to contribute to the Wikimedia projects in Ancient Egyptian hieroglyphs than in the music notation millions of people use every day.”

Glaser said with LilyPond notation, editing scores, correcting mistakes and improving musical notation will be easier. “A good start might be to replace images of musical notation with scores,” he said, but “it needs to be considered whether Wikipedia editors will find this ok. Better drop a note on the discussion page first.”

Lyrics can also be added, as shown above.

Another issue that Score addresses is copyright. Many recordings are under restrictive copyright and cannot be added to Wikipedia. That includes recordings of public domain compositions. “Recordings of a particular public domain piece may be available, but they may not be in the public domain themselves. For some pieces, there may be no recordings at all, as that can require resources up to, and including, a full orchestra,” said Wikisource contributor Adam B. Morgan. “A computer generated performance, as created by Score, may not have the full versatility of a human performance, but it is free of copyright. This might be the only way to freely hear some pieces of music.”

Morgan noted that Score would be nice for the British national anthem God Save the King (as it was in 1917), but it would be even more valuable for pieces that are not nearly as easy to find, such as the anthems of now defunct nations like Imperial Japan or Tsarist Russia.

Morgan hopes the new resource will transform the types of contributions that editors can make to Wikimedia projects. “The score extension opens up new possibilities for Wikimedia,” he said. “As part of making the sum of all human knowledge available to all, Wikimedia can now make the the sum of all human music available as well.”

(Special thanks to Wikimedia volunteers Brian Wolff, GrafZahl, Markus Glaser, Beau, Anja Ebersbach, River Tarnell, Johannes E. Schindelin, as well as Tim Starling and the other WMF staffers who worked on the extension. You can find LilyPond notation documentation here. Additional thanks to Chis Keating, Markus Glaser, Adam B Morgan, Sumana Harihareswara and Carlos Monterrey for their contributions to this blog post.)

Matthew Roth
Global Communications Manager, Wikimedia Foundation

3 Responses to “Adding musical scores to Wikimedia”

  1. Praveen says:

    That’s quite a great improvement. Looking for more ad-ons with new UI. Thanks for notifying us.

  2. Jonas Dyba says:

    There are several graphical interfaces that can ease up the work for wiki editors willing to include lilypond scores to their articles such as Canorus (actively developed successor of NoteEdit) or RoseGarden.

    There are also different, non-graphical interfaces – RUMOR, which is an interface to generate LilyPond input with a MIDI keyboard or LyQI, which provides a piano-like keyboard interface using the normal keyboard in emacs. It can also use RUMOR.

Leave a Reply