Sunday, February 28, 2010

LilyPond: abusing \glissando to indicate scale runs on parallel strings


Fingering indications are ubiquitous in most written music, and this is especially true for Guitar music. There are seldom fewer than two or three solutions for a given passage of music and with all the editorial markings in common usage, Guitar music can quickly become cluttered. The job of the engraver is to creatively use a minimum of editorial markings to convey the maximum amount of information. For example, in the case of a scale run in thirds or sixths, it's more useful to indicate the strings the notes are played on rather than print each individual fingering for each individual note. Marking the strings intended for the scale run rather than the fingers used eliminates clutter on the page and concisely shows the composer's or arranger's intent. In this post, I'll demonstrate how to notate scale runs on parallel strings in Guitar music by using the \glissando command in invisible voices, along with \tweak and some other LilyPond magic.


First, open your favorite text editor and create your new LilyPond input file. Save it to a convenient location with the name “string_run.ly” For this demonstration, I use GNU Emacs, which has good LilyPond syntax highlighting. Syntax highlighting is useful for quickly spotting mistakes in the code. (Ctrl+click on images to display them in a separate window at full size.)
Go ahead and set up your input file by first typing a version statement, and setting up the basic structure of the file. In the examples, pay close attention to the comments (text following a %), as they tell you how each of the elements in the input file affects the output. Take a look at Example 1, and see the what the structure of the input file is like. Example 2 shows in more detail what each of the commands and and context indicators does in LilyPond.

Example 1


Example 2


Now, let's set up our staff for Guitar by putting in the clef, key signature and time signature commands in the Staff context. I'm writing the example in A Minor with a meter of 4/4. Next, it's time to add our scale run. Type in a run in thirds or sixths. I've chosen a short run in sixths. Let's compile the example and take a look (from here on out, Ctrl.+click on the images of music to view the source code in a separate tab or window).

That's beautiful isn't it? Now, let's get to work on the string indicators. For that, we're going to add a voice above and a voice below. Eventually, these voices will be invisible, leaving only a string number indication, and a long glissando line for each voice. To position the glissando line and set its angle, we'll set the notes strategically. The glissando line should be parallel to the overall trajectory of the line of music. You'll arrive at your own solutions through experimentation. Take a look.

Let's move the string number so that it appears right on the notehead, using the \tweak command. Put the command between the note and string number. This \tweak will affect the extra-offset of the string number, which is expressed as a pair of values—one each for the horizontal and vertical placement relative to the mark's normal default position. View the source code to see how this is done.

So far, so good. Now let's add the lower string indicator in the same manner. Since the string number's default placement is above the note, even when the note is below the staff, we'll need to specify a different default placement for it in LilyPond. I've told LilyPond to put the string number below the note for this voice, so that it will appear below the staff. This is done with \set stringNumberOrientations before the string number is called.

Great. Now let's clean it up. You'll notice that LilyPond shifts voices left or right to avoid collisions in multi-voice textures. This is usually the desired behavior. However, here we want the voices to all align vertically, so we'll add an \override to the first voice to tell LilyPond to ignore the note collisions. Also, in the “glissando” voices, add the \hideNotes command before the notes. And there you have it.

Wednesday, November 11, 2009

OpenOffice.org And The OOoLilyPond Extension – Part Two



Note: this is part two of a two-part post on using OpenOffice.org with the OOoLilyPond extension for documents used in a Music Education setting. Please see part one for information on downloading and installing OpenOffice.org, LilyPond and the OOoLilyPond extension.

Throughout this installment, click on images to view them at higher resolution.


The previous post gave some background information on two common methods of mixing text with music examples in documents intended for the music education setting: using graphics exported by commercial score writing programs in a word processing document; and using the text utilities of score writing programs to place text around and between music examples. Both methods have drawbacks. They're both inordinately time consuming. Depending on which method, you can end up with music excerpts of a poor graphic quality or text that is poorly formatted. In the first case, the need to handle multiple graphic files in a single word processing document can lead to frustratingly poor system performance, resulting in hangs or crashes in the worst cases. The previous post concluded with information on how and where to obtain two open-source applications—the OpenOffice.org office suite and the LilyPond music engraving program—and an extension for OpenOffice.org called OOoLilyPond. To proceed with this tutorial, you need to have all three components installed on your system. Part one of this post can be found here. Assuming you have these three pieces of the puzzle up and running, let's get started putting them to use.

For this project, we'll be making up a short quiz – “Music Theory Quiz 3.” Let's start by opening a fresh OpenOffice.org Writer (the word processor) document. In the upper left-hand corner of your window, you should see a button called “OLy.” That's your OOoLilyPond extension and we'll be using that shortly. Right away, let's make sure any work we do is saved by saving the file and giving it a name. From the menu bar, choose 'File=>Save As...' or press Ctrl+Shift+S. In the resulting dialog, give it the name 'mt_quiz3' and save it to a convenient location such as your desktop. Let's add the quiz title and type a space for students to write their names. You can do this whichever way you're used to. Now we're ready to start making up the quiz.
Now, when I make a worksheet or lesson, I like for text and graphic elements to be aligned and laid out in a uniform way. I've found that using tables is a great way to achieve this. Using tables requires some planning, so let's plan. This quiz will have 8 multiple-choice questions, with each question referring to a short music example. I think the best arrangement for this will be to have two columns, with four questions in each column. Let's allow each music example and each question to have its own cell, so that one excerpt and question combo would require two cells. For 8 questions in two columns, this means we need to insert a 2 x 8 table into our document. Locate the 'table' button on the toolbar and click on the down-arrow to the right. Drag the mouse down and to the right until you've highlighted a selection of 2 x 8. Now we have a 2 x 8 table inserted into our document. Those grid lines are a distraction, so let's get rid of them. Select the whole table by pressing Ctrl+A. The table should now be shaded. On the floating 'Table' toolbar, click the 'Borders' button, then click the first button in the drop-down, the one that shows a square with no black lines around it. The table boundaries are still visible, but now they're not bordered with black lines and will not print. Insert the quiz instructions above the table, and now we're ready to start adding music examples and questions.

Click inside the first cell. This is where our first question's music example will go. Go ahead and number it by typing “1.” followed by a space. Now, click on the 'OLy' button we highlighted earlier. Here's where it gets cool. The OOoLilyPond extension opens the “OOoLilyPond Editor,” a simple text-editor with some options for LilyPond. All of the default options are fine for now, so let's tap out our first music example in LilyPond code. (For information on getting started with LilyPond code, see here.) Click inside the text editor and press Ctrl+A to select all of the default code, and then press the Backspace or Delete key to get rid of it. Now, type your code, and press the 'LilyPond' button in the bottom right of the window to call LilyPond and compile your music example. The OOoLilyPond extension will do its thing and after a few seconds, you'll have a partial measure of music right there in your document. Now, click inside the second cell in the first column and compose your question. To get the lettering format I used, click the 'Numbering On/Off' button on the main toolbar, and then click the 'Bullets and Numbering' button on the resulting, floating toolbar. In the 'Bullets and Numbering' dialog, click the 'Numbering type' tab and select the matching option and click 'OK.'
This is the time to admire our handiwork a little. Using the 'PDF Export' feature of Writer, we can make a high-quality PDF file for viewing and printing. The 'Export Directly as PDF' button is located on the main toolbar in Writer, so go ahead and click it. Give your file a name in the resulting dialog, choose a location and click 'Save.' Now, open the PDF in Adobe Reader and zoom way in. That's pretty good, but the graphic looks a little fuzzy (click the image for a closer look). Fortunately, we can fix this in the OOoLilyPond editor window. In Writer, click on the music example to select it, then click the 'OLy' button again to reopen the editor. Then, click the 'Config' button to open the Configuration dialog. On the right, there's a box for setting the resolution for LilyPond's graphic output. The default is 300 which is a little low. You can adjust it to suit your own sensibilities. The maximum is 2400, so I'll type that in and click 'OK' to return to the OOoLilyPond editor. In the editor, I'll click the 'LilyPond' button to recompile the music example at the new resolution. After that, export your file to PDF again. If Writer asks you whether you want to overwrite the existing file, choose 'Yes.' Go back to Adobe Reader and check the result. As you can see, the graphic is much sharper. Now that we have things the way we want, it's time to get back to work.

At this point, it's a good idea to copy and paste what you've already done into the remaining table cells and then edit each individual example and quiz item from the clones of the first one. That will save you time in formatting additional cells, since the formatting is copied along with the text. All you'll have left to do then is to modify the existing LilyPond code and text. Once you're finished, keep a copy of the document as a template for future quizzes. Once you get proficient with the small amount of LilyPond code you'll need, you can whip up a quiz or worksheet of this length in about 20 minutes.

As you can see, high-quality, professionally crafted lesson materials are well within reach with the right tools. When linked together by the OOoLilyPond extension, OpenOffice.org and LilyPond provide the perfect one-two combination for quickly and easily forging top-rate worksheets and quizzes. By having access to the powerful and flexible LilyPond engraving program right inside OpenOffice.org Writer, we can eliminate the need to deal with two programs separately. Because we're using two distinct, specialized tools for the purposes they're intended for, we don't need to force any application to do a task it's not well suited to. We can have the best of both, with the drawbacks of neither.
You can download a copy of the full quiz made for this post by clicking these links: *.odt (OpenOffice.org) *.pdf (Adobe PDF)


Text and images Copyright © 2009 David B. Stocker

Monday, November 9, 2009

OpenOffice.org And The OOoLilyPond Extension – Part One


Note – this is part one of a two-part post on using OpenOffice.org with the OOoLilyPond extension for documents used in a Music Education setting.


In the past, mixing music and text in a word-processing document was complicated and time consuming. We were forced to choose between two less than optimal methods: exporting music examples one-at-a-time from a score writer into a text document, or typing text into a score writer between and around the music examples. The first choice required importing multiple graphic files, generated by the score writer, and placing them in the text document. Dealing with multiple files was inconvenient and could be a time drain. In addition, if the graphic excerpts were to be of fair quality, the file sizes could quickly become unmanageable and dealing with several of them in a single document often resulted in reduced performance of score writing and word processing programs on machines with modest specifications. This scenario usually ended in a compromise on the quality of the music examples, leading to worksheets and test papers that looked unprofessional (click images to enlarge). The second option produced better-looking output all the way 'round, but even the most expensive score writers did not handle text well. Paragraphs, bulleted or numbered lists, and text layout had to be faked by using spaces since the score writers' text utilities didn't handle common word processing tasks natively. Also, measures, staves and systems all needed heavy manual formatting in order to fit most worksheet or exam styles. With the second method, the results were definitely superior. However, it was even more time consuming than the first method. No matter which choice you made, the results were always mixed at best, forcing a tradeoff between quality and (relative) ease. But now there's a third choice: use a scoring program to make your music examples right inside your word processor by using a native plug-in.


Using two freely available software applications, music educators can print worksheets, exams, quizzes, custom lessons or any other document that uses printed music examples alongside text instructions. OpenOffice.org, the full featured, open-source office suite and LilyPond, the flagship open-source music engraver are both top-notch, free programs. In the past few years, LilyPond has matured into a real force in music engraving software. It produces beautiful music engravings that are the envy of expensive commercial programs. OpenOffice.org, with its support of open standards for document file formats has become a mainstay of Governments and Higher Learning and, more recently, schools and businesses.


OpenOffice.org is every bit as functional as Microsoft Office and has a familiar interface common to many office software suites. Since it's available for Windows, Mac OS and GNU/Linux platforms, it's an option for virtually anyone who uses a computer. What's more, with its impressive selection of available plug-ins, it's functionality is customizable for a staggering array of tasks and working environments. One of these plug-ins is the OOoLilyPond extension. With OOoLilyPond for OpenOffice.org Writer and Impress, you can use LilyPond right inside your text document or slide presentation. This method involves learning some LilyPond code (LilyPond uses a text-based markup syntax rather than a point-and-click graphic interface), but the minimal code required to use the OOoLilyPond extension is well-worth learning for the time and trouble it will save you.


For the next installment, we'll create a short, multiple choice music theory quiz using OpenOffice.org with the OOoLilyPond extension. Unless you already have all three required components for this project (OpenOffice.org, LilyPond and the OOoLilyPond extension), you'll need to do some preparation. Here's your homework:


  1. Download and install the latest OpenOffice.org suite from the OpenOffice.org website – http://www.openoffice.org/


  2. Download and install LilyPond from the LilyPond website – http://lilypond.org/web/install/ LilyPond is developing rapidly, so if you like bleeding edge software, be brave and get the latest 'development branch' (currently 2.13.7-1). The development branch is typically very stable.


  3. Grab the OOoLilyPond extension from Sourceforge - http://ooolilypond.sourceforge.net/ The download, installation instructions and other information are all on the same page.


  4. Read up on some LilyPond syntax in the online documentation – the Tutorial section of the Learning Manual is an excellent place to start.

Text and Images Copyright © 2009 David B. Stocker

Next post - Using OpenOffice.org and LilyPond to make worksheets, tests and quizzes.

Sunday, October 25, 2009

Interview


Transcribing popular music is largely a behind-the-scenes affair. While not completely anonymous—I usually get a byline—the artists whose intellectual property I render into sheet music receive the praise and credit for their art and really, that's the way it should be and I'm fine with that. Occasionally, however, I do receive correspondence from a reader or musician whom I don't know, and I'm always humbled when it happens.


Last week, I was surprised to receive an email from Ben Frankis, a student at the Academy of Contemporary Music in England. He's finishing up his studies in Guitar there and is writing a thesis on transcribing, a pursuit he's entertaining as a source of income. As part of his research, he asked if I would answer some questions about transcribing and how I go about it. His questions are, I feel, good ones for anyone who is seriously considering doing work as a professional transcriber; so I asked for his permission to post the questions and answers here and he consented. Here are his questions and my answers:


Ben Frankis: Have you received formal music training, if so what?


David Stocker: The first formal training I received was in a Classical Guitar class I took in 7th Grade. After I moved to Central Virginia with my family in '89, I was mostly self-taught. By 'self taught', I mean that I spent hours upon hours in my room learning by ear (I didn't realize it at the time, but these would prove to be my formative years—learning by rote the songs and techniques of my favorite guitarists). In my Senior Year at High School, I took a Music Theory class (the only formal music class I took between Middle School and College). Throughout High School and College, I played in bands in the Richmond area.


After High School, I began studies at Virginia Commonwealth University's School of Music, where I eventually earned a Bachelor of Music degree in Classical Guitar Performance. In that time, I also studied Piano, Jazz Guitar, Music Theory and Music History (as well as Philosophy and Religion). I graduated in 1998.


After VCU, I spent about 18 mo. at Arizona State University studying Music Education. Ultimately, I settled on music publishing and discontinued my studies.


BF: How did you start to transcribe professionally?


DS: In the Spring of 2001, while I was teaching private guitar lessons, I started emailing editors of guitar magazines, inquiring about working as a freelance transcriber. I had always been able to learn recorded music by careful listening and experimentation, and so was confident in my ability to do it for work. After sending in samples of transcriptions and getting some feedback from editors, I began to receive assignments from publishers.


BF: Do you use any software or tools to help you work out a piece of music and/or to notate it, if so what?

DS: I use a program called Transcribe! to assist in the work of transcribing. The program allows you to slow down recordings, isolate right or left channels, loop sections of the recording and has a number of other useful features. Most of my transcriptions are hand-written. When I do engravings, I use Finale, Sibelius or LilyPond depending on the client. I recommend LilyPond to clients, especially for Classical music engravings because of the high quality output it produces.


BF: Do you have a set process when transcribing?


DS: When I start on a transcription, the first thing I do is load the sound file in Transcribe! Then, I listen to the entire track 2 times through. On the third pass, I start adding markers and text blocks to the transcription file. The markers help me to navigate through different sections of the song quickly. I use the text blocks to label sections and add details about what is happening with the music, like what instruments are playing and when they come in, their orientation in the stereo image, etc.


BF: To what extent should a guitarist be stylistically and technically proficient if they want to work as a professional transcriber?


DS: It's important to know the range of the guitar and be familiar with the various tunings modern guitarists are using. I'd estimate that about 1/2 to 2/3 of all the music I transcribe is in some derivative of standard tuning. The rest is in something else, mostly Drop D, but there are several others that pop up now and then—open tunings, DADGAD or what have you. Open tunings are especially prominent in styles where there is a lot of slide playing like in Blues or American Country music.


A working knowledge of various guitar techniques—picking styles, harmonics, fingerstyle, capo usage, etc.—is essential. It's also good to have experience with the various effects and signal processors in wide usage today. A good grasp of Music Theory is also important. Most of the music I transcribe is in traditional "guitar keys" like A, E and D minor or C, G, A, D or E major. Occasionally you get something less common like B major or G minor, so it's good to be flexible and to be able to think in all keys. Having some knowledge of modern studio recording techniques is a plus.


As for styles, the most important thing is to approach new music with the mind of a beginner and not to assume too much from the outset. It's critical that you can identify and reproduce the sounds you hear on a recording. Usually, the technical aspects of a given style are readily apparent, but that's not always the case. Nailing down techniques in a style that you're unfamiliar with often means doing some research, which usually means watching video of live performances.


BF: What do you consider to be the most important skills required in transcribing?


DS: Being able to cut through effects and draw out the notes. Listening for tone differences and being able to identify by sound what kind of instrument someone is playing and what kinds of effects they're using. Fluency with music notation and terminology. And of course, technical proficiency on the instrument you're transcribing for.


BF: What advice do you have for someone pursuing a career as a professional transcriber?


DS: Learn to play a lot of music by listening to it. Strive to emulate your favorite players and styles, but also, don't be afraid of trying something new now and then. Become a proficient sight-reader.


BF: Why do think you have been able to have a successful career transcribing?


DS: I've been successful because I don't let go of a transcription until I know I've done everything I can to make it the best that I possibly can. My process is under a continual process of refinement. I like to try new things and I've learned to keep what works and shed what doesn't. I also have a policy of total honesty with my clients with regard to deadlines and my own capabilities. Potential employers appreciate when you're honest with them, even when sometimes you just want to tell them what they want to hear in order to get the job. In a real work environment, where there are real deadlines, it's important to be realistic about work quality and time frames, so that the ones who are depending on you can in turn be depended upon.

Sunday, October 18, 2009

The Keys to Great Looking Manuscripts


Introduction

Over the years, I've received several compliments from editors on the neatness and clarity of my manuscripts. I take pride in that because, next to accuracy and timeliness, clarity of intent is the next most important attribute of a transcriber's work. A manuscript that is free of clutter and has proportionately spaced and properly aligned text and music elements is easier for editors and proofers to read. Neatness minimizes misunderstandings and makes it easier to spot mistakes. During the time I've spent writing transcriptions, I've been able to develop tools and techniques that enable me to write a clean, clear manuscript with relative ease in a shorter amount of time.
In this installment, I'm going to share some of the habits I've learned and developed that have made writing clean and neat manuscripts one of the easiest parts of my transcription routine. I'll reveal tools that everyone—amateurs, students and professionals—can customize and use to improve the look and clarity of their work. I'll also cite some handy references for those who might want to study further the history and practice of music notation, from which I draw the foundations of my manuscript style.

Tools of the Trade

Most of the tools and instruments I use to create clean manuscripts are available at any office supplies retailer. One tool, which I call a “Manuscript Spacer,” I've developed myself and involves the use of a computer-assisted score writing program (like Finale, Sibelius or LilyPond). Any of the “lite” versions of major commercial scoring programs should be able to produce a customized Manuscript Spacer that will fit your particular situation, so long as it allows you to alter print margins and staff size, and print your spacer in landscape format. I'll demonstrate how to construct one shortly. But first, the office supplies:
  • Mechanical Pencils – 0.5 mm and 0.9 mm thickness
  • Refillable Click Erasers
  • 12'' Metal Ruler for drawing lines
  • A small T-square

Constructing a Customized Manuscript Spacer

With a ruler, measure the margins and staff size of the manuscript paper you use to write your music on. In your notation program, set the margins and staff size to conform to that of your manuscript paper. Next, set up a number of evenly-spaced lines that will serve as your Spacer lines for various measure widths (mine has 5 lines). Finally, put measures and notes on your lines. I put all notes on the middle “B” line, with the stems pointing downward. You can customize yours however is best for the style of music you're writing, but I use the following configuration (for a 4/4 Manuscript Spacer):
  • One line with one bar, filled with 32nd-notes
  • One line with two bars, each filled with 32nd-notes
  • One line with three bars, each filled with sixteenth-notes
  • One line with 4 bars, each filled with eighth-notes
  • One line with 5 bars, each filled with eighth-notes

When you're done formatting your Manuscript Spacer, print it off and fold it up. You should fold the paper along the “B” line of each staff. Mine has 5 folds. I use the edge of a paper cutter, but if you don't have a cutter around, you can use the sharp corner of a table or counter top to make your folds. Then, use your thumb (or a burnishing tool) to make the crease.

If you want, use clear packing tape to reinforce each of the creases. You can use scissors or a paper cutter to cut the edges even so that no tape is hanging off. Now, you have a custom-made Manuscript Spacer that you can use to align all of the elements of your hand-written music.

Manuscript Method

For writing notes, chord symbols and most other music elements (like dynamic markings), I use the 0.9mm mechanical pencil. It draws nice bold lines which easily stand out against the lines of manuscript paper. I find the music easier to read at that weight, since it is mostly within and intersects the staff lines of the paper. I use the lighter weight pencil for most text elements (like lyrics and directions) because it allows me to write smaller with greater legibility. The ruler and T-square are for any straight lines like bar lines, repeat endings or hairpin crescendos and decrescendos. These are things that almost anyone who hand-writes music is familiar with.
When I'm ready to write a section of music, the first thing I do is make a decision about measure width. I always strive to fit as much music on a line as I comfortably can. Taking all of the musical elements into account when making this decision—notes, accidentals, lyrics, density of chord changes, tab numbers (if present), and of course, overall layout considerations (how many staves per line)—will prevent frustration as you go along. When I've determined the optimal measure width, I use the Manuscript Spacer to mark off the bar line positions and the ruler (or T-square) and 0.9mm pencil to draw the bar lines.
At this point, I'm ready to start writing the music.
Once the bar lines are marked, spacing the notes using the Manuscript Spacer is a breeze. I simply align the Spacer's bar lines with the bar lines I've already drawn and then start writing the music, using the Spacer to align notes and rests. I do this for each instrument and voice in the texture.
Pretty soon, I have a page full of music and I'm ready to begin adding any text elements like lyrics and directions to the score. I use my 0.5mm pencil with the Spacer to align any lyrics and in-staff text indications (like ottava directions and certain articulations) to the staves. The reinforced crease is good to use as a straight edge for drawing lyric extenders and line spanners.
Then it's time to add chord symbols, out-of-staff text indications (like recalls of labeled figures) and section headings or rehearsal marks. I prefer the 0.9mm lead for chord symbols and headings and the 0.5mm for almost all other text.
You can see that with a minimum of extra effort, a free-hand manuscript can be beautifully spaced, and elements precisely aligned. Whether you're writing sketches for band rehearsals, music for yourself to remember, music theory assignments or preparing scores for professional engraving and publication, using the Manuscript Spacer can help you write clear and legible music that will earn the appreciation of anyone who has to read it later.

10/18/09 - David Stocker

Text and Images Copyright © 2009 David B. Stocker

Further reading on the practice of Music Notation:
  1. Read, Gardner. Music Notation: A Manual of Modern Practice, Second Edition. New York: Taplinger Publishing Company, 1979. Print
  2. Gerou, Tom and Lusk, Linda. Essential Dictionary of Music Notation. Los Angeles: Alfred Publishing Co., Inc., 1996. Print

Tuesday, March 17, 2009

New site up for testing.


The new website is now up for testing. If you feel like it, leave comments in the comments section. The url is http://www.notesettersinc.com/ There are still some empty pages where the content is not yet finalized, but for the most part, it's in its final form.

Dave

Saturday, February 28, 2009

New Website


For the last month or so, I've been working on a much-needed face lift to the old website I originally put up in 2002. The site hasn't changed much since then, and it really is time to put a new public face on who I am and what I'm doing. The site also highlights some of the charity work I've been trying to get off the ground. You'll see when you finally can check it out.

The new site has a 'crumpled paper' theme and is coming along nicely, thanks in part to KompoZer. I've even learned a (very) little html, which has been interesting. When I put the site up originally in 2002, I used Microsoft Frontpage. KompoZer is similar (WYSIWYG) but is open-source, which is important to me. Working on the new website has been a long process but it's really starting to blossom.

With some luck, the new site will be up within the next two weeks. I'll link to it from the 'blog, so anyone following this endeavor will be able to bring it up and make suggestions.

Peace,

Dave