It was thus said that the Great Chuck Guzis once
stated:
I don't think that Knuth ever brought up the subject of musical
notation, however. If he has, it would make interesting reading.
In both _Metamagical Themas_ and _Godel, Escher, Bach_, Douglas Hofstadter
used a program called SMUT to layout and print musical scores. SMUT was
written by Donald Byrd at Indiana University. And from the examples given,
it does an incredible job.
There's also LilyPond.