On Musical Typesetting: Lilypond Has to Offer, I Have Put Hands to Work on Sonata for TEX and METAFONT, Op

On Musical Typesetting: Lilypond Has to Offer, I Have Put Hands to Work on Sonata for TEX and METAFONT, Op

TUGboat, Volume 24 (2003), No. 2 169 On musical typesetting: Lilypond has to offer, I have put hands to work on Sonata for TEX and METAFONT, Op. 2 creating (yet another) system, with portability, flex- ibility and adaptability as priorities.2 What follows Federico Garcia is a report of what I have done so far. If I’m sub- This article appears in the same TUGboat mitting it to the public, it’s because I think I might issue as an obituary of Daniel Taupin, author be onto something. of MusiXTEX, who unexpectedly passed away I wrote this article in two stages. First (Op. 1) in 2003. I’d like to take the opportunity to when I had just devised the main general model, offer it as an homage to his memory.—FG and anticipated the main algorithms needed to im- plement it. That was toward the end of 2002. And Modern software industry has provided tools for the then now, mid-2004, when publishing it in TUGboat typesetting of music for some time already. Two became really plausible. Particularly the first part programs in particular — Finale and the more recent (a history of the main idea of the system) features Sibelius — virtually exhaust the music community: a narrative approach, so I have avoided anachro- almost all musicians use either one or the other. nism: what I know now but didn’t know then should Both are WYSIWYG (what you see is what you get) not interfere too much. Along the way of telling applications, and both have reached that stage of this story, there is a detailed review and ‘refutation’ development in which new versions consist of little of MusiXTEX. It’s admittedly sharp, but sincerely more than new shortcuts, ‘cookies’ of questionable well-minded and grateful. relevance, and so on. Competition for ever wider Then, in the second part, I allowed myself to markets, on the other hand, has made these pro- ‘upgrade’ the article a little more deeply, taking ad- grams horribly ‘intelligent’: intended for standard vantage of these two years of actual work of pro- situations and the less-than-careful user, they make gramming. It’s interesting to see how getting con- customization beyond a certain point painstakingly crete changes ideas in unexpected ways. bothersome. I think this article can be read without knowl- The problem is that non-standard situations edge of either music, TEX programming, or META- are the order of the day in music. On the one FONT. Experience would surely make it easier to hand, there is the so-called ‘new music’, the con- understand some lines here and there, but I’ve tried temporary form of the ‘art music’ tradition, whose to make it all clear to any reader, above all to non- notational requirements have proven to be hard to musicians. I myself wasn’t very experienced with 1 standardize at all; traditional notational practices TEX, METAFONT, or musical typesetting — and the are quite sufficient for popular and commercial mu- bulk of this article is re-telling the steps I’ve followed sic (increasingly the target of commercial software), and what I’ve learned from scratch. but ‘new music’ overwhelms them in infinite ways. On the other hand, there is musicology, in which PART I: not the composition of new but the analysis of old Qualitative design music might potentially require not-yet-conceived- of typographical upheavals — to circle or otherwise 1 The nature of musical typesetting (I) highlight certain notes, to tie them in unusual ways, It’s no coincidence that music typesetting programs to superimpose staves, . Thus, any serious system are, by far, closer to being graphic utilities than text of professional musical typesetting has to give up processors. Musical text is multi-dimensional. As the hope of foreseeing all needs and possibilities. In 2 a word, it has to be programmable. MusiXTEX is Daniel Taupin’s development of what was originally a joint effort with Andreas Egler, MusicTEX. This is what some years ago got me started Lilypond is the TEX-related but independent system devel- thinking of TEX as a suitable environment for such a oped by Jan Nieuwenhuizen and Han-Wen Nienhuys. I am by system. Recently, after having had some experience no means familiar with Lilypond — in part because in 2002, when I wrote a first version of this article, I had to give up with MusiXTEX — the ‘officially approved’ (i.e., ac- trying to install it under Windows. One might think that knowledged by Donald Knuth in his web page) ap- I should have become familiar with it before embarking on plication of TEX to music — as well as a taste of what the creation of TEXmuse; but my intuition is that there is no real overlap between the two. For one thing, Lilypond is not 1 Perhaps I should remind the reader that today’s mu- a TEX package; for another, it boasts (rightly) of beautiful sic, like other arts, is far removed from the conventions and fonts. TEXmuse, on the contrary, boasts of not having fonts traditions of the ‘common-practice period’ (17th–19th cen- at all, and this shows how different their nature and approach turies) — for which, incidentally, the ‘standard’ notation was are. I have grown convinced that, as explained later on, not developed. Everything has changed, from the nature of the having fonts is actually the best way to the flexibility I am musical sound itself to its graphic representation. aiming at, as a musician and as a programmer. 170 TUGboat, Volume 24 (2003), No. 2 we all know from school, the horizontal dimension analogous, system-) breaking, and writes another is time, and the vertical dimension is pitch. But file (.mx2) for TEX to read during a second TEX that’s only part of the matter, since different voices pass. come in different staves (different vertical position). I always wondered whether invoking an exter- The horizontal position of a note in a given staff nal program was really necessary. TEX’s handling depends not only on what notes in the same voice of horizontal spacing, a substantial part of the line- come before or after, but also, and typographically breaking algorithm for which Knuth takes and de- most importantly, on what notes are played at the serves much credit — “this, in fact, is probably the same time by other voices. There is in effect a third most interesting aspect of the whole TEX system” [3, dimension involved. (A look at Figure 1 might be p. 94] — seems so powerful, so flexible, and intu- in place to visualize all this. This piece being for itively so fit to musical spacing, that MusiXTEX ap- piano, each staff corresponds to one hand.) peared to be missing out. I had the impression that music offers an opportunity to really take advan- tage of this superb algorithm, whose capabilities go far beyond assigning a little extra space to periods and question marks in horizontal mode. CHO P I N 01 The authors of MusiXTEX lay aside this algo- rithm on the grounds that it implicitly assumes that a normal line of text will Figure 1: A fragment of a typical score (m. 9 of contain many words, so that inter-word glue need Chopin’s piano prelude in c minor, Op. 28 No. 20). not stretch or shrink too much to justify the line. This strategy does not work very well for music. Music is thus not a line of text (in which only If each bar of music is treated as a word, in the the horizontal dimension matters), but also not a sense that inter-bar glue is placed at the end of mathematical formula (in which the vertical dimen- each bar, then the usual result is the appearance sion plays a role): it is an array of several two- of unsightly gaps before each bar rule. This fol- dimensional ‘strings’ that are mutually lined up. Ty- lows naturally from the fact that the number of bars per line is normally many fewer than the pographically, what this resembles most is, of course, number of words in a line of text. [8, p. 9, my a table. And yet there is an important difference: emphasis] a musical score usually goes on and on, for many pages — the table has to be broken. Not broken as This is, in the main, correct. What is flawed is longtable breaks tables, because in this case the ta- the implicit analogy: it is not “each bar of music” ble is not too tall, it is too long. It has hundreds and which has to be “treated as a word”, because its in- hundreds of columns, and there is no way to know ner components are also subject to spacing. Since beforehand how many of them fit in each page. the defining characteristic of a ‘word’, as far as the line-breaking algorithm is concerned, is that its com- 2 The problem of horizontal spacing and ponents remain packed together with rigid space in line breaking between, measures (bars) do not qualify as words. An idea that suggests itself naturally when one med- Therefore there is still a possibility of using itates about this kind of page-breaking is an anal- TEX’s line-breaking algorithm. My whole endeavor has been ultimately moved by the intuition that ogy with TEX’s output routine. Instead of collecting lines and deciding when to break the page ‘verti- there must be some way to apply it. As we shall see, cally’, here the task consists of collecting columns this id´eefixe led me — round-about and through a and deciding on horizontal breaks.

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    14 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us