Showing posts with label software. Show all posts
Showing posts with label software. Show all posts

Thursday, March 24, 2011

Quality of tools and standards of success

I was assigned about a dozen exercises from Fux as a Sophomore at St. John's. I remember them going very quickly, maybe ten minutes each, and so thought I could tear through the sixty two-voice exercises in a week. It's actually taken me about six weeks. Why?

I think there's an interesting interplay between my workflow and my standards of success. When I did these as a 19-year-old, I worked on paper in a dorm room. I'd usually show up for class a little early so I could play my exercises on the piano. (I've never been able really to read music, so the only way I can know what they sound like is to play them.) Every time I played one, I was impressed that some part of it sounded neat. I was following these rules, marking down notes that I couldn't hear, making nice-looking patterns on the page, and when I played them, some part always sounded nice.

Now, as soon as I finish a first pass, I do it up in my score editor and have the computer play it back for me. It's still the case that some parts sound nice, but it's always the case that some parts could be nicer. So I fiddle with it, which is easy to do. I move some notes around on the screen, then hit "play" again, then fiddle some more. So, instead of being happy that some bit of it sounds nice, I keep working on it until I'm basically satisfied with the whole thing. This can take a long time-- I spent three hours on one of the fifth species exercises. Because tweaking my work is much easier now, I'm much less willing to be satisfied with mixed results.

The new way is probably the better way to learn, but it's definitely made the project more daunting than I thought it would be. I hope I have the stamina to make it through all 90 of the three-voice exercises. I'd love to do that. But I don't expect I'll do more than a handful of the four-voice exercises. Unless I somehow get much, much faster, there's no way I'm going to do all 120 of those.

Wednesday, February 16, 2011

Typesetting music: lilypond and latex

I made it through the first four exercises before I flipped ahead and thought, "wow, there a lot of exercises. It would be nice if someone had mad a workbook to accompany the text." Then I thought, "I should make a workbook to accompany the text!" Then I went off the deep-end figuring out how to typeset music in lilypond and LaTeX.

I've now typeset the first 60 exercises-- the two-voices section of the book. Check out a sample page in PDF-- it looks cool! I'm going to stop, now, for fear of burning out. I'll go back to working on the music, and typeset three-voice counterpoint after I finish two-voice. Here are a few of the things I've learned:

To integrate lilypond scores into a LaTeX document:

First, in your LaTeX document, reference the file with your score, e.g:

\lilypondfile{WB.1.2.E.a.ly}

Then, when you want to compile the typeset file (mine is called "WORKBOOK.tex") do these steps:
$ mkdir out
$ lilypond-book --pdf --output=out WORKBOOK.tex
$ cd out
$ pdflatex WORKBOOK.tex

This is pretty self-explanatory: lilypond-book creates a new TeX document, converting the score sources into images and LaTeX code, then dumps it into the "out" directory.

Naming conventions:

I've settled on this naming convention, to help me keep track of proliferating lilypond files:

<species>.<voices>.<mode>.<above/below>

For example: 1.2.E.b.ly

Meaning first species, two voices, phrygian mode, counterpoint below the cantus firmus.

Because Fux re-uses the same cantus firmi throughout the book, I can re-use the same scores five times in each section of the workbook, once for each species. Including the species number helps me keep track of completed exercises, though.

Landscape formatting in LaTeX:

Including "landscape" as an option under \documentclass will format landscape. If you use pdflatex to compile the source, it handles everything. If you're using latex to compile the source, you've got to tell latex to respect the landscape option. And then you have to tell dvips to respect the landscape option. Pdflatex is the way to go.

Empty bars in lilypond:

Since I'm making a workbook, I need blank staves that I'll fill in by hand. Lilypond freaks out about bars with no notes in them, though. The way around is to fill in every bar with a whole note, and then use \hideNotes and \unHideNotes around the set of bars I want empty. A similar trick can make roomy, regularly-sized empty bars for workbooks.

Formatting single-line scores:

All the Fux exercises are one-line scores. I want to use all the available page space, to make them easier to write on. That means reducing the default indent and turning off the ragged right edge. (Lilypond indents the first system of any score, and doesn't justify full the last system in a score.) To accomplish this, I've included this bit at the top of every score:

\paper {
indent = 10\mm
ragged-right = ##f
}

Also at the top of every score is this: \version "2.12.3"

Apparently lilypond somewhat regularly breaks backwards compatibility. When they do, they release a script that converts old scores to the new version, and that script looks for a version string at the top of the file it's crunching.

Saturday, February 12, 2011

Notation software

I haven't decided about the best way to do Fux's counterpoint exercises. I copied the first few down on music paper. (There's lots of good blank staff paper available online. For two-voice counterpoint, I've been using the "instrumental duet" sheet from this extensive collection of blanks. As things get more complicated, there will be increasing returns from a software score editor, though.

I spent a while today running down some score editors for GNU/Linux. I want something with a reasonably intuitive graphical interface that can also output lilypond format. (I wonder if it might be fun to make a blank workbook of Fux's exercises as I do them. If so, I'll want lilypond markup for that, and I hate the idea of duplicating work.) It looks like the best option is probably NtEd, so I think I'll start with that.

I also stumbled on a web program called noteflight that looks like it will be great for sharing work on this blog. I don't think I can use it as my primary editor, but I'll probably do up some occasional samples. Like this, my favorite of the four exercises I've done so far:



That's in the dorian mode, with the counterpoint below the cantus firmus. It sounds nice!