]> git.donarmstrong.com Git - lilypond.git/commitdiff
lilypond-0.0.44
authorfred <fred>
Sun, 24 Mar 2002 19:36:13 +0000 (19:36 +0000)
committerfred <fred>
Sun, 24 Mar 2002 19:36:13 +0000 (19:36 +0000)
Documentation/mudela.pod [new file with mode: 0644]
input/standchen.ly

diff --git a/Documentation/mudela.pod b/Documentation/mudela.pod
new file mode 100644 (file)
index 0000000..02f06ae
--- /dev/null
@@ -0,0 +1,453 @@
+=head1 NAME
+
+Mudela -  LilyPond input format 0.1
+
+=head1 DESCRIPTION
+
+This document describes the the LilyPond input format, which is an
+effective language for definining music.  We call this language
+(rather arrogantly) The Musical Definition Language (S<Mudela 2>).
+
+The first aim of Mudela is to define a piece of music, 
+being complete from both from a musical typesetting, 
+as from a musical performing point of view.
+
+The design of Mudela has been (perfect past tense, hopefully)
+an ongoing process, 
+the most important criteria being:
+
+=over 4
+
+=item *
+
+define the (musical) message of the composer as unambiguously as possible,
+
+=item *
+
+be intuitive, and easily readable 
+(compared to, say, Musi*TeX input, or MIDI :-),
+
+=item *
+
+be writable in ASCII with a simple texteditor, yfte(TM).
+
+=back
+
+Other considerations were (and will be):
+
+=over 4
+
+=item *
+
+be able to edit the layout 
+without danger of changing the original music (Urtext),
+
+=item *
+
+allow for adding different interpretations, again, 
+without danger of changing the original,
+
+=item *
+
+easy to create a conductor's score, 
+as well as the scores for all individual instruments,
+
+=item *
+
+provide simple musical manipulations, such as 
+S<(i) extracting> a slice of music from a previously defined piece, 
+S<(ii) extracting> only the rhythm from a piece of music, 
+S<(iii) transposing>, etc.,
+
+=item *
+
+easy to comprehend to both programmers and others.
+
+=back
+
+Musical pieces could be
+
+=over 5
+
+=item *
+
+Mahlerian orchestral scores,
+
+=item *
+
+piano pieces (Schubertian, Rachmaninovian),
+
+=item *
+
+pop songs (lyrics and chords),
+
+=item *
+
+gregorian chants,
+
+=item *
+
+Bach multivoice organ pieces,
+
+=item *
+
+short excerpts to be used in musicological publications.
+
+=back
+
+
+=head1 Overview
+
+The Musical Definition Language (Mudela) S<version 2>,
+has a logical structure, 
+making use of typing and naming (using identifiers),
+that allows for flexible input, and definition reuse.
+
+The below included for explanatory
+purposes only (i.e., for a complete and up-to-date definition, see
+F<lily/parser.y> and F<lily/lexer.l>):
+
+=head2 Files
+
+The de-facto extension of Mudela is F<.ly>. Files may be included by
+entering C<include> at the start of a line:
+
+       include "a_file.ly"
+
+=head2 Comments
+
+Line comments are introduced by a C<%>
+
+=head2 Words
+
+Keywords are preceded by a backslash "\". They contain alphabetic
+characters only. 
+
+Identifiers in their normal form consist start with a alpha character,
+followed by alpha-numerics. Identifiers can contain any characters
+(except whitespace, C<$> and C<%>), if you use this construct:
+
+       $Id_with###@weird92chars = 
+
+=head2 Nesting characters
+
+Mudela uses the brace (C<{> and C<}>) for hierarchical structures. To
+aid the eye in reading, for chords the C<<> and the C<>> are used as
+nesting braces.
+
+=head2 Identifiers
+
+=head2 Hierarchical structures
+
+The general structure consists of declarations:
+
+       IDENTIFIER = \TYPE{
+               <type specific data>
+       }
+
+and instantiations:
+
+       \TYPE{ <type specific data> }
+
+(Currently, C<\score> is the only type that can be instantiated
+at top level. Currently declarations can only be done at top level)
+
+Most instantiations that use an IDENTIFIER are specified as follows:
+
+       \TYPE { IDENTIFIER [...] }
+
+Some exceptions on this rule have been made to prevent inputting
+Mudela becoming tedious
+
+
+=head2 Simple mudela
+
+The actual musical part of Mudela that defines a melody, is known as 
+I<simple mudela>. 
+
+Simple mudela is the most common type of music.  It consists of a list
+of notes or lyrics, chords, and commands.
+
+=head2 Modes:
+
+To simplify different aspects of music definition (entering the notes
+and manipulating them) Mudela has a number of different input "modes":
+
+=over 4
+
+=item Normal mode
+
+At the start of parsing, Mudela assumes normal mode.
+In Normal mode, a word is looked up in the following order:
+
+       word    identifier, string
+       \word   keyword, string
+
+In normalmode, a word is assumed to start with an alphabetic
+character, followed by alpha-numeric characters.
+
+=item Note mode
+
+Note mode (and thus Simple mudela) is introduced by the keyword C<\music>.
+In Note mode, a word is looked up in the following order:
+
+       word    identifier, string
+       \word   keyword, string
+
+In Note mode a word is considered to have alphabetic characters only.
+
+=item Lyric mode
+
+Lyrics mode (and thus Simple mudela)  is introduced by the keyword C<\lyrics>.
+
+In Lyrics mode, a word is looked up in the following order:
+
+       word    string
+       \word   keyword, string
+
+In Lyric mode every sequence of non-digit and non-white characters
+starting with an alphabetic character is considered a word.
+
+       a&@&@&TSI|{[    % a word
+       1THtrhortho     % not a "word"
+       Leise Fl\"u\ss{}teren meine Sapfe       % 4 words
+
+
+=back
+
+These modes are of a lexical nature. Normal and Note mode largely
+resemble each other, save the possibility of entering Reals, and
+meaning of C<_>
+
+=head2 Notes
+
+Simple mudela basically is a sequence of the notes you want to
+enter. 
+
+       a'4     % dutch names
+
+is a A-1 pitched quaver. The ' as well as the ' signify an octave change.
+A-1 is 440 Hz concert-pitch. C<c'> is also known as the central
+c. More examples:
+
+       'a      % 110
+       a       % 220
+       a'      % 440
+       a''     % 880
+
+another example:
+
+       'as4.*2/3
+
+This is an A flat, (just below 110 Hz concert-pitch). The C<*2/3>
+signifies that this note is part of a triplet (3 in stead of 2). The
+duration is one and a half quaver (C<4.>) times 2/3. 
+
+The default language for notenames is defined to be dutch,
+
+       % double sharp
+       cisis disis eisis fisis gisis aisis bisis
+       % sharps
+       cis dis eis fis gis ais bis
+       % naturals
+       c d e f g a b 
+       % flats
+       ces des es fes ges as bes
+       % double flats
+       ceses deses eses feses geses ases beses
+
+The standard notenames also have uppercase versions, which octavate
+down:
+
+       a       % 220 concert-pitch
+       A       % 110
+       'A      % 55
+       A'      % 220
+       Cisis
+
+The rest is named 
+
+       r
+
+These notenames along with duration are enough material to construct
+simple melodies:
+
+       c4 c4 g4 g4 a4 a4 g2
+       f4 f4 e4 e4 d4 d4 c2
+
+Music is able to express more. generally speaking, the other
+'features' are either connected between notes (slurs, beams: spanning
+requests) or attached to notes (eg. accents). The former are
+implemented as START and STOP stop features and then attached to the note.
+
+       []      START/STOP a beam
+       ()      START/STOP a slur
+
+
+example: 
+
+       [c8 () d8 () e8 ]
+
+Please note that these two characters do I<not> necessarrily nest, eg:
+
+       [c8 e8(] [)g8 c'8]
+
+
+Symbols which can be put at either side of a staff are entered as follows:
+
+       a-^     % marcato, direction: default
+       a^-     % portato, direction: above note
+       a_.     % staccato, direction: below note
+       a^\script { "symbolindex"  . . . } % see script.ini for details.
+
+Dynamics can be put after the notename:
+
+       a4 \dynamic { 0 } % 0 = fff, 7 = ppp
+
+Mudela defines the following dynamic identifiers:
+
+       ppp pp p mp mf df ff fff        % df iso f, f is a notename.
+
+The general form of a note is:
+
+       post-requests de-octavate notename octavate duration pre-requests 
+
+Notenames are just identifiers, and can be declared for any
+language appropriate (see F<dutch.ini>). 
+
+=head2 Defaults
+
+If omit the duration of a, a default value is substituted. For this
+default value, there are two modes:
+
+=over 4
+
+=item 1
+
+Use the last duration explicitly entered
+
+=item 2
+
+Use the explicitly set "default duration"
+
+=back
+
+Thus the following inputs are  equivalent
+
+       c4 c4 c16 c16 c16 s16 c4 c16
+
+       \duration { "last" }
+       c4 c c16 c c c c4 c16
+
+       \duration { 4 }
+       c c c16 c16 c16 c16 c c16
+
+       \duration { 16 }
+       c4 c4 c c c c c4 
+
+If you are typing music which does not lie in the "small" and "large"
+octave, you can prevent having to type C<'> all the time by using the
+C<\octave> command: These two notes have the same pitch.
+
+       c''     \octave{2} c
+
+By default the setting of C<\octave> is 0.
+
+=head2 Lyrics
+
+Lyrics in Mudela resemble Simple mudela a lot, with notes substituted
+by text. 
+
+All syllables are entered separately, separated by whitespace 
+
+       Twin-4 kle4 twin-4 kle4 ... 
+
+Two syllables or words that compose a single
+duration entry are bound together using an underscore 
+
+       He_could4 not4
+
+=head2  Music direction
+
+Mudela reads left to right, but LilyPond can stack voices and
+Voice_elements which are produced in two directions: horizontal
+(voice like) and vertical (chord like)
+
+You can start horizontal music by enclosing a sequence of notes with { and }
+
+       { c c g g a a g2 }      % twinkle twinkle
+
+You can start vertical music (a "chord") by enclosing a sequence of
+notes with < and >. Example:
+
+       <a cis e'>      % a-major chord
+
+You can also put vertical music inside horizontal music:
+
+       { c < c e > <c e g> <c e g c'> }        % 4 increasing chords
+
+And vice versa
+
+       < \multivoice
+         {c c g g a a g2}              
+         {r2  r2  c c g g a a g2} >    % a canon
+
+The duration of a chord equals the union of the durations of each of
+its elements.  The C<\multivoice> is a construct which is explained
+below.
+
+=head2 Rhythms
+
+Rhythms in Mudela are entered identical to Simple mudela.
+The melodic part of the information is ignored.
+
+=head1 STRUCTURE
+
+In concrete, a piece of Mudela has the following structure:
+
+       % declare pieces of music:
+       melody = \music{ <simple mudela> }
+       accompany = \music{ <simple mudela> }
+
+       % instantiate (=create tex, midi output) the score:
+       \score{ 
+               \staff{ melody }
+               \staff{ accompany }
+               \commands{ <score global commands> }
+               \midi{ <midi definitions> }
+               \paper{ <paper and layout definitions }
+       }
+
+=head2 Examples
+
+Examples are included with the LilyPond distribution. For the sake of
+maintenance no long examples are included in this document.
+
+
+=head2 Requests
+
+=head2 Voice
+
+=head2 Voice_element
+
+=head2 Voice groups
+
+=head2 Other
+
+LilyPond first reads F<symbol.ini>, which contains declarations crucial
+to proper operation of LilyPond (symbol tables, note names).
+
+=head1 HISTORY
+
+
+This language has a number of roots. First and foremost, LilyPond's
+predecessor mpp was the inspiration of simple Mudela.  Secondly, the
+hierarchical structure looks a lot like Rayce's (Rayce is a raytracer
+that I've written as a hobby project. ), which in turn owes a lot to
+POVRay.
+
+Now, we know, musictypesetting and raytracing do not necessarily
+require the same input format, and we know that a lot more ways exist
+to convert music to ASCII, but we did give this language some
+thoughts. As always suggestions are appreciated.
+
index 7673bb95c145ff3b55ad638bf4703efdf0d9b74c..0fae878df93f9a15acdfc9b7f046bca782fe364d 100644 (file)
 % (except for grace notes) are printed
 %
 %%1
-melodie = \music {  \clef\violin
+melodie = \music {  \clef\violin\octave{1}
        \key{bes}
        \meter{3/4}\duration{ 8 }
-       r pp < [ d `a-| > f-| < d `a-| > f-| < d `a-| ] > |
+       r pp < [ d 'a-| > f-| < d 'a-| > f-| < d 'a-| ] > |
 %%2
-       r < [ d `bes-| > f-| < d `bes-| > f-| < d `bes-| ] > |
+       r < [ d 'bes-| > f-| < d 'bes-| > f-| < d 'bes-| ] > |
 %%3
        \textstyle "italic"
-       r_"simile" < [ d `bes > e < d `bes > e < d `bes ] >
+       r_"simile" < [ d 'bes > e < d 'bes > e < d 'bes ] >
        \textstyle "roman" |
 %%4
-       r < [ `a cis > e < `a cis > e < `a cis ] > |
+       r < [ 'a cis > e < 'a cis > e < 'a cis ] > |
 %#%:|
 %%5
        [ a()bes a ]2/3  d'4. a |
@@ -167,146 +167,146 @@ begeleiding = \music {
        \key{bes}\meter{3/4}
        \clef\bass
        \duration{2}
-       `d r4 |
+       'd r4 |
 %%2
-       ``bes r4 |
+       ''bes r4 |
 
 %%3
-       ``g r4 |
+       ''g r4 |
 
 %%4
-       ``a r4 |
+       ''a r4 |
 %#%:|
 %%5
 \duration{ 8 }
-       < \multivoice { \stem{ 1 } [ `f `a d `a d `a ] }
-       { \stem{ -1 } `d2 r4 } > |
+       < \multivoice { \stem{ 1 } [ 'f 'a d 'a d 'a ] }
+       { \stem{ -1 } 'd2 r4 } > |
 %%6
-       < \multivoice { \stem{ 1 } [ `d `e `g `e `g `e ] }
-       { \stem{ -1 } ``bes2 r4 } > |
+       < \multivoice { \stem{ 1 } [ 'd 'e 'g 'e 'g 'e ] }
+       { \stem{ -1 } ''bes2 r4 } > |
 %%7 
-       < \multivoice { \stem{ 1 } [ `cis `e `g `e `g e ] }
-       { \stem{ -1 } ``a2 r4 } > |
+       < \multivoice { \stem{ 1 } [ 'cis 'e 'g 'e 'g e ] }
+       { \stem{ -1 } ''a2 r4 } > |
  %%8
-       < \multivoice { \stem{ 1 } [ `d `a d `a d `a ] }
-       { \stem{ -1 } `d2 r4 } > |
+       < \multivoice { \stem{ 1 } [ 'd 'a d 'a d 'a ] }
+       { \stem{ -1 } 'd2 r4 } > |
 %%9
-       [ `a e g e g e ] |
+       [ 'a e g e g e ] |
 %%10
-       [ `d `a d `a d `a ] |
+       [ 'd 'a d 'a d 'a ] |
 %%11
-       < \multivoice { \stem{ 1 } [ `f `a d `a d `a ] }
-       { \stem{ -1 } `d2 r4 } > |
+       < \multivoice { \stem{ 1 } [ 'f 'a d 'a d 'a ] }
+       { \stem{ -1 } 'd2 r4 } > |
 %%12 == 6
-       < \multivoice { \stem{ 1 } [ `d `e `g `e `g `e ] }
-       { \stem{ -1 } ``bes2 r4 } > |
+       < \multivoice { \stem{ 1 } [ 'd 'e 'g 'e 'g 'e ] }
+       { \stem{ -1 } ''bes2 r4 } > |
 %13
-       < \multivoice { [ `e `g `bes `g `bes `g ] }
-       { \stem{ -1 } `c2 r4 } > |
+       < \multivoice { [ 'e 'g 'bes 'g 'bes 'g ] }
+       { \stem{ -1 } 'c2 r4 } > |
 %%14
-       < \multivoice { \stem{ 1 } [ `a c f c f c ] }
-       { \stem{ -1 } `f2 r4 } > |
+       < \multivoice { \stem{ 1 } [ 'a c f c f c ] }
+       { \stem{ -1 } 'f2 r4 } > |
 %%15
-       [ `c `g `bes `g `bes `g ] |
+       [ 'c 'g 'bes 'g 'bes 'g ] |
 %%16
-       [ ``f `c `f `c `f `c ] |
+       [ ''f 'c 'f 'c 'f 'c ] |
 %%17
-       < \multivoice { \stem{ 1 } [ ``a `e `g `e `g `e ] }
-       { \stem{ -1 } ``a2 r4 } > |
+       < \multivoice { \stem{ 1 } [ ''a 'e 'g 'e 'g 'e ] }
+       { \stem{ -1 } ''a2 r4 } > |
 %%18
-       < \multivoice { \stem{ 1 } [ `d `a d `a d `a ] }
-       { \stem{ -1 } `d2 r4 } > |
+       < \multivoice { \stem{ 1 } [ 'd 'a d 'a d 'a ] }
+       { \stem{ -1 } 'd2 r4 } > |
 %%19
-       < \multivoice { \stem{ 1 } [ ``bes `f `bes `f `bes `f ] }
-       { \stem{ -1 } ``bes2 r4 } > |
+       < \multivoice { \stem{ 1 } [ ''bes 'f 'bes 'f 'bes 'f ] }
+       { \stem{ -1 } ''bes2 r4 } > |
 %%20
-       < \multivoice { \stem{ 1 } [ ``f `c `f `c `f `c ] }
-       { \stem{ -1 } ``f2 r4 } > |
+       < \multivoice { \stem{ 1 } [ ''f 'c 'f 'c 'f 'c ] }
+       { \stem{ -1 } ''f2 r4 } > |
 %%21
-       < [ `e `c > `g c `g c `g ] |
+       < [ 'e 'c > 'g c 'g c 'g ] |
 %%22
-       [ `f `a c `a `f `c ] |
+       [ 'f 'a c 'a 'f 'c ] |
 %%23
-       < \multivoice { \stem{ 1 } [ ``a `e `g `e `g `e ] }
-       { \stem{ -1 } ``a2 r4 } > |
+       < \multivoice { \stem{ 1 } [ ''a 'e 'g 'e 'g 'e ] }
+       { \stem{ -1 } ''a2 r4 } > |
 %%24
-       < \multivoice { \stem{ 1 } [ `d `fis `a `fis `a `fis ] }
-       { \stem{ -1 } `d2 r4 } > |
+       < \multivoice { \stem{ 1 } [ 'd 'fis 'a 'fis 'a 'fis ] }
+       { \stem{ -1 } 'd2 r4 } > |
 %%25
-       < \multivoice { \stem{ 1 } [ ``g `d `b `d `b `d ] }
-       { \stem{ -1 } ``g2 r4 } > |
+       < \multivoice { \stem{ 1 } [ ''g 'd 'b 'd 'b 'd ] }
+       { \stem{ -1 } ''g2 r4 } > |
 %%26
-       < \multivoice { \stem{ 1 } [ `d `a d `a d `a ] }
-       { \stem{ -1 } `d2 r4 } > |
+       < \multivoice { \stem{ 1 } [ 'd 'a d 'a d 'a ] }
+       { \stem{ -1 } 'd2 r4 } > |
 %%27
-       < [ `cis ``a > `e `a `e `a `e ] |
+       < [ 'cis ''a > 'e 'a 'e 'a 'e ] |
 %%28
-       [ `d `a d `a d `a ] |
+       [ 'd 'a d 'a d 'a ] |
 %%29
-       [ `d `g `bes `g `bes `g ] |
+       [ 'd 'g 'bes 'g 'bes 'g ] |
 %#%\volta1
 %%30 
-       [ `d `fis `a `fis `a `fis ] |
+       [ 'd 'fis 'a 'fis 'a 'fis ] |
 %%31
-       [ ``a `e `a `e `a `e ] |
+       [ ''a 'e 'a 'e 'a 'e ] |
 %%32
-       [ `d `fis `a `fis `a `fis ] |
+       [ 'd 'fis 'a 'fis 'a 'fis ] |
 %%33
-       [ `d `g `b `g `b `g ] |
+       [ 'd 'g 'b 'g 'b 'g ] |
 %%34
-       [ `d `fis `a `fis `a `fis ] |
+       [ 'd 'fis 'a 'fis 'a 'fis ] |
 %%35
-       [ ``a `e `a `e `a `e ] |
+       [ ''a 'e 'a 'e 'a 'e ] |
 %%36
-       [ `d `fis `a `fis `a `fis ] |
+       [ 'd 'fis 'a 'fis 'a 'fis ] |
 %#%\volta2
 %#%:|
 %%37
-       [ ``a `e `g `e ``bes^> `e ] |
+       [ ''a 'e 'g 'e ''bes^> 'e ] |
 %%38
-       [ ``a < e cis `a > < e cis `a > < e cis `a > < e cis `a > < e cis `a ] >  |
+       [ ''a < e cis 'a > < e cis 'a > < e cis 'a > < e cis 'a > < e cis 'a ] >  |
 %%39
-       [ ``a `e `g `e ``bes^> `e ] |
+       [ ''a 'e 'g 'e ''bes^> 'e ] |
 %%40
-       [ ``a < e cis `a > < e cis `a > < e cis `a > < e cis `a > < e cis `a ] >  |
+       [ ''a < e cis 'a > < e cis 'a > < e cis 'a > < e cis 'a > < e cis 'a ] >  |
 %%41
-       [ ``ais `e `fis `e `fis `e ] |
+       [ ''ais 'e 'fis 'e 'fis 'e ] |
 %%42
-       < [ `d ``b > `fis `b `fis `b `fis ] |
+       < [ 'd ''b > 'fis 'b 'fis 'b 'fis ] |
 %%43
-       < [ `e ``b > `g `b `g `b `g ] |
+       < [ 'e ''b > 'g 'b 'g 'b 'g ] |
 %%44
-       < [ `d ``b > `fis `b `fis `b `fis ] |
+       < [ 'd ''b > 'fis 'b 'fis 'b 'fis ] |
 %%45
-       < \multivoice { \stem{ 1 } [ ``g `d `b `d `b `d ] }
-       { \stem{ -1 } ``g2 r4 } > |
+       < \multivoice { \stem{ 1 } [ ''g 'd 'b 'd 'b 'd ] }
+       { \stem{ -1 } ''g2 r4 } > |
 %%46
-       < \multivoice { \stem{ 1 } [ `d `a d `a d `a ] }
-       { \stem{ -1 } `d2 r4 } > |
+       < \multivoice { \stem{ 1 } [ 'd 'a d 'a d 'a ] }
+       { \stem{ -1 } 'd2 r4 } > |
 %%47
-       < [ `cis ``a > `e `a `e `a `e ] |
+       < [ 'cis ''a > 'e 'a 'e 'a 'e ] |
 %%48
-       [ `d `fis `a `fis `a `fis ] |
+       [ 'd 'fis 'a 'fis 'a 'fis ] |
 %%49
-       [ `d `a d `a d `a ] |
+       [ 'd 'a d 'a d 'a ] |
 %%50
-       [ ``g `e `g `e `g `e ] |
+       [ ''g 'e 'g 'e 'g 'e ] |
 %%51
-       [ ``a `e `g `e `g `e ] |
+       [ ''a 'e 'g 'e 'g 'e ] |
 %%52
-       [ ``d `d `fis `d `fis `d ] |
+       [ ''d 'd 'fis 'd 'fis 'd ] |
 %%53
-       [ `d `g `bes `g `bes `g ] |
+       [ 'd 'g 'bes 'g 'bes 'g ] |
 %%54
-       [ `d `fis `a `fis `a `fis ] |
+       [ 'd 'fis 'a 'fis 'a 'fis ] |
 %%55
-       [ ``a `e `g `e `g `e ] |
+       [ ''a 'e 'g 'e 'g 'e ] |
 %%56
-       [ ``d ``a `d ``a `d ``a ] |
+       [ ''d ''a 'd ''a 'd ''a ] |
 %%57
-       [ ``d ``a `d ``a `d ``a ]
+       [ ''d ''a 'd ''a 'd ''a ]
 %%58
-       < `d2.^\fermata ``d2. > |
+       < 'd2.^\fermata ''d2. > |
  }
 
 
@@ -447,7 +447,7 @@ tekstII= \lyrics {
        \music { tekstI }
        \music { tekstII }
        }
-% Setting up music ...lilypond: ../flower/include/cursor.inl:98: class Cursor<void *> Cursor<void *>::operator ++(int): Assertion `pointer_' failed.
+% Setting up music ...lilypond: ../flower/include/cursor.inl:98: class Cursor<void *> Cursor<void *>::operator ++(int): Assertion 'pointer_' failed.
 %IOT trap/Abort
 % als geen music in staff
        \staff {