Frequently I want to make a music worksheet that contains formatted text and music examples. You can do this with Sibelius, but I find it cumbersome. There is a way to do this with OpenOffice and LilyPond, but it is difficult to set up and, I found, subject to stop working on subsequent updates to OpenOffice. So, most of the time, I resort to exporting graphics from Sibelius into Microsoft Word documents. This means that my document data is scattered between multiple Sibelius files (assuming I save them) and one Microsoft Word document. Updating the document with new or edited music examples is not always easy.
Today I discovered a tool that allows you to edit and embed music directly within Google Docs (also known as Google Drive). This keeps the text and music within the same document, and they can be edited easily for future changes.
The embedded music side of the document is based upon VexFlow, a music engraving tool written in javascript and HTML5. That means you don’t need any software besides your web browser to create the music notation.
Google Docs is an online suite of office tools that again works just in your browser. You do not need to download any software to use Google Docs, but usually you must be connected to the Internet to use Google Docs. To use Google Docs, you must have registered a Gmail account. You do not need to use Gmail for your email, but the Gmail user name and password are also used for Google Docs.
Once you have set up Google Docs, you can click this link VexTab Google Docs add-on to enable embedding music within your Google Docs. Follow the instructions, and you are ready to go!
The language for typing in your music (called VexTab) is not necessarily intuitive. You should follow the tutorial at this link VexTab Tutorial to become familiar with it.
I found a cheat sheet for VexTab notation here. And here is an updated list of all the latest features of the VexTab language.
Although you can download your new Google Document as a PDF or Microsoft Word document, the embedded musical examples are not high resolution. However, I find them suitable for my students.
Here’s the document I created today for my upcoming group class:
The very first embedded musical example was created with this VexTab text:
options width=150
tabstave notation=true tablature=false clef=treble
notes :w G/4 $G$
Note that I adjusted the default width so that the example could fit within the table. “notation=true tablature=false” means to use music notation but not guitar tablature. The “:w” means whole notes. The letters are note names, and the /# indicates the octave of each note.
The very last musical example was created with this VexTab text:
options scale=1.25 width=500
tabstave notation=true tablature=false clef=alto
notes :w C/4 F/3 G/4 B/4 A/5 A/3 D/3 E/4 B/2 F/5 C/4
Here I also scaled up the size of the example to give the student room to write answers.
A couple of other notes: I discovered that you can not copy and paste the image examples without breaking their connection to the VexTab source. However, you can drag them to move them around (e.g., into tables, as I did). And you can copy and paste the actual VexTab source between source windows.
Have fun with your musically illustrated documents!
I’m not sure why exporting music from LilyPond into a format that you can place in OpenOffice would be at all difficult. LilyPond can generate PDF, EPS, PNG, and SVG files, and especially if you’re using Frescobaldi, changing the output format is trivial. Placing the images into an OpenOffice document is likewise trivial (I’ve had the best luck with high-resolution PNG, though EPS theoretically should work too). What problems have you had?
Moreover, LilyPond documents can contain blocks of text, so depending on what you’re doing, you might want to use LilyPond for the whole workbook.
That said, though, VexTab looks very interesting indeed, but not for the use case you’ve said you’re using it for. 🙂
Thanks for your thoughts! There is no problem with what you describe. However, my goal is to have everything within a single document – it makes the management of the complete document more simple, as I can edit the notes directly within the same document I’m editing.
With OpenOffice, my solution was to use OOoLilyPond to integrate LilyPond directly within OpenOffice documents. The plugin has been broken with prior OpenOffice upgrades, so it wasn’t always an easy process to go back and re-edit documents.
For maximum flexibility, I found OOoLilyPond the most versatile, because you ended up with the full layout capabilities of OpenOffice. For immediate ease of use with minimal setup needed, I found the Google Documents method described above the simplest.
Music and text have very different typographical needs, so I don’t actually think managing them within one application is that great an idea. However, if I did want to do that, I’d do it completely within LilyPond. Look at standalone markup blocks: you can interleave them with scores in your LilyPond document:
\markup { “Here are some paragraphs of text” }
\score { \new Staff { … } }
\markup { “And some more text”}
I think scholar.ly is a LilyPond library designed for producing musicological publications with LilyPond, but I’ve never used it. I wasn’t aware of OOoLilyPond; I’ll check it out.
I hear you. I think it depends upon how much effort an individual wants to put into learning something. I would suspect that Google Docs is a much lower hanging fruit for the average music teacher than installing and learning LilyPond and/or TeX. And there is no doubt in my mind that LilyPond gives a much more professional output than the solution presented in this blog. Thanks!
Many thanks for the article. Fixed a problem for my music lessons. Thanks.
Marcelo B. (Brasil)
You’re welcome! Glad it was useful.