Requirements for a Program: a Composer’s Point of View

Jean-Michel Hufflen

Abstract may be viewed as a compilation—and result in the complete formatted text. Of course, LATEX and It is well-known that some typesetting systems other programs built out of T X belong to this E are interactive, that is, , whereas some— second category. wysiwym—work like compilers and process in- The same distinction exists for music engrav- put files written using an input language. Interac- ing software, that is, programs drawing music tive systems provide interesting features, whereas scores. Some programs—e.g., , MuseScore, other qualities are implemented by wysiwym sys- NoteEdit—are interactive: a is built step by tems. We can observe the same points about music step by means of graphical interface, even though engraving programs. In this article, we summarise notes and other musical signs are progressively the properties of interest during the music com- written by hand on a sheet of paper. Some—e.g., position process and review some music engraving LilyPond, MusiXT X(Taupin et al., 2002)—are programs from this point of view. E clearly related to a wysiwym approach. Keywords music engraving, scores, music The advantages and drawbacks of these two typography, music composition, versioning, man- approaches have already been described in many aging musical instruments, building files, Fi- articles about word processing. However, writing nale, LilyPond, MusiXT X, NoteEdit, MuseScore. E music is a different task than writing texts, and some arguments relevant about written Sommario documents do not apply to music scores. Sym- metrically, a music composer does not have the È ben noto che alcuni programmi di elaborazione same requirements than a book writer. Since I di testo sono interattivi, cioè wysiwyg, mentre al- personally compose music during my spare time, cuni — wysiwym — funzionano come compilatori I judge interesting to give my point of view. I ed elaborano i file di ingresso usando un particola- experienced some music software, not all of them, re linguaggio. I programmi interattivi presentano so my study is not exhaustive. However, I tried to funzionalità interessanti, mentre altre funzionalità express what I like or dislike in some programs, sono fornite dai sistemi wysiwym. Possiamo os- as precisely as possible. servare le stesse caratteristiche nei programmi per scrivere musica. In questo articolo presentiamo le In the first section I explain what a composer funzionalità che interessano nel caso della com- expects from a music program. I begin this sec- posizione tipografica della musica e commentiamo tion by summarising the requirements for a type- alcuni programmi da questo punto di vista. setting system in order to show how different is musical composition. Then I briefly describe the Parole chiave Incisione della musica, spartiti, programs I practised in Section3. I report my ex- tipografia musicale, composizione musicale, con- perience about music engraving programs in Sec- trollo delle versioni, gestione degli strumenti mu- tion4. Readers of this article are only required sicali, creazione di file midi, Finale, LilyPond, Mu- basic knowledge of music. Readers interested in siXT X, NoteEdit MuseScore. E precise definitions of musical terms can consult Jacobs (1988). 1 Introduction Among typesetting systems, the clear distinction 2 Requirements between wysiwyg1 and wysiwym2 systems is In the following, I consider word processor basic well-known. In the first case, such programs—an tasks, and do not deal with specialised features example being Adobe InDesign—are interactive, such as tables, mathematical formulas, pictures of that is, the formatted text is directly displayed chemical molecules, etc. A word processor should on screen, and updated as soon as end-users en- allow its users to get high-quality print outputs. ter new characters or activate some menu oper- It should be able to implement basic graphical ef- ations. In the second case, a source file written fects, that is, the use of boldface types, italicised using an input language is processed—this step characters, etc. It should reflect a document struc- 1. What You See Is What You Get. ture, from a graphical point of view, by means 2. What You See Is What You Mean. of hierarchical headings using different character

32 ArsTEXnica Nº 24, Ottobre 2017 Music Engraving Programs: a Composer’s Point of View sizes. It should also implement cross references some limitations remain. As a consequence, a com- among some subparts of such a structure. Last poser must always deal with scores, either because but not least, a good word processor should allow these scores are written from scratch, or because different parts of a large document to be written they are derived but should be reworked. by several end-users, and the integration of these As a second important point, I think that parts should be easy3. getting a satisfactory version after improving or As mentioned above, many articles about the changing intermediate versions is a process longer advantages and drawbacks of wysiwyg and for music scores than written documents. That is wysiwym systems already exist, so I just sum up true for our personal production, and other com- some important points. Current interactive sys- posers I asked for this question confirmed that. tems have been improved in comparison with pro- The goal of such a process is to get the best ver- grams used 40 years ago, but they are still limited sion but, concerning music, there are some addi- by their interactivity: when an end-user types new tional points. First, some notes may be misplaced, characters, such a program must respond quickly as if they are mistakes within a musical dictation. and display a reformatted version of the current If you are able to compose music, you do only a paragraph. On the contrary, a wysiwym system few of such mistakes, but ‘a few’ does not mean can examine many solutions before choosing the ‘nothing’; in fact, they are comparable to typing best way to split a paragraph into successive lines. mistakes within written documents. In addition, So does LATEX: it explores some solutions with re- as I explained in Hufflen (2017), the use of ac- spect to criteria summarised into a badness mea- cidentals ([, ], \, . . . ) is error-prone5. A synthe- surement, the chosen solution being minimal bad- sised version of a score can allow a composer to ness. An analogous modus operandi is applied for detect such mistakes which will have to be fixed. splitting a chapter into successive pages. An inter- A second point is related to musical instruments: active system cannot explore many possible solu- even though a composer knows how to use them, tions and reach such efficiency. it is difficult—if not impossible—to master all of 6 More generally, wysiwym systems allow style the technical features of all of the instruments . and content to be clearly separated, so users can In other words, some extracts may be impossible 7 mainly focus on content when they are writing to play by the instrument planned for that . Ei- 8 a document; considerations about style can be ther such an extract may be suitably arranged , or examined separately. Interactive systems may be given to another instrument. Similarly, if some in- preferred for short documents, e.g., administra- struments are unavailable when a musical piece is tive letters, but for large documents, consisting of to be played, a solution can be to replace them by many parts, such a separation makes it easier to other instruments; this can yield changes in scores. merge these parts or to produce a new version ac- cording to another style. A very simple example: 3 Some music software building a two-column version of a document pre- First, let us consider the music programs built viously typeset using a one-column format is easier out of T X, briefly described in Goossens with a wysiwym system than a wysiwyg one. E et al. (2009, Ch. 9), with some examples. In Now let us go to music composition (first im- the late 1980s, an early attempt for typesetting portanto point). Roughly speaking, there are two musical scores by T X extensions was MuT X ways to get a score for a new musical piece: putting E E (Schofer e Steinbach, 1987), which influenced down all the notes and musical signs composing it, MusicT X(Taupin, 1992), definitively replaced or deriving it from piano keyboard or from synthe- E by MusiXT X in 1995. This program (Taupin sised music like a midi4 file. The second way out- E et al., 2002) has been maintained since the acci- puts scores not ready to use. Such scores must be dental death of its main creator, Daniel Taupin, in reworked in order to simplify them: they actually August 2003, but it seems that only minor devel- reflect one performance of a piece, too much ex- opment has been done. This robust program, still actly. In order words, it does not give the canonical in use, is usable with Plain T X or as a LAT X 2ε way to express how to play it. A simple example: E E all of the notes of a glissando are explicitly put 5. Besides, musicologists often have doubts about their down onto the resulting score, whereas the stan- interpretation. dard specification of this effect consists of giving 6. Many features are described in good orchestration manuals, e.g. Forsyth (1982) or Rimsky-Korsakov only the starting and ending notes, joined by a (1964). But they cannot be exhaustive. Besides, old manu- line. Like wysiwyg word processors, music pro- als did not incorporate recent progresses and new features. grams deriving scores from synthesised music have 7. For example, the trombone can perform glissandi be- tween many pairs of notes, but this effect is not always been improved compared to the first versions, but possible for every pair of notes. 8. . . . or playable with a special trick: as an example, 3. This point is important for industrially produced doc- Stravinsky (1921, 2 bars after Mark 92, p. 79) uses a note uments, but marginal about music pieces. too low for a clarinet, but makes it precise that a piece is 4. Musical Instrument Digital Interface. to be inserted into the bell.

33 Jean-Michel Hufflen ArsTEXnica Nº 24, Ottobre 2017

\version "2.18.0"

\score { \new Staff { \clef "treble" \time 4/4 Figure 2: Output generated for Fig.1. \accidentalStyle Score.dodecaphonic r8 d’8 bes’4~ bes’8[ d’8 bes’8 g’8] | P c’’4. a’8 a’8[ ees’8] ees’4~ | M P’s authors. LilyPond’s syntax evokes TEX ees’16 ges’16 e’16 f’16 b’2 r4 | since its commands are prefixed by the ‘\’ char- } acter. As an example, Fig.1 gives a specification \layout {} of a tema of Lulu-Suite (Berg, 1935, Rondo, } Mark 243, p. 3). The result is pictured in Fig.2. After some global definitions, each note is defined by its pitch—or ‘ ’ for a rest—followed by a Figure 1: Example using LilyPond. r number specifying its rhythm14. This software can output music scores as pdf15 files and package (). It has been designed to get generate midi files. Other formats are possible, high-quality print outputs concerning the layout too16. An introduction in Italian to this software of musical scores, as TEX does for texts. It does is Gordini e Liessi (2014). not aim to play music. It does not aim to be the Interactive music engraving programs allow input of a program playing music, either. More- users to define systems, that is, set of staves, and over, it has been reported as difficult to handle. place notes on staves interactively. To do that, a Besides, MusiXTEX’s manual says (Taupin et al., note’s pitch and its rhythm have to be selected. 2002, § 2.2.1): Listening to the result is allowed. When a piece is saved, it is analysed and a warning message is [. . . ] If this sounds complicated, remem- emitted if some bars are rhythmically incorrect. ber that TEX was designed to typeset text Within this category, NoteEdit may also be viewed and not music. as a preprocessor since it allows to build input files for MusiXT X or LilyPond. However, let us men- MusiXT X’s input language is very low-level; E E tion that files generated for MusiXT X have to be much placement is up to end-users, e.g., for the E reworked manually in order to get nice outputs notes and corresponding accidentals of a chord. (Hufflen, 2011). I personally experienced Finale That is why some preprocessors have been de- and MuseScore. The latter is free, not the former. veloped in order to generate source files for The services provided are comparable, Finale’s er- MusiXT X. They are text-based applications, us- E gonomy being better. Another difference is related ing higher-level input languages and describing to importing scores written using other conven- the contents of a score without reference to its tions, including midi files. In both cases, there is layout. Historically, the first preprocessor is MP 9 P no way to share common parts. For example, if (Goossens et al., 1997, § 7.4); this project be- the first and second violins play the same score, ing abandoned for several years. The second is the only way to do that is to use the copy/paste PMX10. Scores are specified in a concise way, close buttons of your software menus. to the horizontal and vertical arrangement of an ‘actual’ score, without reference to formatting; see Goossens et al. (2009, § 9.5) for an introduction 4 Reporting our experience and Simons (2004) for a complete description. Roughly speaking, two reasons may motivate the The third is M-Tx11; see Goossens et al. (2009, use of a music engraving program: giving a digital § 9.6) or Laurie (2005). M-Tx language adds a version of existing music pieces, or creating new layer of convenience to the PMX language: for pieces. In the first case, software built out of TEX example, instrument parts are input as they are can be used, because of the high quality of out- printed—that is, from top to bottom—whereas puts. As a very good example, a rich collection of they are entered last line first—that is, from bot- Polish traditional songs has been carried out by tom to top—with PMX. As another music pro- Odyniec (2016). He used M-Tx to ease the spec- gram built out of TEX, let us mention TEXmuse ification of lyrics and to get midi files to check (Garcia, 2012). results. He got very nice scores, but this is not a Another wysiwym program is given by the composers way of working: these songs were com- gnu12 LilyPond13. This project was started by posed during a long lapse of time. I have the same

9. MusiXTEX PreProcessor. 14. Let us remark that LilyPond’s dodecaphonic acciden- 10. Preprocessor for MusiXTEX. tal style allows us to specify an accidental before each note, 11. Music From Text. as did by A. Berg in his manuscript. 12. Recursive acronym: Gnu’s Not Unix. 15. Portable Document Format. 13. This name is a joke related to , an inter- 16. LilyPond’s older versions generated . files, but this active music software. backend is no longer supported in recent versions.

34 ArsTEXnica Nº 24, Ottobre 2017 Music Engraving Programs: a Composer’s Point of View feeling by looking into examples accompanying the look of a score (Hufflen, 2013). The most MusiXTEX’s documentation: they are either clas- part of musical symbols have been included, in- sical examples or very simple pieces or arrange- completely (Hufflen, 2014, 2017), into Unicode. ments that have not been reworked and reworked. Let us go back to music composition. I tried to As mentioned in §2, it is essential to be able to give a synthetic point of view of this activity. More listen to the result of specifying notes. Of course, technical details related to particular cases can listening to synthesised music—e.g., midi files— be found in Hufflen (2011, 2012). I think that does not replace a performance by real instrumen- wysiwym systems are interesting, as shown by tists but provides some feedback and allows some LilyPond success, but with a wysiwyg interface. possible mistakes to be fixed. I personally regret In other words, the process of getting scores as pdf that NoteEdit is no longer developed: it allowed a files or synthesised music as midi files does not score to be entered nicely, checked, and reworked need to be interactive, but entering data should, if needed and, when the score reached some ma- unless a nicer input language is proposed. turity, NoteEdit output files for MusiXTEX or Lily- Pond allowed high-quality print, even in case the Acknowledgements score had to be reworked. Putting a new score into action with LilyPond— I thank Claudio Beccari, who has proof-read this or a MusiXTEX preprocessor—is possible. More- article and for his Italian translations of the ab- over, LilyPond allows variables to be used, in stract and keywords. particular, they can share some common parts without information redundancy. Advanced fea- References tures such as transposition17 are directly available. Berg However, such a way is difficult in practice since , A. (1935). Lulu-Suite, volume 12 674. Uni- input languages are quite far from the standard vi- versal Edition. sual representation of music. This drawback exists Finale (2017). Music Notation Software. http: about mathematical formulas written in LAT X: it E //www.finalemusic.com. may be difficult to intuit the look of a complicated formula just by looking at the source text used to Forsyth, C. (1982). Orchestration. Dover Pub- produce it. On the contrary, we can often guess the lications, Inc., New-York. look of fragments in text mode even though they are marked up by commands. Let us go back to Garcia, F. (2012). «TEX and music: an update input texts for LilyPond: they are difficultly prac- on TEXmuse». TUGboat, 33 (2), pp. 158–164. ticable for a musician who would not be also a computer scientist. For that reason, I personally Goossens, M., Rahtz, S. e Mittelbach, F. use LilyPond for musical texts that reached an (al- (1997). The LATEX Graphics Companion. Il- most) stable state, but prefer MuseScore for scores lustrating Documents with TEX and PostScript. developed from scratch. Addison-Wesley Publishing Company, Reading, If we consider the specification styles for out- Massachusetts. put scores, LilyPond and Finale are the best, but the other programs seem to me to be satisfactory. Goossens, M., Mittelbach, F., Rahtz, S., Let us remark those parameters related to spac- Roegel, D. B. e Voß, H. (2009). The LATEX ing: horizontal distance between adjacent notes, Graphics Companion. Addison-Wesley Publish- vertical distance about staves and systems. ing Company, Reading, Massachusetts, 2ª edi- zione. 5 Conclusion Gordini, T. e Liessi, D. (2014). «LilyPond: Musical typography is a fascinating domain and un music engraver integrabile con LATEX». we can admire the results produced by music en- ArsTEXnica, 18, pp. 97–118. graving programs in most cases, concerning clas- sical and popular music, or modern music using Hufflen, J.-M. (2011). «Some experience with ‘classical’ effects18. But that raises difficult prob- MusiXTEX». In Proc. EuroBachoTEX 2011 lems: reading a score is not a linear process, con- Conference, a cura di K. Berry, J. B. Lud- trarily to reading a book, as I show in Hufflen wichowski e T. Przechlewski. Bachotek, (2015). Some historical background can influence Poland, pp. 19–30.

17. The specification of the same musical fragment, but — (2012). «A comparison of MusiXTEX and lily- at a different pitch. See Jacobs (1988) for more details. pond». In Twenty Years After. Proc. BachoTEX 18. I recommend the reading of Vogt et al. (1982) to 2012 Conference, a cura di T. Przechlewski, people interested in graphical effects used within contem- porary music’s scores. There is still a lot to do. . . unless K. Berry e J. B. Ludwichowski. Bachotek, considering only graphical formats. Poland, pp. 103–108.

35 Jean-Michel Hufflen ArsTEXnica Nº 24, Ottobre 2017

— (2013). «Why typesetting music is so dif- Osseyevich Steinberg. English translation of ficult». In Typography and Communication. the Russian text by Edward Agate. Proc. EuroBachoTEX 2013 Conference, a cura di T. Przechlewski, K. Berry e J. B. Lud- Rosegarden (2013). What is Rosegarden? http: wichowski. Bachotek, Poland, pp. 79–84. //www.rosegardenmusic.com. — (2014). «Musical symbols at the digital Schofer, A. e Steinbach, A. (1987). «Au- age». In What Can Typography Gain from Elec- tomatisierter notensatz mit TEX». Tech- tronic Media? Proc. BachoTEX 2014 confer- nical report, Rheinische Friedrich-Wilhelms- ence, a cura di T. Przechlewski, K. Berry, Universität, Bonn. B. Jackowski e J. B. Ludwichowski. Ba- Simons, D. (2004). PMX—a Prepro- chotek, Poland, pp. 17–24. cessor for MusiXTEX. Version 2.5. — (2015). «Musical typography’s dimensions». http://icking-music-archive.org/ In Various Faces of Typography. Proc. Ba- software/pmx/pmx250.pdf. Przech- choTEX 2015 conference, a cura di T. Stravinsky, I. (1921). Chant du rossignol. lewski Berry Jackowski Lud- , K. , B. e J. B. Poème symphonique pour orchestre, volume wichowski . Bachotek, Poland, pp. 61–65. 633. Boosey & Hawkes. — (2017). «History of accidentals in music». Taupin, D. (1992). «MusicT X: Using T X to tugboat, 38 (2), pp. 147–156. E E write polyphonic or instrumental music». In Eu- Jacobs, A. (1988). The New Penguin Dictionary roTEX 1992. pp. 257–271. of Music. Penguin Books, 4ª edizione. Taupin, D., Mitchell, R. e Egler, A. (2002). © Laurie, D. (2005). M-Tx: Music from MusiXTEX . Using TEX to Write Polyphonic Text. Version 0.60. User’s Guide. or Instrumental Music. Version T.104. Part of http://icking-music-archive.org/ LATEX distribution. software/mtx/mtx060.pdf. Unicode (2016). Unicode 9.0.0. http://www. LilyPond (2017). Music Notation for Everyone. unicode.org/versions/Unicode9.0.0/. http://www.lilypond.org. Vogt, H., Bard, M., Bielitz, M., Haller, H.- MuseScore (2017). Créer, écouter et im- P., Raiß, H.-P. con Seipt, A. (1982). Neue primer de magnifiques partitions. http://www. Musik seit 1945. Philipp Reclam, Stuttgart, 3ª .org. edizione. NoteEdit (2014). A Score Editor. http: //sourceforge.net/projects/noteedit. berlios. . Jean-Michel Hufflen FEMTO-ST (UMR CNRS 6174) & Odyniec, A. (2016). «Skladaj nuty! czyli University of Bourgogne Franche- śpiewnik w LATEXu». In Convergence: TEXu Comté, wyjdź z szafy! Proc. BachoTEX 2016, a cura di 16, route de Gray, T. Przechlewski, K. Berry, B. Jackowski 25030 BESANÇON CEDEX e J. B. Ludwichowski. pp. 7–16. FRANCE Rimsky-Korsakov, N. A. (1964). Principles of jmhuffle at femto-st dot fr Orchestration. Dover Publications, Inc., New- York. Completed posthumously by Maximilian

36