Programming again

The web application I’m trying to set up for the Serpent Publications
website is the most programming I’ve done for several years.
I made my living as a programmer for several decades, so I wasn’t
expecting it to be quite this hard to get back into it.

Part of the problem is that mysql and php aren’t what I ever did for a
living. I don’t remember the details of the vocabulary even for
what I did used to do very well, but I never knew either mysql
or PHP without a reference book.

Anyway, I was finally making progress on setting up the mysql
views this morning, and I completely forgot that I hadn’t posted
to this blog, so this is a fast one because any minute now Sunny will decide
it’s time for his walk and I’ll have to take him.

Anyway, my advice for what it’s worth, if you haven’t
programmed for a while and need to, is to go back to doing very
small things at a time. It’s generally good advice for
programming anyway — you get testability and reusability and all
kinds of good things by breaking up the job into little

So yesterday, I wrote up a list of all the fields that should
be in the pieceinfo view of my musicpublish database.

This morning I got each of them to work individually in an
interactive environment.

Then I wrote the sql that defines the pieceinfo view, which
takes data from the piece, book, and composer tables, by way of
the Book_Pieces_Table for joining book and piece.

Another good piece of advice is to set up an interactive
environment that you’re comfortable with. The command line mysql
is pretty good, but I got farther and faster when I switched to
the emacs sql mode.

Anyway, the upshot is that I’ve got a working although minimal
CSS theme, most of the hard part of the mysql is written, so what
I mostly have to do is write some PHP (some of which I may be able
to substitute python for), and then I’ll have a subset of the
functionality that I can throw at people for testing.

I’m not really sanguine about getting the whole application
written before BEMF, but I’m
optimistic that I can get at least as much functionality as is in
the current site, with improved design for easier upgrading.

Lilypond vs Petrucci, Round II

I said in the round one of this
that I’d let you know if I got any useful
answers to my query on the lilypond list. One of the list
contributors got interested in the problem and wrote me a new
layout block that does indeed look a lot more like what Petrucci
does. You can read the gory details on the


Here’s the first page of the Petrucci facsimile of Adieu
mes amours
by Josquin:

[Petrucci facsimile]

And here’s the cantus part lilypond produces now that I have
the new layout block:

[Lilypond cantus]

And here’s the tenor part from lilypond with the new layout block:

[Lilypond tenor]

Boston Early Music Festival (BEMF)

I ordered my tickets to BEMF this
morning. I had been agonizing over how many to buy since the
brochures arrived in February, but I finally decided to go with a
minimal number. So what I got is all the Renaissance ones, all
the recorder ones, and all the 11PM ones. And a pass and a book.

The festival is a major event in the early music community,
which takes place in odd-numbered years. (In even-numbered
years, there’s an event in Berkely, California.) There are
concerts by world-renowned players, masterclasses with famous
teachers, fringe events by less-renowned players, and an
exhibition of instruments and related paraphernalia.

Two years ago, this blog was just starting to take shape, and I
announced that I would be blogging from BEMF.
I attempted to convince other people to also post about their
experiences, since there’s no way one person can cover all the
events, or even the whole set of events that are interesting to
them. I got more comments on these posts than I usually do, but
didn’t get a lot of guest blogging action, partly because a lot
of people who might have done it were out-of-town without their
usual network access. But mostly because if you’re as busy as
the really committed early music people are at BEMF, you don’t
want to add writing to it.

So this year, I’ll keep up my one post a day policy, and during
that week (June 9-14 for me) most
posts will probably be about BEMF, but I’m not going to try to
be comprehensive, even about what I’m doing. I will set up a BEMF 2009
category, and if you’d like to get a user account that entitles
you to post entries on this blog, let me know and I’ll set it
up. You don’t need my permission to post comments, and it would
be really good if my readers wanted to

In terms of preparation for BEMF, I’ll be putting out flyers
for the Cantabile Band
and Serpent Publications.

I’m hoping to get the new
site set up by then, but it’s going slower than I hoped for, and
the flyer might still have to stick to the current and stuff.

Comparing Lilypond and Petrucci

While I’m working intensely on the site redesign, you might
have to put up with the things I’m writing about it to help me

Here’s a query I made on the lilypond-users
mailing list:

In general, I love the way lilypond output looks when compared with
other computer-generated sheetmusic.

I’m aware that the ideal espoused by the developers is the 19th century
hand-engraved sheet music.

I usually like the look of my lilypond output as compared with the late
sixteenth and early seventeenth century printers I usually transcribe.

I always like the look of lilypond output as compared with anyone’s
hand-written music.

But when I transcribe Petrucci from the facsimile, the spacing lilypond
does always looks clunky, especially in the parts with large

I’ve recently figured out that the large note-values look better if you

override SpacingSpanner #'base-shortest-duration = #(ly:make-moment 1 1)

in the layout block.

I believe Petrucci’s spacing is just equal spacing for every note, no
matter what its value.

Does anyone have any tricks for making lily’s output look a little more
like that?

I’m trying to redesign my website, and one idea I have is to have a
graphic in the header with a facsimile on one side and lily’s output on
the other. So it’s important that people not look at the lilypond
output and say, “Wow, that’s ugly compared to the facsimile.” Of course
one way to do that would be to use an ugly facsimile (of which there are
many), but it would be more fun to use a beautiful facsimile and also
have beautiful lilypond.

I’ll let you know if I get any useful answers.


Here’s the first page of the Petrucci facsimile of Adieu
mes amours
by Josquin:

[Petrucci facsimile]

And here’s the cantus part lilypond produces:

[Lilypond cantus]

And here’s the tenor part from lilypond:

[Lilypond tenor]

Site Redesign Progress

I finally got started on the site redesign, so this has to be a
short one.

It’s the kind of project that every time you solve one problem,
three others pop up, so I suspect it will be at least days if not
weeks before I have it ready even for friendly perusal, let
alone to loose on the unsuspecting public.

I’m starting with the thematic wordpress
theme framework. It allegedly lets you customize almost
anything, but that turns out to be only true if you know CSS. I
learned a bit about it the last time I did site redesign, and
actually sort of liked the look of the site I did for the Boston
Recorder Society (they changed it when I stopped maintaining it,
so you can’t see it there). Anyway, I have the mechanics pretty
much the way I want them, and the look something like the old
BRS site, so now all I have to do is:

  • Write the content for the new pages, including the new
    search form.
  • Fiddle with both LaTeX and Gimp to get the banner at the top
    of the pages right.
  • Fiddle with the wordpress stuff so the sidebars and footers
    are the way I want them.

My accomplishments for yesterday included:

  • Finding where the home page on the new hosting site should go. I
    broke accessing it altogether twice yesterday afternoon trying
    to be too cute about that.
  • Setting up a test environment on my home machine. There’s
    still work to do on this, because I used the Ubuntu wordpress
    package to do it, so I have to fiddle with permissions and
    ownership and groups and maybe links before it really lets me
    work on it right. But I made substantial progress.
  • This morning before breakfast, I installed keyring and now I can do openssh to both the old
    and the new hosting sites without entering passphrases.

I was frustrated enough yesterday when I had access to the new
site broken and hadn’t yet figured out how to customize anything
in thematic that I considered just going to bed and reading
trash fiction, but I have persevered, so far.

The most inspiring story I learned in high school was in the
history of English literature book. Thomas Carlyle had spend
several years writing the history of the French Revolution, and
he gave the only copy of the manuscript to his friend Macauley
to see what he thought. Macauley’s maid (at least, she had to
take the rap) thought it was trash and put it in the fire.
Carlisle went to bed and read trashy fiction for a week and then
got up and wrote the book over again.

I admit that story has more often inspired me to go to bed and
read trashy fiction than to write the history of the French
Revolution. But it’s really true that there are times you just
shouldn’t be doing some things, and it was looking like
yesterday afternoon was the wrong time to be slaving over a hot

Buying ebooks

On my list for later this morning is to boot the laptop into
windows and do several things I can’t do on linux:

  • Print the final tax returns from TaxCut.
  • Fix some annoyances with the Universal remote
  • See if it’s really possible to buy DRM’d books from Fictionwise and read them
    on a non-comercial OS.

The others have been discussed at length (taxes
and remote); this is the day for
my rant on the ebook marketplace.

I’m surprised that this topic hasn’t come up before, more than
two months into this daily blog, because a lot of the blogs I
read are devoted to rants about the publishing industry’s
benighted attitude towards ebooks. So I would have expected to
have wanted to rant myself before this, but it wasn’t until last
week that I felt the rant coming on.

What happened last week was the discovery that
The Lord of the Rings (and The Hobbit
and The Children of Hurin, but apparently not
The Silmarillion) is available in official ebook

I’ve had an illegal download for some time, and that’s the way
I reread it these days, but it certainly isn’t ideal — it
screws up all the letters with accents, for instance. So
although I’ve already bought it in both paperback and hardcover,
I would be willing to buy it again as an ebook, if that meant I
could read it on my device of choice (the Nokia

If you haven’t been following this topic, the major topic of
debate is the fact that many publishers and authors aren’t
comfortable just letting you download a book in a format like html
or text or various open book-specific formats that you
can read on any computer you can put it on. They feel that there
will be too much piracy, and they’re only comfortable letting you
buy their books if they have something called DRM (digital rights
management) attached to them. There are a lot of good arguments
against this point of view. The most concise summary of them is
that if you buy a book with DRM, you don’t own it, you’re only
renting it for an unknown length of time.

The conventional wisdom these days is that if you need to
convert a DRM’d ebook to something readable on an open platform,
the Microsoft .lit form is the format of choice, since it’s
apparently just a wrapper around some html. So once you’ve
unwrapped it, you aren’t any longer bound by the DRM limitations.

So when I found that Fictionwise didn’t have Tolkein’s books in
what they call “multiformat”, which means you can download any
of a number of open formats to any device you like once you’ve
paid for it, I attempted to buy them in .lit format.

The shopping cart was fairly confusing, but I manged to get to
where I could push a button to complete the purchase, but it
warned me that I should download a free one first to verify that
I would be able to read it on my platform of choice.

That sounded like a good idea, so I moved all the Tolkeins to
my wish list, and tried to “buy” the suggested free .lit

They had no problem letting me do a $0.00 purchase without
giving them my credit card number (don’t laugh — lots of
shopping carts won’t), but then when I went to
download it, I couldn’t because I wasn’t on a Windows

So in order to give them lots of money for a book I want to
buy, I have to boot an operating system I don’t want to run.

And then they’re surprised that ebooks aren’t taking off

If you do want to see whether you like ebooks, I recommend
getting started the way I did — either download works that are
out of copyright from gutenberg or manybooks, or buy non-DRM’d
books from Baen or

Maybe it will turn out that there’s a way to get DRM’d books to
work without booting windows, or that booting the windows
occasionally to do the download is worth being able to get the
books. If so, I’ll let you know.

Little Dorrit

I watched the last episode of the television adaptation on
Sunday, and finished rereading the book yesterday.

It’s a good adaptation, and the plot of the book is convoluted
enough that seeing the adaptation helps in reading the book, even
if you’re used to the
the convoluted plots of nineteenth century novels and soap

Of course, an eight hour TV show has to leave out a lot of
stuff from a 900 page book. I was especially sorry to lose the
impoverished music publisher. (He’s Mrs. Plornish’s father, who
at the beginning of the book is living in the Workhouse so as
not to take food out of the mouths of the Plornish

I think even the experienced adaptors who did this one chafed
at the restrictions, because the end seemed unusually
compressed, leaving us with no idea of what happens to several
characters who have been fairly carefully described (most
notably Minnie Meagles and her husband).

Of course, Dickens’ treatment of the business tycoon who steals
from one fund to pay off the investors in other funds and finally
loses money for all the main characters seems especially

The subplot where Miss Wade convinces Tattycorum (Harriet) to
leave her employment with the Meagles and live with her is a
little harder to translate to the twentyfirst century. One
reviewer suggested this was because of the hint of a lesbian
affair, but actually Dickens does hint at that. Mr. Meagles says
to Miss Wade:

‘If it should
happen that you are a woman, who, from whatever cause, has a perverted
delight in making a sister-woman as wretched as she is (I am old enough
to have heard of such), I warn her against you, and I warn you against

The problem is
that we are initially inclined to sympathize with Harriet for
feeling oppressed and ignored, where Dickens really believes she
should be grateful and submissive to such excellent people who are
being so kind to her.

Here are a few notes on things I picked up on on this reading
that you might not have noticed.

White Sand and Grey Sand
This is mentioned when Mr. Panks is hanging around the
Marshalsea while he’s researching Mr. Dorrit’s inheritance. He
explains to Amy and Mr. Clennam,

‘I am spending the evening with the rest of ’em,’ said Pancks. ‘I’ve
been singing. I’ve been taking a part in White sand and grey sand.
I don’t know anything about it. Never mind. I’ll take any part in
anything. It’s all the same, if you’re loud enough.’

It’s actually a round — the person who taught it to me thought
it was Ravenscroft, but I don’t find it there.

Prunes and Prisms
I first ran into this phrase in Little Women, where Jo says
to Laurie:

“Hold your tongue!” cried Jo, covering her ears. “‘Prunes
and prisms’ are my doom, and I may as well make up my mind to
it. I came here to moralize, not to hear things that make me
skip to think of.”

If I’d thought of it, I would have known it was a quotation, and would
have probably guessed it was Dickens, but I wouldn’t have
guessed anything as good as what Mrs. General tells Amy Dorrit
when explaining why it’s more genteel and feminine to say “Papa”
than “Father”.

‘Papa is a preferable mode of address,’ observed Mrs General. ‘Father is
rather vulgar, my dear. The word Papa, besides, gives a pretty form to
the lips. Papa, potatoes, poultry, prunes, and prism are all very
good words for the lips: especially prunes and prism. You will find it
serviceable, in the formation of a demeanour, if you sometimes say to
yourself in company–on entering a room, for instance–Papa, potatoes,
poultry, prunes and prism, prunes and prism.’

I also learned a new word. It means having a florid, ruddy
face. It occurs describing the customers at the inn in the
Swiss alps:

The third party, which had ascended from the valley
on the Italian side of the Pass, and had arrived first, were four in
number: a plethoric, hungry, and silent German tutor in spectacles, on
a tour with three young men, his pupils, all plethoric, hungry, and
silent, and all in spectacles.

The derivation is from plethora, implying that the face is red because
of a plethora of blood.

Following up


I mentioned that I’d retired my winter jacket for the Spring on
Good Friday. This turns out to have been a
couple of days early, as there was a cold, raw wind on Easter
Sunday morning. Since then, my lightweight spring jacket has been
fine, though.


Immediately after the Opening Day game that I wrote about, the Red Sox all (except first baseman
Kevin Youkilis) went into hitting slumps, and the starting
pitchers all had trouble getting hitters out. Luckily, the
defense and the bullpen were solid.
Amalie Benjamin of the Boston Globe wrote an article saying:

So the day after Beckett said the Sox have to pitch
better, have to play better, have to do everything better, nothing
was better.

And a disgruntled fan commented:

I fully understand that it is early but like Yogi
Berra once said It can get late early!

This week they seem to have gotten everything better, and the
starting pitchers are pitching for 6 and 7 innings and the hitters
are hitting the way we expect them to.

More transcription woes

I didn’t get the corrections to Upon a hill right the first
time. All the parts ended at the same time, but for every
cadence, the cantus part cadenced later than the other two parts.
I didn’t notice listening to the MIDI file, but
when the woman singing that part, who’s a very experienced singer,
was having real trouble making it sound right, I looked at the
score, and made some more adjustments.

Handmaid’s Tale

Read the Mccarthy review after posting my review, I think the
book has gotten a lot more scary since 1986.

Chocolate Chip Brioche

I went to a large party last night and baked two batches of my
bread machine brioche, one with fruit and nuts
and one with chocolate chips. People liked both of them, but I
don’t know that I’ll repeat the chocolate chip one. One of the
points of that recipe is how much fun the dough is to play with,
and with the warm chocolate chips in it, it isn’t as much fun.

Following up

Logitech 550

I said in my first post about my
Logitech Universal Remote that there wasn’t an easy way to program it
under Linux. Further googling revealed that it might not be as
hard as I thought, since the actual interface is actually through
the Logitech web site
and you only need the command line to upload a file to the
remote. I have now tried this out.

I started with these ubuntuforums
for installing concordance and congruity. I haven’t had a lot
of luck getting udev to let me use devices as a user, so I also
used these
for running the programs as root.

The upshot is that it didn’t work. The web interface for telling Logitech what you want your
remote to do is the same as what you get running the program on
Windows, but on my system, running congruity on the file the web
program gives you to download doesn’t seem to change what the
remote does at all. YMMV.

But the good news is that the Logitech website does save
everything you did, and when you run their program on Windows, you
get the work you did on the website. So you can
do your programming at the logitech
, and then run the windows program to update the

So I have now fixed some of the problems I reported in my last
, about the volume control on the DVD and the aspect ratio
on the TV set.


The advantage of posting emails
to lists is that you do get comments on what you said. A couple
of people pointed out that you can get good scores out of
lilypond; it just takes some tweaking. I replied that I had
assumed that (and in fact I do it sometimes for non-renaissance
stuff), but that for me the badness of Lily’s scores is a feature,
since I don’t believe people should play from them.

You can read the whole thread (quite rambling) in the
lilypond-users archives for yesterday
, starting at the
contribution before mine in the thread titled “Re: Review of
Valentin’s opera”.

Transcription of Weelkes

I have uploaded the transcription I talked
about on Tuesday.


I made a quick post yesterday on the
grounds that I had to go do my taxes. I spent about 4 hours, and got the essential work done. There
will be another session for filing when I get an answer to a
question from my financial advisor, but the fiddly stuff about
finding all the records and adding up all the little pieces is all

The Amazon Download seemed complicated
compared to putting a CD into a drive, but maybe it’s because I’m
not really used to doing much on Windows. Once you got the tax
program downloaded (which required installing the Amazon download
program), you had to find the setup program, which they gave you
the filename of in a text document, so you couldn’t just follow
the link.

TaxCut made one fairly major blunder
which if I hadn’t caught it would have cost me several hundred
dollars in taxes and penalties. It didn’t ask me if the money I was withdrawing
from the Roth IRA was taxable or not, and just assumed it was.
I’m sure this is a bug. It took a bit of clicking to find the
place where I could enter the basis of the IRA, but I think I have
a reasonable number for the taxes now.


I implied a couple of weeks ago that I
didn’t think the MLB TV worked
very well. One of the things I had on while doing my taxes was
the Spring training game between the Red Sox and the Mets, and the
quality on my Mythbuntu box with the DVI
connection to the TV was quite acceptable.

Scores are now in PDF’s

It’s lunchtime and I still haven’t posted, so I’m putting up
something I wrote in email to the lilypond
users list

I mostly use lilypond for Renaissance polyphony, where the
original performers didn’t have access to scores, and I feel strongly
that modern performers can play better from parts, so that they have
to learn how their part fits with the others by ear instead of by

But having access to the score does help modern performers analyze,
and that analysis can certainly speed up rehearsals and maybe even
improve the performance. And I do produce a score in the
process of getting the parts typeset and proofread. And of course,
anyone who installs [the right version of] lilypond can print the
score as well as the parts.

For quite a while, I wasn’t putting the score PDF’s up on my site
at all, but now I’ve decided that the scores
Lily makes are so bad that nobody would be tempted to perform from
them if they had access to a nice part with good spacing and *a lot*
fewer page turns. So I have recently modified my scripts so that the
score appears at the end of the parts.

You can see an example in the PDF of Baldwin’s
A Browning