1 \input texinfo @c -*- coding: utf-8; mode: texinfo; -*-
3 Translation of GIT committish: FILL-IN-HEAD-COMMITTISH
5 When revising a translation, copy the HEAD committish of the
6 version that you are working on. See TRANSLATION for details.
12 @node problem-statement
13 @unnumberedsec Designing notation software: how not to do it
15 It would be nice if notation software didn't need any babysitting to
16 produce acceptable output.
18 Our goal with @emph{LilyPond} was to write such a system: a program
19 that will produce beautiful music ("engraving") automatically.
21 At first sight, music notation follows a straightforward hierarchical
22 pattern. Consider the example below, with two staves containing two
25 @image{pictures/naive-notation,,,.png}
27 Isn't writing software all about finding hierarchies and modeling the
28 real world in terms of trees? In the view of a naive programmer, the
29 above fragment of notation is easily abstracted to a nested set of
32 @image{pictures/naive-notation-uml,,,.png}
34 It's easy to follow this model when writing software. It's obvious
35 how to store this data in memory, and writing on disk can be easily
36 mirrored. In an XML-file you could write something like
42 <measure id="1">
43 <chord length="1/2">
44 <pitch name="c">
55 In short, this model is obvious, simple and neat. It's the format
56 used by a lot software. Unfortunately, it's also wrong. The
57 hierarchical representation works for a lot of simpler music, but it
58 falls apart for advanced use. Consider the following example:
60 @image{pictures/nonnaive-notation,,,.png}
62 In this example, several assumptions of the previous model are
63 violated: staves start and stop at will, voices jump around between
64 staves, and sometimes span two staves.
66 Music notation is really different from music itself. Notation is an
67 intricate symbolic diagramming language for visualizing an often much
68 simpler musical concept. Hence, software should reflect that separation.
70 @divClass{float-right}
72 Next: @ref{divide-and-conquer.html,Divide and conqueror},
73 a blue print for automated notation