3 LilyInput - LilyPond input format -- Mudela 0.1
5 B<NOTICE:> this doc describes the I<new> input format, S<Mudela 0.1>.
9 This document describes the the LilyPond input format, which is an
10 effective language for definining music. We call this language
11 (rather arrogantly) The Musical Definition Language (S<Mudela 0.1>).
13 The first aim of Mudela is to define a piece of music,
14 being complete from both from a musical typesetting,
15 as from a musical performing point of view.
17 The design of Mudela has been (perfect past tense, hopefully)
19 the most important criteria being:
25 define the (musical) message of the composer as unambiguously as possible,
29 be intuitive, and easily readable
30 (compared to, say, Musi*TeX input, or MIDI :-),
34 be writable in ASCII with a simple texteditor, yfte(TM).
38 Other considerations were (and will be):
44 be able to edit the layout
45 without danger of changing the original music (Urtext),
49 allow for adding different interpretations, again,
50 without danger of changing the original,
54 easy to create a conductor's score,
55 as well as the scores for all individual instruments,
59 provide simple musical manipulations, such as
60 S<(i) extracting> a slice of music from a previously defined piece,
61 S<(ii) extracting> only the rhythm from a piece of music,
62 S<(iii) transposing>, etc.,
66 easy to comprehend to both programmers and others.
70 Musical pieces could be
76 Mahlerian orchestral scores,
80 piano pieces (Schubertian, Rachmaninovian),
84 pop songs (lyrics and chords),
92 Bach multivoice organ pieces,
96 short excerpts to be used in musicological publications.
103 The Musical Definition Language (Mudela) S<version 0.1>,
104 has a logical structure,
105 making use of typing and naming (using identifiers),
106 that allows for flexible input, and definition reuse.
108 The below included for explanatory
109 purposes only (i.e., for a complete and up-to-date definition, see
110 F<lily/parser.y> and F<lily/lexer.l>):
114 The de-facto extension of Mudela is F<.ly>. Files may be included by
115 entering C<include> at the start of a line:
121 Line comments are introduced by a C<%>
125 Keywords are preceded by a backslash "\". They contain alphabetic
128 Identifiers in their normal form consist start with a alpha character,
129 followed by alpha-numerics. Identifiers can contain any characters
130 (except whitespace, C<$> and C<%>), if you use this construct:
132 $Id_with###@weird92chars =
134 =head2 Nesting characters
136 Mudela uses the brace (C<{> and C<}>) for hierarchical structures. To
137 aid the eye in reading, for chords the C<<> and the C<>> are used as
142 =head2 Hierarchical structures
144 The general structure consists of declarations:
152 \TYPE{ <type specific data> }
154 (Currently, C<\score> is the only type that can be instantiated
155 at top level. Currently declarations can only be done at top level)
157 Most instantiations that use an IDENTIFIER are specified as follows:
159 \TYPE { IDENTIFIER [...] }
161 Some exceptions on this rule have been made to prevent inputting
162 Mudela becoming tedious
167 The actual musical part of Mudela that defines a melody, is known as
170 Simple mudela is the most common type of music. It consists of a list
171 of notes or lyrics, chords, and commands.
175 To simplify different aspects of music definition (entering the notes
176 and manipulating them) Mudela has a number of different input "modes":
182 At the start of parsing, Mudela assumes normal mode.
183 In Normal mode, a word is looked up in the following order:
185 word identifier, string
186 \word keyword, string
188 In normalmode, a word is assumed to start with an alphabetic
189 character, followed by alpha-numeric characters.
193 Note mode (and thus Simple mudela) is introduced by the keyword C<\music>.
194 In Note mode, a word is looked up in the following order:
196 word identifier, string
197 \word keyword, string
199 In Note mode a word is considered to have alphabetic characters only.
203 Lyrics mode (and thus Simple mudela) is introduced by the keyword C<\lyrics>.
205 In Lyrics mode, a word is looked up in the following order:
208 \word keyword, string
210 In Lyric mode every sequence of non-digit and non-white characters
211 starting with an alphabetic character is considered a word.
215 These modes are of a lexical nature. Normal and Note mode largely
216 resemble each other, save the possibility of entering Reals, and
221 Simple mudela basically is a sequence of the notes you want to
226 is a A-1 pitched quaver. The ' as well as the ` signify an octave change.
227 A-1 is 440 Hz concert-pitch. C<c'> is also known as the central
239 This is an A flat, (just below 110 Hz concert-pitch). The C<*2/3>
240 signifies that this note is part of a triplet (3 in stead of 2). The
241 duration is one and a half quaver (C<4.>) times 2/3.
243 The default language for notenames is defined to be dutch,
246 cisis disis eisis fisis gisis aisis bisis
248 cis dis eis fis gis ais bis
252 ces des es fes ges as bes
254 ceses deses eses feses geses ases beses
256 The standard notenames also have uppercase versions, which octavate
269 These notenames along with duration is enough material to construct
275 Music is able to express more. generally speaking, the other
276 'features' are either connected between notes (slurs, beams: spanning
277 requests) or attached to notes (eg. accents). The former are
278 implemented as START and STOP stop features and then attached to the note.
288 Please note that these two characters do I<not> necessarrily nest, eg:
293 Symbols which can be put at either side of a staff are entered as follows:
295 a-^ % marcato, direction: default
296 a^- % portato, direction: above note
297 a_. % staccato, direction: below note
298 a^\script { "symbolindex" . . . } % see script.ini for details.
300 Dynamics can be put after the notename:
302 a4 \dynamic { 0 } % 0 = fff, 7 = ppp
304 Mudela defines the following dynamic identifiers:
306 ppp pp p mp mf df ff fff % df iso f, f is a notename.
308 The general form of a note is:
310 post-requests de-octavate notename octavate duration pre-requests
312 Notenames are just identifiers, and can be declared for any
313 language appropriate (see F<dutch.ini>).
317 Lyrics in Mudela resemble Simple mudela a lot, with notes substituted
320 All syllables are entered separately, separated by whitespace
322 Twin-4 kle4 twin-4 kle4 ...
324 Two syllables or words that compose a single
325 duration entry are bound together using an underscore
333 Rhythms in Mudela are entered identical to Simple mudela.
334 The melodic part of the information is ignored.
338 In concrete, a piece of Mudela has the following structure:
340 % declare pieces of music:
341 melody = \music{ <simple mudela> }
342 accompany = \music{ <simple mudela> }
344 % instantiate (=create tex, midi output) the score:
348 \commands{ <score global commands> }
349 \midi{ <midi definitions> }
350 \paper{ <paper and layout definitions }
355 Examples are included with the LilyPond distribution. For the sake of
356 maintenance no long examples are included in this document.
361 LilyPond first reads F<symbol.ini>, which contains declarations crucial
362 to proper operation of LilyPond (symbol tables, note names).