From: Han-Wen Nienhuys Date: Mon, 5 Jul 1999 10:56:28 +0000 (+0200) Subject: release: 1.1.53 X-Git-Tag: release/1.1.53 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=78ed9c22a8cbf56ff5390553e0a2854aa42cbbc5;p=lilypond.git release: 1.1.53 --- diff --git a/ANNOUNCE-1.2 b/ANNOUNCE-1.2 index 2dc95271e8..2ff73be073 100644 --- a/ANNOUNCE-1.2 +++ b/ANNOUNCE-1.2 @@ -1,3 +1,5 @@ +-*- text -*- + [DRAFT] Keywords: midi notation music typesetting gnu font engraving @@ -50,9 +52,9 @@ WHAT'S NEW? * --safe option for the paranoid -* Exact spacing for text (eg. Lyrics) +* More elegant spacing. Text is spaced exactly. -* mutopia archive is now a separate effort +* The Mutopia archive is now a separate effort * lots of bugfixes diff --git a/AUTHORS.txt b/AUTHORS.txt index 0ba17b7a86..116662589a 100644 --- a/AUTHORS.txt +++ b/AUTHORS.txt @@ -1,549 +1,53 @@ -x T ascii -x res 240 24 40 -x init -p1 -x font 3 B -f3 -s10 -V400 -H240 -tAUTHORS -wh24 -t- -wh24 -twho -wh24 -tdid -wh24 -twhat -wh24 -ton -wh24 -tGNU -wh24 -tLilyPond? -n40 0 -V520 -H0 -tContents -n40 0 -V2560 -H1440 -n40 0 -V2640 -p2 -x font 1 R -f1 -s10 -V160 -H696 -t-2- -h672 -n40 0 -V280 -H0 -tThis -wh48 -tfile -wh48 -tlists -wh48 -tauthors -wh48 -tof -wh48 -tGNU -wh48 -tLilyPond, -wh24 -tand -wh24 -twhat -wh24 -tthey -n40 0 -V320 -H0 -twrote. -wh48 -tThis -wh24 -tlist -wh24 -tis -wh24 -talphabetically -wh24 -tordered. -n40 0 -V440 -H0 -to -h96 -tTom -wh24 -tCato -wh24 -tAmundsen -wh24 -t, -wh48 -tcembalo-par -Chy -h24 -n40 0 -V480 -H120 -ttita -wh24 -tin -wh24 -tmudela, -wh24 -taccordion -wh24 -tsymbols, -wh24 -tsome -wh24 -tmudela-book.py -n40 0 -V560 -H0 -to -h96 -tMats -wh288 -tBengtsson -wh288 -t, -n40 0 -V600 -H120 -thttp://www.s3.kth.se/~matsb/ -wh24 -tlots -wh48 -tof -wh48 -ttesting, -wh48 -tfixes, -n40 0 -V640 -H120 -tgeneral -wh24 -tcomments -wh24 -tand -wh24 -tcontributions. -n40 0 -V720 -H0 -to -h96 -tEric -wh24 -tBullinger -wh24 -t, -wh24 -taccidental -wh24 -ttrans -Chy -h24 -n40 0 -V760 -H120 -tposition. -n40 0 -V840 -H0 -to -h96 -tJan -wh48 -tArne -wh48 -tFagertun -wh48 -t, -n40 0 -V880 -H120 -tTeX -wh24 -ttitling -wh24 -tand -wh24 -tlytodvi.sh -n40 0 -V960 -H0 -to -h96 -tAnthony -wh24 -tFok -wh24 -t, -wh24 -tdebian -wh24 -tpackage: -wh24 -tdebian/* -n40 0 -V1040 -H0 -to -h96 -tBjoern -wh48 -tJacke -wh48 -t -wh48 -tgerman -wh72 -tglossary -n40 0 -V1080 -H120 -tstuff. -n40 0 -V1160 -H0 -to -h96 -tNeil -wh24 -tJerram -wh24 -t. -wh48 -tparts -wh24 -tof -wh24 -tDocumenta -Chy -h24 -n40 0 -V1200 -H120 -ttion/Vocab* -n40 0 -V1280 -H0 -to -h96 -tDonald -wh96 -tErvin -wh96 -tKnuth, -wh120 -thttp://www-cs-staff.stan -Chy -h24 -n40 0 -V1320 -H120 -tford.edu/~knuth/ -wh48 -tmf/ital-*.mf -wh48 -t(these -wh48 -twere -wh24 -ttaken -wh24 -tfrom -n40 0 -V1360 -H120 -tthe -wh24 -tCM -wh24 -tfonts) -n40 0 -V1440 -H0 -to -h96 -tMichael -wh48 -tKrause -wh72 -t, -wh72 -tbreathing -n40 0 -V1480 -H120 -tsigns -n40 0 -V1560 -H0 -to -h96 -tWerner -wh48 -tLemberg -wh24 -t, -wh24 -tmisc -n40 0 -V1600 -H120 -tbugfixes, -wh24 -tsome -wh24 -tBeam -wh24 -tand -wh24 -tStem -wh24 -tcode. -n40 0 -V1680 -H0 -to -h96 -tDavid -wh24 -tR. -wh24 -tLinn -wh24 -t, -wh48 -tMailing -wh48 -tlist -n40 0 -V1720 -H120 -tmaintenance. -n40 0 -V1800 -H0 -to -h96 -tAdrian -wh48 -tMariano -wh48 -t<> -wh48 -tReference -wh48 -tmanual, -wh24 -ttutorial -wh24 -tfixes, -n40 0 -V1840 -H120 -tglossary. -n40 0 -V1920 -H0 -to -h96 -tHan-Wen -wh264 -tNienhuys -wh264 -t, -n40 0 -V1960 -H120 -thttp://www.cs.uu.nl/~hanwen/ -wh72 -tMain -wh48 -tauthor -wh48 -t(initials: -n40 0 -V2000 -H120 -tHWN). -n40 0 -V2080 -H0 -to -h96 -tJan -wh240 -tNieuwenhuizen -wh264 -t, -n40 0 -V2120 -H120 -thttp://www.xs4all.nl/~jantien/ -wh48 -tMain -wh48 -tauthor -wh24 -t(initials: -n40 0 -V2160 -H120 -tJCN). -n40 0 -V2240 -H0 -to -h96 -tAlexandre -wh48 -tOliva -wh48 -t, -wh72 -thttp://sun -Chy -h24 -n40 0 -V2280 -H120 -tsite.unicamp.br/~oliva/ -wh24 -ttesting -n40 0 -V2360 -H0 -to -h96 -tFranc,ois -wh48 -tPinard -wh48 -t, -wh48 -tparts -wh24 -tof -n40 0 -V2400 -H120 -tDocumentation/Vocab*, -wh72 -tstarted -wh96 -tinternationalization -n40 0 -V2560 -H1440 -n40 0 -V2640 -p3 -x font 1 R -f1 -s10 -V160 -H696 -t-3- -h672 -n40 0 -V280 -H120 -tstuff -n40 0 -V360 -H0 -to -h96 -tJeffrey -wh24 -tB. -wh24 -tReed -wh24 -t, -wh24 -tWindows-NT -wh24 -tsup -Chy -h24 -n40 0 -V400 -H120 -tport. -n40 0 -V480 -H0 -to -h96 -tShay -wh24 -tRojanski -wh24 -tSome -wh24 -tmudela -wh24 -tsource. -n40 0 -V560 -H0 -tYour -wh24 -tname -wh24 -tcould -wh24 -tbe -wh24 -there! -wh24 -tIf -wh24 -tyou -wh24 -twant -wh24 -tto -wh48 -tfix -wh48 -tsomething, -wh48 -tdo -n40 0 -V600 -H0 -tit, -wh24 -tand -wh24 -tsend -wh24 -tus -wh24 -ta -wh24 -tpatch! -n40 0 -V2560 -H1440 -n40 0 -x trailer -V2640 -x stop + +TITLE INFORMATION: AUTHORS - who did what on GNU LilyPond? + +Contents + +This file lists authors of GNU LilyPond, and what they wrote. This +list is alphabetically ordered. + +o Tom Cato Amundsen , + cembalo-partita in mudela, accordion symbols, some mudela-book.py +o Mats Bengtsson , + http://www.s3.kth.se/~matsb/ + lots of testing, fixes, general comments and contributions. +o Eric Bullinger , + accidental transposition. +o Jan Arne Fagertun , + TeX titling and lytodvi.sh +o Anthony Fok , + debian package: debian/* +o Bjoern Jacke + german glossary stuff. +o Neil Jerram . + parts of Documentation/Vocab* +o Donald Ervin Knuth, http://www-cs-staff.stanford.edu/~knuth/ + mf/ital-*.mf (these were taken from the CM fonts) +o Michael Krause , + breathing signs +o Werner Lemberg , + misc bugfixes, some Beam and Stem code. +o David R. Linn , + Mailing list maintenance. +o Adrian Mariano <> + Reference manual, tutorial fixes, glossary. +o Han-Wen Nienhuys , + http://www.cs.uu.nl/~hanwen/ + Main author (initials: HWN). +o Jan Nieuwenhuizen , + http://www.xs4all.nl/~jantien/ + Main author (initials: JCN). +o Alexandre Oliva , + http://sunsite.unicamp.br/~oliva/ + testing +o Franc,ois Pinard , + parts of Documentation/Vocab*, started internationalization stuff +o Glen Prideaux , + minor bug fix to script used to generate doc++ documentation +o Jeffrey B. Reed , + Windows-NT support. +o Shay Rojanski + Some mudela source. + +Your name could be here! If you want to fix something, do it, and send +us a patch! diff --git a/Documentation/man/out/lilypond.1 b/Documentation/man/out/lilypond.1 index 036db66e6e..dad5070306 100644 --- a/Documentation/man/out/lilypond.1 +++ b/Documentation/man/out/lilypond.1 @@ -107,7 +107,7 @@ Send a description of the LilyPond version you use .IP o Send a description of the bug itself\&. .IP o -Send it to bug-gnu-music@gnu\&.org; you don\'t have to be subscribed +Send it to bug-gnu-music@gnu\&.org ; you don\'t have to be subscribed to this mailinglist\&. .PP .SH "FILES" @@ -154,21 +154,21 @@ for information about mirrors\&. For programs which are part of the GNU music project, the following mailing list have been setup: .PP -.IP "info-gnu-music@gnu\&.org" +.IP "info-gnu-music@gnu\&.org " For information on the GNU Music project, to subscribe: send mail with -subject "subscribe" to info-gnu-music-request@gnu\&.org -.IP "help-gnu-music@gnu\&.org" +subject "subscribe" to info-gnu-music-request@gnu\&.org +.IP "help-gnu-music@gnu\&.org " For help with programs from the GNU music project\&. To subscribe: send -mail with subject "subscribe" to help-gnu-music-request@gnu\&.org -.IP "bug-gnu-music@gnu\&.org" +mail with subject "subscribe" to help-gnu-music-request@gnu\&.org +.IP "bug-gnu-music@gnu\&.org " If you have bugreports, you should send them to this list\&. If you want to read all bugreports, you should subscribe to this list\&. To subscribe: send mail with subject "subscribe" to -bug-gnu-music-request@gnu\&.org -.IP "gnu-music-discuss@gnu\&.org" +bug-gnu-music-request@gnu\&.org +.IP "gnu-music-discuss@gnu\&.org " For discussions concerning the GNU Music project, to subscribe: send mail with subject "subscribe" to -gnu-music-discuss-request@gnu\&.org +gnu-music-discuss-request@gnu\&.org .PP Announces of new versions will be sent to info-gnu-music and gnu-music-discuss\&. diff --git a/Documentation/man/out/ly2dvi.1 b/Documentation/man/out/ly2dvi.1 index 8ef4efaf72..dc275b5044 100644 --- a/Documentation/man/out/ly2dvi.1 +++ b/Documentation/man/out/ly2dvi.1 @@ -233,7 +233,7 @@ Send a description of the LilyPond and ly2dvi version you use\&. .IP o Send a description of the bug itself\&. .IP o -Send it to bug-gnu-music@gnu\&.org (you don\'t have to subscribe +Send it to bug-gnu-music@gnu\&.org (you don\'t have to subscribe to this mailinglist)\&. .PP .SH "Remarks" diff --git a/Documentation/relative-octaves.yo b/Documentation/relative-octaves.yo index a1c21cfadb..41a97dd997 100644 --- a/Documentation/relative-octaves.yo +++ b/Documentation/relative-octaves.yo @@ -37,27 +37,33 @@ verb( ) the last c being an octave higher than the first. If you have to -enter an interval that is greater than a fourth, you must specify +enter an interval that is greater than a fifth, you must specify whether the pitch goes up, using post-quotes: verb( c c' % octave up - c g' % fourth up + c g' % fifth up ) or down, using pre-quotes: verb( c c, % octave down - c f, % fourth down + c f, % fifth down ) nsect(CONVERTING) +COMMENT(Old? don't understand -- jcn To convert a piece of music from the old absolute-octave notation to -relative octaves, lilypond provides the bf(-Q, --find-fourths) feature -to locate all big intervals in your music (sorry, fully automated convert -is too complex). +) +To convert a piece of music from absolute-octave notation to +relative octaves, lilypond provides the bf(-Q, --find-old-relative) +COMMENT( +urg, name was changed to 'old-relative'? It simply helps convert +from absolute to relative, ie handy for mi2mu output? +) +feature to locate all big intervals in your music. First, edit the .ly file, add "\relative c" to all melodic chunks: @@ -66,18 +72,18 @@ verb( ) and remove all "\octave " commands. See the example file -file(input/test/find-fourths.ly). +file(input/test/find-fifths.ly). -Use lily to find the fourths +Use lily to find the fifths: verb( - lilypond -Q find-fourths.ly 2>&1 | tee fourths + lilypond -Q find-fifths.ly 2>&1 | tee fifths ... - find-fourths.ly:3:18: warning: Interval greater than fourth, relative: g': + find-fifths.ly:3:18: warning: Interval greater than fourth, relative: g': c d c f c g c b, c g, c f, c c'' c - find-fourths.ly:3:20: warning: Interval greater than fourth, relative: c,: + find-fifths.ly:3:20: warning: Interval greater than fourth, relative: c,: c d c f c g c b, c g, c f, c c'' c ) diff --git a/Documentation/tex/lilypond-regtest.doc b/Documentation/tex/lilypond-regtest.doc index 5ff667defe..4ba4489be8 100644 --- a/Documentation/tex/lilypond-regtest.doc +++ b/Documentation/tex/lilypond-regtest.doc @@ -49,11 +49,19 @@ have beams, notes, chords, stems etc. within a \verb|\grace| section. Slurs that start within a grace section, but aren't ended are attached to the next normal note. Grace notes have zero duration + + \mudelafile{grace.ly} \section{Beams, slurs and other spanners} +Beaming is generated automatically. Beams may cross bar lines. In that +case, line breaks are forbidden. Yet clef and key signatures are +hidden just as with breakable bar lines. + +\mudelafile{beaming.ly} + %Beams should not interfere with various items on the staff (amongst %others repeat signs) % @@ -61,7 +69,7 @@ attached to the next normal note. Grace notes have zero duration Beams can be typeset over fixed distance aligned staffs, beam beautification doesn't really work, but knees do. Beams should be -behave well, whereever the switching point is. +behave well, wherever the switching point is. \mudelafile{beam-interstaff.ly} @@ -92,7 +100,7 @@ Unfolded behavior: \mudelafile{repeat-unfold.ly} -Semi (un)folded behavior: +Semi (un)folded behavior. Voltas can start on non-barline moments. \mudelafile{repeat-semifold.ly} diff --git a/Documentation/tex/refman.yo b/Documentation/tex/refman.yo index b8aefcb0e8..8f0285e287 100644 --- a/Documentation/tex/refman.yo +++ b/Documentation/tex/refman.yo @@ -883,21 +883,6 @@ mudela(verbatim)(\score{ foo1 __ bar2. __ _4 baz1 __ } > }) -If you want to have hyphens centred between syllables (rather than attached -to the end of the first syllable) you can use the special code(--) lyric as -separate word between syllables. This will result in a hyphen whose length -varies depending on the space between syllables, and centred between the -syllables. For example: -mudela(verbatim)(\score{ - < \notes \transpose c'' {c d e c | c d e c | e f g'2 | - e'4 f g'2 \bar "|."; } - \context Lyrics \lyrics { - DOEXPAND(Fr\)`e4 -- re Ja -- que DOEXPAND(Fr\)`e -- re Ja -- que - Dor -- mez vous?2 Dor4 -- mez vous?2 } - > -}) - - sect(Time) @@ -1606,6 +1591,9 @@ above or below the clef instead of on the bar line. dit(code(barNumberScriptPadding)) Sets extra space between the bar number and the bar it labels. +dit(code(barSize)) Specify the height of the bar lines if it should be +different than the staff height. + dit(code(markHangOnClef)) Set to 1 to cause marks to appear by clefs instead of by bar lines. @@ -1624,6 +1612,9 @@ overridden, possibly many measures later. dit(code(staffLineLeading)) Specifies the distance (in points) between lines of the staff. +dit(code(numberOfStaffLines)) Specifies the number of staff lines. The +default is 5. + dit(code(postBreakPadding)) Extra space in points to be added after the clef, time signature and key signature on the staff. @@ -1952,8 +1943,6 @@ arithmetic_basicspace. The smallest space is the one following the shortest note in the measure. Typically arithmetic_basicspace is set to the width of a quarter note head. -dit(code(barsize)) Specify height of bars. This value may need to be -adjusted if you change the number of lines in the staff. dit(code(beam_dir_algorithm)) Specify algorithm for determining whether beams go up or down. It is real valued. If set to 2.0 then majority selection is used. If set to 3.0, then mean selection is diff --git a/Documentation/tex/refman.yo.orig b/Documentation/tex/refman.yo.orig deleted file mode 100644 index 719770e081..0000000000 --- a/Documentation/tex/refman.yo.orig +++ /dev/null @@ -1,2213 +0,0 @@ -mailto(gnu-music-discuss@gnu.org) -COMMENT(-*-text-*-) - -redef(var)(1)(whenlatex(latexcommand({\normalfont\scshape )ARG1+latexcommand(}))\ - whenhtml(sc(ARG1))) - - -redef(code)(1)(tt(ARG1)) - - -COMMENT( - - BUGS: - - Causes segfault: - - \score{ - \notes{ \context Voice { - \repeat fold 2 { a b c d } {} - } - } - } - - - restStyle=mensural doesn't seem to work (lots of characters not found - for rests.fly) - -TODO: - thread - paper size? - paper variables - the explanation of how lyrics mode parses words seems ridiculous. - Is there a simple way to explain this, or is the behavior - too complicated for a reasonable explanation? - accordion symbols - interstaff beams (beam-interstaff.ly) - interstaff slurs (see preludes-1.ly) -) - - -COMMENT( -This document contains Mudela fragments. You need at least -Yodl-1.30.18 to convert this to tex or html. -) - -htmlbodyopt(bgcolor)(white) -htmlcommand() - -latexlayoutcmds( -\setlength{\topmargin}{-0.25in} -\setlength{\textheight}{9in} -\setlength{\textwidth}{5.875in} -\setlength{\oddsidemargin}{0.25in} -\setlength{\evensidemargin}{0.25in} -\input mudela-book -) - -whentexinfo(notableofcontents()) - -article(Mudela 1.0.21 / LilyPond 1.1.49 Reference Manual) - (Adrian Mariano, Han-Wen Nienhuys and Jan Nieuwenhuizen) - (nop()PIPETHROUGH(date "+%B %d, %Y")()()nop()) - -COMMENT( - -* The [ ] look weird - -* paragraphs have too much space. - -) - - -latexcommand(\def\interexample{}) -latexcommand(\def\preexample{\par}) -latexcommand(\def\postexample{\par\medskip}) -latexcommand(\def\file#1{{code(#1)}}) -COMMENT( -latexcommand(\def\texttt#1{\tt #1}) -latexcommand(\def\textbf#1{\bf #1}) -) - -COMMENT(urg, texinfo include breaks) -whenhtml( -includefile(html-disclaimer.yo-urg) -) - -bf(This document is not up to date). All rendered examples of course -are current, but the rest probably isn't. Adjusting the tutorial was -considered more important than writing the reference manual. We -apologize for the inconvenience. For a complete and up-to-date -definition, see file(lily/parser.yy), file(lily/lexer.ll), and the -init files. - -This document describes the the GNU LilyPond input format, which is an -effective language for defining music. We call this language (rather -arrogantly) The Musical Definition Language or Mudela, for -short.footnote(If anybody comes up with a better name, we'd gladly - take this. Gourlay already uses Musical Description Language, - G-Sharp Score Definition Language. ISO standard 10743 defines a - Standard Music Description Language. We're not being original here.) - -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 Musical Definition Language (Mudela), has a logical structure, -making use of identifiers, that allows for flexible input, and -definition reuse. See the documentation file file(MANIFESTO), included -with the LilyPond sources for reasons and design considerations. - - -sect(Running LilyPond) - -When invoked with a filename that has no extension, LilyPond will try adding -a file(.fly) extension first, and a file(.ly) extension second. -If the filename ends with -file(.fly), LilyPond processes the file as music using -file(init.fly). In this case, LilyPond does something -like: -verb(\score { - \notes\relative c { - \input "yourfile.fly" - } - \paper{} - \midi{} -}) -If you invoke LilyPond with a file file(foo.)var(ext) that doesn't -have the file(.ly) extension then LilyPond will look for a file called -file(init.)var(ext) and process this file. The file -file(init.)var(ext) must contain the code(\maininput) keyword or LilyPond -will not read the user specified file. - -When LilyPond processes file(filename.ly) it will produce file(filename.tex) as -output. If file(filename.ly) contains a second code(\paper) keyword, then -LilyPond will produce file(filename-1.tex) as well. Subsequent code(\paper) -keywords will produces sequentially numbered file names. Several files can be -specified; they will each be processed independently. - -sect(Syntax) - -subsect(Basic Mudela) - -A Mudela file consists of keywords with arguments and identifier -assignments separated by spaces, tabs or newlines. Semicolons are -used by some keywords and are inconsistantly required in other -circumstances. A one line comment is introduced by a code(%) -character. Block comments are started by code(%{) and ended by -code(%}). They cannot be nested. - -Mudela supports several types: - -description( - -dit(integer) -Formed from an optional minus sign followed by digits. Arithmetic -operations cannot be done with integers, and integers cannot be mixed -with reals. - -dit(real) -Formed from an optional minus sign and a sequence of digits followed -by a emph(required) decimal point and an optional exponent such as -code(-1.2e3). Reals can be built up using the usual operations: -code(+), code(-), code(*), and code(/), with parentheses for grouping. - -dit(string) -Begins and ends with the code(") character. To include a code(") -character in a string write code(\"). Various other backslash -sequences have special interpretations as in the C language. A string -that contains no spaces can be written without the quotes. See -Section ref(modes) for details on unquoted strings; their -interpretation varies depending on the situation. On the right side -of identifier assignments and within the code(\header) keyword, -strings can be concatenated using the code(+) character. - -dit(dimension) Consists of a real followed by one of the dimension -keywords: code(\mm), code(\pt), code(\in), or code(\cm). Dimensions -are converted immediately to a real which gives the dimension in -points, so they can be mixed with reals, but the result is no longer -of type dimension. The keywords that require a dimension -(code(\shape)). - -dit(pitch) -A pitch is a string which is the name of a pitch. Example: code(a). -The pitch names can be redefined with the code(\notenames) keyword. -See Section(notelang) for pitch names in different languages. Pitches -can only be specified inside note mode which is specified with -code(\notes). Therefore, keywords which require pitch arguments must -appear inside code(\notes). - -dit(music) -Music is a compound type: arbitrarily complicated expressions with a -hierarchical structure can be formed from simple building blocks. The -simplest expression of type music is a single note. A note is formed -from a pitch and an optional duration and must be specified within -code(\notes). See Section ref(notedesc) for details. More -complicated expressions of type music are formed by surrounding a -sequence of expressions of type music with braces code({) and code(}) -or with angle brackets code(<) and code(>). Items appearing in braces -will be treated as serial. Items in angle brackets will be -simultaneous. So for example code({ c e g }) represents an arpeggio -and code(< c e g >) represents a chord. These items can be nested any -way you like. This simple example shows how three chords can be -expressed in two different ways: -mudela(fragment,verbatim,center)( -\notes{ - c - - <{a b c'}{c' d' e'}{e' f' g'}> -}) - -) - - - -subsect(Identifiers) - -Identifiers allow names to be assigned to constants, music, or other -Mudela structures. To assign an identifier you use -var(name)=var(value) and to refer to an identifier, you preceed its -name with a backslash: code(\)var(name). It is legal to redefine an -identifier in terms of its old value: code(foo = \foo * 2.0). -Identifier assignments must appear at the top level in the Mudela -file. Note that semicolons are forbidden after assignments appearing -at the top level but they are obligatory after assignments appearing -elsewhere. (Semicolons are also forbidden after code(\property) assignments.) - -An identifier can be created with any string for its name, but you -will only be able to refer to identifiers whose names begin with a -letter and are entirely alphanumeric. It is also impossible to refer -to an identifier whose name is the same as the name of a keyword. The -following words are keywords: -verb(accepts duration midi relative textscript -alternative font mm remove time -bar grouping musicalpitch repeat times -cadenza header name scm translator -chordmodifiers in notenames scmfile transpose -chords include notes score type -clef key paper script version -cm keysignature partial shape -consists lyrics penalty skip -consistsend maininput property spanrequest -context mark pt tempo) - -The right hand side of an identifier assignment is parsed completely -when the assignment is made. It therefore must have any context -specified in the definition. For example, you must write -code(foo=\notes{a8 b c}) rather than code(foo={a8 b c}). Even though -the context is specified in the definition, you must refer to the -identifier inside the correct context: -verb(foo = \paper{ linewidth = 6.0\in; } -\score{ - \notes{ ... } - \paper{ \foo } -}) -If code(\foo) is used here without the surrounding code(\paper) then -an error will result. Note however that the following is acceptible -verb(foo = \notes { ... } -\score{ \foo }) -It is not necessary to specify code(\notes). - -Identifiers can be set equal to integers, reals, strings, music, -durations (specified with code(\duration)), note ornaments (specified -with code(\script), dynamics commands, or code(:)), note name tables -(specified with code(\notenames), translator definitions, the -code(\paper) block, the code(\midi) block or the code(\score) block. -When identifiers are used for translators, the code(\paper), -code(\midi), and code(\score) blocks, they may only be referred to as -the first item in a block. So code(\paper{\one \two}) is illegal -because the identifier code(\two) is not the first thing in the block. -Unlike other identifier definitions, translator identifier definitions -can only appear within code(\midi) or code(\paper) blocks. See -Section ref(translators) for more information. - - - -subsect(Modes) -label(modes) - -To simplify different aspects of music definition (entering the notes -and manipulating them) Mudela has three different input modes which -affect how unquoted strings are interpreted. -In each mode, words are identified on the input. If code("word") is -encountered, it is treated as a string. If code(\word) is -encountered it is treated as a keyword or as an identifier. The -behavior of the modes differs in two ways: different modes treat -unquoted words different, and different modes have different rules for -deciding what is a word. - -description( - -dit(Normal mode) -At the start of parsing, Mudela is in normal mode. -In normal mode, a word is an alphabetic character followed by -alphanumeric characters. If code(word) is encountered on the input it -is treated as a string. - -dit(Note mode) Note mode is introduced by the keyword -code(\notes). In Note mode, words can only contain alphabetic -characters. If code(word) is encountered, LilyPond first checks for a -notename of code(word). If no notename is found, then code(word) is -treated as a string. If you mistype a notename, the parser will most -likely complain that you should be in code(\lyrics) mode to do lyrics. - -dit(Chord mode) Chord mode is instroduced by the keyword code(\chords). -Very similar to Note mode. -COMMENT(I'm not sure how it differs) - -dit(Lyric mode) Lyrics mode is introduced by the keyword -code(\lyrics). This mode is has rules that make it easy to include -punctuation and diacritical marks in words. A word in Lyrics mode -begins with: an alphabetic character, code(_), -code(?), code(!), code(:), code('), -the control characters code(^A) through code(^F), code(^Q) through -code(^W), code(^Y), code(^^), any 8-bit character with ASCII code over -127, or a two character combination of a backslash followed by one -of code(`), code('), code(") or code(^). -Subsequent characters of a word can be any character that is not a -digit and not white space. One important consequence of this is that -a word can end with code(}), which may be confusing if you thought the -code(}) was going to terminate lyrics mode. Any code(_) characters -which appear in an unquoted word are converted to spaces, providing a -mechanism for introducing spaces into words without using quotes. -Quoted words can also be used in lyrics mode to specify words that -cannot be specified with the above rules. Here are some examples. -Not all of these words are printable by TeX(). -verb(a&@&@&TSI|{[ % a word -\'afoo} % a word -1THtrhortho % not a word because it starts with a digit -``Hello'' % not a word because it starts with ` -Leise DOEXPAND(Fl\)DOEXPAND("u\)ss{}teren meine Sapfe % 4 words -_ _ _ _ % 4 words, each one a space -)) - -It is possible to create words that break the rules by prefixing them with the -dollar sign code($). Regardless of the context, a word beginning with code($) -extends until the next white space character. Such words can contain numbers -(even in Note mode), or other forbidden characters. The dollar sign can be -used to create and access identifiers that could not otherwise be used. - -COMMENT( -These modes are of a lexical nature. Normal and Note mode largely -resemble each other, save the possibility of entering Reals, -meaning of code(_) and the resolution of words - -What's this about reals? When can you enter them or not enter them?) - - -sect(Note Description) -label(notedesc) - -subsect(Basic Note Specification) - -A note specification has the form -var(pitch)[var(octavespec)][code(!)][code(?)][var(duration)]. -The pitch of the note is specified by the note's name. - -LilyPond has predefined note names for various languages. The default -names are the Dutch note names. The notes are specified by the -letters code(c) through code(b), where code(c) is an octave below -middle C and the letters span the ocatave above that C. -In Dutch, a sharp is formed by adding -code(-is) to the end of a pitch name. A flat is formed by adding code(-es). -Double sharps and double flats are obtained by adding code(-isis) or -code(-eses). -Lily has predefined sets of notenames -for various nop(languages). See Section ref(notelang) for details. -Rests are specified with the note name code(r) or code(R). -There is also a note name code(s) which produces a nonprinting note of the -specified duration. - -The optional octave specification takes the form of a series of single -quote -code(') characters or a series of comma code(,) characters. Each -code(') raises the pitch by one octave; each code(,) lowers the pitch -by an octave. - -mudela(fragment,verbatim,center)( -c' d' e' f' g' a' b' c'' -) - -mudela(fragment,verbatim,center)( -cis' dis' eis' fis' gis' ais' bis' -) - -mudela(fragment,verbatim,center)( -ces' des' es' fes' ges' as' bes' -) - -mudela(fragment,verbatim,center)( -cisis' eisis' gisis' aisis' beses' -) - -mudela(fragment,verbatim,center)( -ceses' eses' geses' ases' beses' -) - -Whenever a C-sharp is desired, you must specify a C-sharp. LilyPond -will determine what accidentals to typeset depending on the key and -context. -A reminder accidental can be forced by -using the optional exclamation mark `code(!)' -on the pitch. -A cautionary accidental, i.e., an accidental within paranthesis -can be obtained using the optional question mark `code(?)' on the pitch. -mudela(fragment,verbatim,center)( -cis' d' e' cis' c'? d' e' c'! -) - - -Durations are entered as their reciprocal values -mudela(fragment,verbatim,center)( -a'1 a'2 a'4 a a'8 a a'16 a'32 a'64 -) -mudela(fragment,verbatim,center)( -r1 r2 r4 r8 r16 r32 -) - -If the duration is omitted then it is set equal to the previous -duration. If there is no previous duration, then a quarter note is -assumed. -The duration can be followed by a dot code(.) to obtain dotted note -lengths. -mudela(fragment,verbatim,center)( -a'4. b'4. -) - -Extra long notes can be obtained using the code(\breve) and -code(longa) durations: -mudela(fragment,verbatim,center)( -c'\breve gis'\longa -) - -In order to get triplets and other tuplets, you must use the -code(\times) keyword which multiplies the duration by a fraction. The -syntax is code(\times) var(fraction) var(music). The length of all of -the specified music will be multiplied by the fraction and the -fraction's denominator will be printed over the notes. The most -common tuplet is the triplet in which 3 notes have the length of 2, so -the notes are 2/3 their written length: -mudela(fragment,verbatim,center)( b'4 \times 2/3 {c'4 c' c'} d'4 d'4 ) -If you try to use code(\times) as the first thing in your music, you -may encounter the warning ``No one to print a tuplet start bracket''. -This happens because the Tuplet-engraver is in Voice and no Voice has -been created yet. You must explicitly specify the Voice context in -this situation -mudela(fragment,verbatim,center)( -\context Voice { \times 2/3 {c'4 d' e'}} -) - -A shorthand for code(\times) is to write code(*)var(fraction) after a -duration. This shorthand will not label triplets correctly, but -it is convenient for long rests. -For long rests with durations equal to an integer number of whole notes, -LilyPond produces output that indicates the duration of the rest. If you use -code(r) then one rest symbol will be printed and several measures left blank. -If you use code(R) then all of the measure will be filled with whole rests. -mudela(fragment,verbatim,center)( -r1 r1*3 R1*3 -) -If you set the code(Score.skipBars) property, then only one measure will be -printed; with code(R), a number indicating the length of the rest will be -displayed. -mudela(fragment,verbatim,center)( -\property Score.skipBars=1 -r1 r1*3 R1*3 -) -Even though the code(\times) command is not explicit, it is still -necessary to specify a code(Voice) context if the music begins with -rests lengthened using code(*). -Otherwise, the following will result: -mudela(fragment,verbatim,center)( -R1*3 c'1 d' -) - - -subsect(Automatic Beam Generation) -label(autobeam) - -By default, Lilypond will generate beams automatically. This feature can be -disabled by setting the code(Voice.beamAuto) property to 0. It can be -overridden for specific cases by specifying explicit beams as -described in Section ref(manualbeam). - -In order to decide how to generate beams, Lilypond uses a large number -of Voice properties, whose default values appear in -file(auto-beam-settings.ly). In general, beams can begin anywhere, -but their ending location is significant. Beams can end on a beat, or -at durations specified by the code(Voice.beamAutoEnd) property. To -end beams every quarter note, for example, you could use set -code(Voice.beamAutoEnd) equal to code("1/4"). To end beams every -three eighth notes you would set it to code("3/8"). The same syntax -can be used to specify beam starting points using code(Voice.beamAutoBegin). - -To allow different settings for different time signatures, these -property names can start with code(time)var(N)code(_)var(M) to -restrict the definition to var(N)code(/)code(M) time. So for example, -to specify beams ending only for 6/8 time you would use the property -code(Voice.time6_8beamAutoEnd). To allow different endings for notes -of different durations, the duration can be tacked onto the end of the -property. To specify beam endings for beams that contain 32nd notes, -you would use code(Voice.beamAutoEnd_32). - - -subsect(Note Spanners: Beams, Slurs and Ties) -label(manualbeam) - -A beam is specified by surrounding the beamed notes with brackets -code([) and code(]). -mudela(fragment,verbatim,center)( -[a'8 a'] [a'16 a' a' a'] -) -Some more elaborate constructions: -mudela(fragment,verbatim,center)( -[a'16 c'' ] -\times 2/3 { [e'8 f' g'] } -) - -Another type of spanner is the slur. Slurs connects chords and try to -avoid crossing stems. A slur is started with code(CHAR(40)) and stopped with -code(CHAR(41)). The starting code(CHAR(40)) appears to the right of the first note -in the slur. The terminal code(CHAR(41)) apppears to the left of the first -note in the slur. This makes it possible to put a note in slurs from -both sides: -mudela(fragment,verbatim,center)( -f'()g'()a' [a'8 b'(] a'4 g' )f' -) - -A tie connects two adjacent note heads of the same pitch. -When used with chords, it -connects all of the note heads whose pitches match. -Ties are indicated using the tilde symbol -code(~) by analogy with TeX()'s tie which connects words. -Note that if you try to tie together chords which have no common -pitches, then a warning message will appear and no tie will be created. -(Note that ties between different pitches can be enabled using the -property Voice.oldTieBehavior.) - -mudela(fragment,verbatim,center)( -e' ~ e' ~ -) - -It is possible to create beams and slurs that cross staffs by switching the -context: -mudela(fragment,verbatim,center)( -\context PianoStaff < -\context Staff=one \notes\relative c'{ - \stemup - [c8 c \translator Staff=two \stemup c c] - \translator Staff=one - d4( \translator Staff=two )a4 - } -\context Staff=two \notes{ \clef bass; s1} -> -) - - - -subsect(Note Ornaments) - -A variety of symbols can appear above and below notes to indicate -different characteristics of the performance. These symbols can be -added to a note with `var(note)code(-\)var(name)'. Numerous symbols -are defined in file(script.ly) and file(script.scm). Symbols can be -forced to appear above the note by writing -`var(note)code(^\)var(name)', and they can be forced to appear below -by writing `var(note)code(_\)var(name)'. Here is a chart showing -symbols above notes, with the name of the corresponding symbol -appearing underneath. - -mudela()( -\score{ - < \notes{ c''-\accent c''-\marcato c''-\staccatissimo f'-\fermata - c''-\stopped c''-\staccato c''-\tenuto c''-\upbow c''-\downbow - c''-\lheel c''-\rheel c''-\ltoe c''-\rtoe c''-\turn - c''-\open c''-\flageolet c''-\reverseturn - c''-\trill - c''-\prall c''-\mordent c''-\prallprall c''-\prallmordent - c''-\upprall c''-\downprall c''-\thumb c''-\segno c''-\wheel} - \context Lyrics \lyrics{ - accent__ marcato__ staccatissimo__ fermata stopped__ - staccato__ tenuto__ upbow downbow__ lheel__ rheel__ ltoe - rtoe__ turn__ open__ flageolet reverseturn__ trill__ prall__ - mordent prallprall__ prallmordent__ uprall__ downprall thumb - segno wheel} - > - \paper{ linewidth = 5.875\in; - indent = 0.0; } - } -) - -In addition, it is possible to place arbitrary strings of text or -TeX() above or below notes by using a string instead of an identifier: -`code(c^"text")'. Fingerings can be placed by simply using digits. -All of these note ornaments appear in the printed output but have no -effect on the MIDI rendering of the music. - -To save typing, a few common symbols can be abbreviated with -single characters: -mudela()( -\score{ \notes { - \property Voice.textStyle = typewriter - c''4-._"c-." s4 - c''4--_"c-{}-" s4 - c''4-+_"c-+" s4 - c''4-|_"c-|" s4 - c''4->_"c->" s4 - c''4-^_"c-\\^{ }" s4 } - \paper { linewidth = 12.\cm; }}) - -Dynamic marks are specified by using an identifier after a note without a dash: -code(c4 \ff). Note that this syntax is inconsistent with the syntax for other -types of ornaments. The available dynamic marks are: code(\pppppp), -code(\ppppp), code(\pppp), code(\ppp), code(\pp), code(\p), code(\mp), -code(\mf), code(\f), code(\ff), code(\fff), code(\ffff), code(\fffff), -code(\ffffff), code(\fp), code(\sf), code(\sff), code(\sp), code(\spp), -code(\sfz) and code(\rfz). - -A crescendo mark is started with code(\cr) and terminated with -code(\rc). A decrescendo mark is started with code(\decr) and -terminated with code(\rced). There are also shorthands for these -marks. A crescendo can be started with code(\<) and a decrescendo can -be started with code(\>). Either one can be terminated with code(\!). -Note that code(\!) must go before the last note of the dynamic mark whereas -code(\rc) and code(\rced) go after the last note. Because these marks are -bound to notes, if you want to get several marks during one note, you must use -spacer notes. -mudela(fragment,verbatim,center)( -c'' \< \! c'' d'' \decr e'' \rced -< f''1 {s4 \< \! s4 \> \! s2 } >) - - -COMMENT(Broken!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!) - -Tremolo marks can be printed by a note by adding code(:)[var(length)] -after the note. The length must be at least 8. A var(length) value -of 8 gives one line across the note stem. -If the length is omitted, -then the last value is used, or the value of the code(Abbrev) -property if there was no last value. To place tremolo marks in -between two notes, begin with code([:)var(length) and end with code(]). -The tremolo marks will appear instead of beams. Putting more than two -notes in such a construction will produce odd effects. - -[TREMOLO BEAMS TEMPORARILY OUT OF ORDER] - -COMMENT(mudela (fragment,verbatim,center)( -c'2:8 c':32 [:16 e'1 g'] [:8 e'4 f'] -)) - -COMMENT( -Is the last paragraph correct? Is it called "tremolo"? Why is -"abbreviation" used? (What is the unabreviated form?) - -COMMENT( -mudela (fragment,verbatim,center)( -c'4:32 [:16 c'8 d'8] -)) - -) - - -sect(Other Ways to Enter Pitches) - -subsect(Pitch Names in Other Languages) -label(notelang) - -The pitch names can be easily redefined using the code(\notenames) command. -Note name definitions have been provided in various languages. -Simply include the language specific init file. For example: -code(\include "english.ly"). The available language files and the names -they define are: - -verb( Note Names sharp flat -nederlands.ly c d e f g a bes b -is -es -english.ly c d e f g a bf b -s/-sharp -f/-flat -deutsch.ly c d e f g a b h -is -es -norsk.ly c d e f g a b h -iss/-is -ess/-es -svenska.ly c d e f g a b h -iss -ess -italiano.ly do re mi fa sol la sid si -d -b -catalan.ly do re mi fa sol la sid si -d/-s -b) - -subsect(Relative Pitch Specification) -label(relative) - -One very common error when entering music is to place notes in the wrong -octave. One way to avoid being confused by large numbers of octave changing -marks is to use -the code(\relative) keyword. -Music which appears within code(\relative) is -interpreted differently. The octave of a note is determined by making it as -close to the previous note as possible. The octave changing marks code(') and -code(,) can then be added to raise or lower this note by octaves. You have to -specify a starting pitch because the first note of a list has no predecessor. - -mudela(fragment,verbatim,center)( -\relative c'' { c d b c, d b c' d - b c,, d b } -) - -When the preceeding item is a chord, the first note of the chord is used to -determine the first note of the next chord. But other notes within the second -chord are determined by looking at the immediately preceeding note. - -mudela(fragment,verbatim,center)( -\relative c' { c - } -) - -The code(\relative) keyword can only appear in music, so there must be a -surrounding code(\notes) keyword which does not appear in the fragments shown -above. Also note that if the music passed to a code(\relative) keyword -contains a code(\transpose) keyword, the tranposed music will not be -processed in relative mode. An additional code(\relative) must be placed -inside the code(\transpose). If code(\relative) will be used several -times, or if it will be used in the same music with code(\transpose), -then you may get bizarre effects. This can be fixed by using an -explicit code(Staff) context. - - -subsect(Tranposition of Pitches) -label(transpose) - -Another way to modify the meaning of the note names is to use the -code(\transpose) keyword. This keyword allows you to transpose music. -To use transposition, specify the pitch that middle C should be tranposed to. -It is important to distinguish between enharmonic pitches as they can produce -different transpositions. To transpose up half a step, for example, either -code(\transpose cis') or code(\transpose des') will work. But the first -version will print sharps and the second version will print flats. -In this example, a scale in the key of E is transposed to F, or to E-sharp -with odd results. -mudela(fragment,verbatim,center)( -\relative c' { \key e; - e fis gis a b cis dis e } -) -mudela(fragment,verbatim,center)( -\transpose des' \relative c' { \key e; - e fis gis a b cis dis e } -) -mudela(fragment,verbatim,center)( -\transpose cis' \relative c' { \key e; - e fis gis a b cis dis e } -) -If you want to use both code(\transpose) and code(\relative), then you must use -code(\transpose) first. Any code(\relative) keywords that are outside the -code(\transpose) have no effect on notes that appear inside the -code(\transpose). As with code(\relative), using code(\transpose) -repeatedly can cause bizarre effects. An explicit code(Staff) context -will eliminate the problems. - -sect(Chords) - -Chords can be entered either by name or by listing the notes in angle brackets. -Chords can be displayed either as notes or by name. To enter chords by name, -either place them inside the code(\chords) keyword, or use -code(\notes) and surround them with -code(@) characters. -Chord names have the form -var(tonic)[var(duration)][code(-)var(modifier)][code(^)var(subtractions)][code(/)var(inversion)] -The var(tonic) should be the tonic note of the chord, and the var(duration) is -the chord duration in the usual notation. There are two kinds of modifiers. -One type is chord additions, which are obtained by listing intervals separated -by dots. An interval is written by its number with an optional code(+) or -code(-) to indicate raising or lowering by half a step. A chord additions has -two effects: it adds the specified interval and all lower odd numbered -intervals to the chord, and it may lower or raise the specified interval. -Intervals can be separated by a dot (code(.)) if you need to list -several unmodified intervals. -Repeating a code(-) character will remove a half step from the preceeding -interval. -mudela(fragment,verbatim,center)( -\transpose c''{ -\chords{ - c1 c-3- c-7 c-8 c-9 - c-9-5+7+ c-3-5- c-4.6.8 -}}) -The second type of modifier that may appear after the code(-) is -a named modifier. -Named modifiers are listed in the file file(chord-modifiers.ly). The -available modifiers are code(m) and code(min) which lower -the 3rd half a step, code(aug) which raises the 5th, code(dim) which lowers -the 5th, code(maj) which adds a raised 7th, and code(sus) which replaces the -5th with a 4th. -mudela(fragment,verbatim,center)( -\transpose c''{ -\chords{ - c1-m c-min c-maj c-aug c-dim c-sus -}}) - -Chord subtractions are used to eliminate notes from a chord. The notes to be -subtracted are listed after a code(^) character, separated by dots. -mudela(fragment,verbatim,center)( -\transpose c''{ -\chords{ - c1^3 c-7^5.3 c-8^7 -}}) - -Chord inversions can be specified by appending code(/) and the name of a -single note to a chord. This has the effect of lowering the specified note by -an octave so it becomes the lowest note in the chord. If the -specified note is not in the chord then a warning will be printed. -mudela(fragment,verbatim,center)( -\transpose c'''{ - @c1@ @c/e@ @c/g@ @c-7/e@ -}) -Throughout these examples, chords have been shifted around the staff -using code(\transpose). The code(\relative) keyword has odd effects -when combined with named chords. - -For displaying printed chord names, use the code(ChordNames) context. -The chords may be entered either using the notation described above, -or directly using angle brackets. -mudela(fragment,verbatim)( -< - \context ChordNames { \chords{ a b c} \notes{ < d f g > < e g b > } } - \context Staff \notes{ a b c' d' e' } -> -) -Lilypond examines chords specified as lists of notes to determine a -name to give the chord. By default, LilyPond will not try to identify -chord inversions: -mudela(fragment,verbatim,center)( -< - \context ChordNames { - \notes{ < e' g' c'' > } } - \context Staff \notes{ c' } ->) -If you want inversions to be recognized, you must set the property -code(Score.chordInversion): -mudela(fragment,verbatim,center)( -< - \property Score.chordInversion = 1 - \context ChordNames { - \notes{ < e' g' c'' > } } - \context Staff \notes{ c' } ->) - - - -sect(Lyrics) - -Lyrics are entered like notes, with pitches replaced -by text. For example code(Twin-4 kle4 twin-4 kle4) enters four -syllables, each with quarter note duration. Note that the hyphen has -no special meaning for lyrics, and does not introduce special symbols. -See Section ref(modes) for a description of what is interpreted as a lyric. - -In order to instruct LilyPond to write lyrics underneath the -staff, you must enter the lyrics context with code(\context Lyrics). -Lyrics should be entered in lyrics mode which is entered with code(\lyrics). - -Spaces can be introduced into a lyric either by using quotes (code(")) -or by using an underscore without quotes: code(He_could4 not4). All -unquoted underscores are converted to spaces. Here is a full example: -mudela(verbatim)(\score{ - < \notes \transpose c'' {c d e c | c d e c | e f g'2 | - e'4 f g'2 \bar "|."; } - \context Lyrics \lyrics { - DOEXPAND(Fr\)`e-4 re Ja- que DOEXPAND(Fr\)`e- re Ja- que - Dor- mez vous?2 Dor-4 mez vous?2 } - > -}) - -COMMENT( -URG - Fr\`e-4 re Ja- que - Fr\`e- re Ja- que -Why does this warrant an URG? -) - -When one word is attached to many notes, you may -want a continuous line after the lyric to show this. To achieve -this effect, add a code(__) lyric as a separate word -after the lyric to be extended. -This will create -an extender, a line that extends over the entire duration of -the lyric. This line will run all the way to the start of the next -lyric, so you may want to shorten it by using a blank lyric. -mudela(verbatim)(\score{ -< \notes \relative c''{ - a4()b()c()d c()d()b()a c()d()b()a } - \context Lyrics \lyrics { - foo1 __ bar2. __ _4 baz1 __ } -> }) - - - -sect(Time) - -LilyPond aligns all musical objects according to the amount of time -they occupy. All musical objects have a duration. When music is -written sequentially using braces the duration is the sum of the -durations of the elements. When music is stacked into simultaneous music -using angle -brackets, the duration is the maximum of the durations of the -elements. - -Because LilyPond knows the durations of all musical elements, the time -signature enables LilyPond to draw bar lines automatically. The time -signature is specified with the code(\time) keyword: code(\time 3/4). -If no time signature is given, LilyPond assumes 4/4. The automatic -generation of bar lines can toggled with the code(\cadenza) keyword or the -code(Staff.barNonAuto) property, -and an incomplete measure at the start of the music can be created -using the code(\partial) keyword: code(\partial 8*2;) creates a -starting measure lasting two eighth notes. - -In order to help with error checking, you can insert bar markers in -your music by typing code(|). Whenever LilyPond encounters a code(|) -that doesn't fall at a measure boundary, she prints a warning message. - -Rhythmic grouping is a concept closely associated with this. -A default grouping is selected for the chosen time signature. -The default consists of combinations of 2 and 3 beats with as many -groups of 3 as possible, and the groups of 3 coming first. For -example, 4/4 is divided into 2+2 and 8/8 is divided into 3+3+2. This -default grouping can be changed using the \grouping keyword which -takes a list of durations to specify the grouping. - - -COMMENT( -sect(Composition: forming bigger structures) -label(sec:grammar) - -The computer savy user may be interested in a more formal -specification. We can capture what have learned about forming -sentences in Mudela in a context-free grammar. - -latexcommand(\smallskip) - -table(2)(lll)( - row(cell(em(Music))cell(: em(Note))) - row(cell()cell(code(|) em(Rest))) - row(cell()cell(code(|) code({) em(MusicList) code(}))) - row(cell()cell(code(|) code(<) em(MusicList) code(>))) - row(cell()cell(code(|) em(Command))) - row(cell()cell(code(|) code(\context) em(string) code(=) em(string) em(Music))) - row(cell()cell(;)) - row(cell(em(MusicList))cell(: em(empty))) - row(cell()cell(code(|) em(MusicList) em(Music))) - row(cell()cell(;)) -) - -latexcommand(\smallskip) - -In mathematics you can form expressions by combining expressions, -which are ultimately some kind of atom or terminal symbol. The same -goes for Mudela: there are some basic building blocks, and by -combining those you create complex music. - -You can combine music in three ways: -itemize( -it()If you enclose a sequence of music-elements in braces ( code({) - and code(}) ), then you form another kind of music called -sequential music - with those pieces. - The duration of sequential composition is the sum of the durations of its elements - verb( - { c c g g a a g2 } % twinkle twinkle - { { c c g g} { a a g2 } } - ) -it()You can stack music by enclosing a sequence of music elements - with code(<) and code(>). This is called simultaneous music. - The duration of a simultaneous composition is the maximum of the durations - of its elements Example: - verb( - % a-major chord - ) -it()You can form music by transposing music: - verb( - \transpose - d % from c to the d that's almost one octave down - { e4 f4 } % the horizontal music -) -it()verb(\context) -it()verb(\property) -it()verb(\translator) -it()verb(\relative) -) - -Of course you can also combine these three mechanisms. -verb( -{ c } % 4 increasing chords -) - -END OF COMMENT ) - - -sect(Repeats) - -In order to specify repeats, use the code(\repeat) keyword. By -default, repeats are printed with repeat symbols. -mudela(fragment,verbatim,center)( -c'1 -\repeat semi 2 { c'4 d' e' f' } -\repeat semi 2 { f' e' d' c' }) -In order to specify alternate endings, use the code(\alternative) -keyword. -mudela(fragment,verbatim,center)( -c'1 -\repeat semi 2 {c'4 d' e' f'} -\alternative { {d'2 d'} {f' f} }) -The code(semi) specifies that normal repeats will be printed. If -code(fold) is used instead then the alternatives will be stacked: -mudela(fragment,verbatim,center)( -c'1 -\repeat fold 2 {c'4 d' e' f'} -\alternative { {d'2 d'} {f' f} }) -When the repeats involve partial measures, it will be necessary to use -code(\partial) keywords in a somewhat unexpected way -to indicate some measure lengths. -mudela(fragment,verbatim)( -\context Staff { \relative c'{ - \repeat semi 2 { \partial 4; e | c2 d2 | e2 f2 | } - \alternative { { g4 g g } {\partial 1; a a a a | b1 } } -}}) -Repeats can be unfolded by setting the property Staff.unfoldRepeats. -Note also that if your music begins with code(\repeat), you must place -it in an explicit code(Staff) context or you will get bizarre results. - -If you don't give enough alternatives for all of the repeats, then the -first alternative is assumed to be repeated enough to equal to -specified number of repeats. -mudela(fragment,verbatim)( -\context Staff { \relative c'{ - \repeat semi 3 { \partial 4; e | c2 d2 | e2 f2 | } - \alternative { { g4 g g } {\partial 1; e4 e e } - {\partial 1; a a a a | b1 } } -}}) - - -sect(Keywords) - -Keywords sometimes appear alone, but usually they require arguments. -A keyword may have a single argument, a sequence of arguments in -braces, or a sequence of arguments separated by spaces and terminated -by a semicolon. The precise syntax of each keyword is shown below. -Keywords must appear in the right context. If you use a keyword in -the wrong place, even if the usage is syntactically correct, you will -get the message ``parse error'' from LilyPond. - - -description( - -dit(code(\absdynamic) code({) var(code) code(})) Internal keyword for -printing dynamic marks such as $f$ under music. The parameter -var(code) is unsigned and specifies the dynamic mark to print. -Normally you should use the more user friendly abbreviations defined -in the init file file(dynamic.ly). - -FIXME: Changed to code(\textscript) var(text) var(style). Defines -a text-request. - -dit(code(\accepts) var(string)code(;)) This keyword can appear only within a -code(\translator) block. It specifies what contexts are allowed with the -context that is being defined. See Section ref(translators). - -dit(code(\alternative) code({) var(music1) var(music2) ... code(})) -Specifies alternative endings. Must come after a code(\repeat) keyword. - -dit(code(\bar) var(bartype)code(;)) Prints a special bar symbol, or at -measure boundaries, replaces the regular bar symbol with a special -symbol. The argument var(bartype) is a string which specifies the -kind of bar to print. Options are code(":|"), code("|:"), -code(":|:"), code("||"), code("|."), code(".|"), or code(".|."). -These produce respectively a right repeat, a left repeat, a double -repeat, a double bar, a start bar, an end bar, or a thick double bar. -If var(bartype) is set to code("empty") then nothing is printed, but a -line break is allowed at that spot. Note that the printing of special bars -has no effect on the MIDI output. - -dit(code(\cadenza) var(togglevalue)code(;)) Toggles the automatic generation -of bar lines. If var(togglevalue) is 0 then bar line generation is -turned off. If var(togglevalue) is 1 then a bar is immediately -printed and bar generation is turned on. - -dit(code(\clef) var(clefname)code(;)) Allowed only in music. -Sets the current clef. The argument is -a string which specifies the name of the clef. Several clef names are -supported. If code(_8) or code(^8) is added to the end of a clef -name then the clef lowered or raised an octave will be generated. -Here are the supported clef names with middle C shown in each clef: -mudela(center)( -\score{ - \notes{ \cadenza 1; - %\property Voice.textStyle = typewriter - \clef subbass; c'4-"\kern-10mm subbass" - \clef bass; c'4^"\kern -8mm bass" - \clef baritone; c'4_"\kern -10mm baritone" - \clef varbaritone; c'4^"\kern -10mm varbaritone" - \clef tenor; c'4_"\kern -10mm tenor" - \clef "G_8"; c'4^"\kern -6mm G\_8" - } - \paper{ linewidth= 4.5 \in; } -} -) -mudela(center)( -\score{ - \notes{\cadenza 1; \clef alto; c'4_"\kern -10mm alto" - % \clef scarlatti; c'4_"\kern -4mm scarlatti" - \clef mezzosoprano; c'4^"\kern -10mm mezzosoprano" - \clef soprano; c'4_"\kern -10mm soprano" - \clef treble; c'4^"\kern -6mm treble" - \clef french; c'4_"\kern -10mm french" } - \paper{ linewidth= 4.5 \in; } -} -) -The treble clef can also be obtained using the names code(G) or -code(violin). The bass clef is also available by code(\clef F). - -dit(code(\chord) var(chordlist)) Parse var(chordlist) in chords mode. - -dit(code(\chordmodifiers) var(modifierlist)) Specify the text chord -modifiers that may appear after chord names. These are specified in -the file file(chord-modifiers.ly). - -dit(code(\cm)) Specify a dimension in centimeters. - -dit(code(\consists) var(string)code(;)) This keyword can appear only within a -code(\translator) block. It specifies that an engraver or performer named -var(string) should be added to the translator. See Section -ref(translators). - -dit(code(\consistsend) var(string)code(;)) Unknown function. - -dit(code(\context) var(contexttype) [code(=) var(contextname)] -var(music) or code(\context) var(translatortype)code(;)) The first -variant is used only within music to create an instance of a -context. The new context can optionally be given a name. The -specified var(music) is processed in the new context. The second -variant appears within a code(\translator) block and specifies the -type of translator being created. - -dit(code(\duration) code({) var(length) var(dotcount) code(})) Specify note -duration. The parameter var(length) is the negative logarithm (base -2) of duration: 1 is a half note, 2 is a quarter note, 3 is an eighth -note, etc. The number of dots after the note is given by -var(dotcount). - -dit(code(\font) var(string)) Internal keyword. Used within -code(\paper) to specify the font. - -dit(code(\grouping) var(durationseq)code(;)) Sets the metric structure of -the measure. Each argument specifies the duration of one metric unit. -For example, code(\duration 16*5;) specifies a grouping of five beats -together in 5/16 time. The default grouping is to have as many groups -of 3 as possible followed by groups of two. - -dit(code(\header) code({) var(key1) = var(val1); var(key2) = var(val2); ... code(})) -Specifies information about the music. A header should appear at the -top of the file describing the file's contents. If a file has -multiple code(\score) blocks, then a header should appear in -each score block describing its contents. Tools like code(ly2dvi) can -use this information for generating titles. Key values that are used -by ly2dvi are: title, subtitle, composer, opus, poet, instrument, -metre, arranger, piece and tagline. - -dit(code(\in)) Specify a dimension in inches. - -dit(code(\include) var(file)) Include the specified file. The -argument var(file) is a string. The full filename including the -file(.ly) extension must be given, and the filename must be quoted. -(An unquoted string will not work here.) - -dit(code(\key) var(pitch) var(type) code(;)) Change the key signature. -var(type) should be code(\major) or code(\minor) to get -var(pitch)-major or var(pitch)-minor, respectively. The second -argument is optional, the default is major keys. -The var(\context) argument can also be given as an integer, which tells -the number of semitones that should be added to the pitch given in the -subsequent code(\key) commands to get the corresponding major key, -e.g. code(\minor) is defined as 3. The standard mode names -code(\ionian), code(\locrian), code(\aeolian), code(\mixolydian), -code(\lydian), code(\phrygian), and code(\dorian) are also defined. - -dit(code(\keysignature) var(pitchseq)code(;)) -Specify an arbitrary key signature. The pitches from var(pitch) will -be printed in the key signature in the order that they appear on the list. - -dit(code(\lyrics) var(lyriclist)) Parse var(lyriclist) in lyrics mode. - -dit(code(\maininput)) Internal command. This command is used for creating init -files like file(init.fly) that read the user file into the middle of another -file. It is illegal to use this command in a user file. - -dit(code(\mark) var(unsigned)code(;) or code(\mark) var(string)code(;)) -Allowed in music only. Prints a mark over or under (depending on the -code(markDirection) property) the staff. -You must add code(Mark_engraver) to the Score context. - -dit(code(\midi) var(statementlist)) Appears in a score block to -indicate that musical output should be produced and to set output -parameters. Can also appear at the top level to set default output -parameters. See code(\tempo). - -dit(code(\mm)) Specify a dimension in millimeters. - -dit(code(\musicalpitch) code({) var(octave) var(note) var(shift) code(})) -Specify note pitch. The octave is specified by an integer, -zero for the octave containing middle C. The note is a number from 0 -to 7, with 0 corresponding to C and 7 corresponding to B. The shift -is zero for a natural, negative to add flats, or positive to add -sharps. - -dit(code(\name) var(context)code(;)) Appears within code(\translator) to -specify the name of the context that the translator handles. See Section -ref(translators). - -dit(code(\notenames) var(assignmentlist)) Define new note names. This -keyword can appear only at the top level. -The argument is a list of definitions of the form -var(name) = var(pitch), where var(pitch) is specified with the -code(\musicalpitch) keyword. - -dit(code(\notes) var(music)) Enter note mode and process the -specified music. - -dit(code(\paper) var(statmentlist)) -Appears in a score block to indicate that the music should be printed -or to set output parameters. Can also appear at the top level to set -default output parameters for all of the score blocks. -The var(statmentlist) contains statements that change features of the -output. See Section ref(paper). - -dit(code(\partial) var(duration)code(;)) Specify that the first measure of -the music lasts only for the specified duration. Use also to specify -the duration of the first measure of the argument to -code(\alternative). - -dit(code(\penalty) var(int)code(;)) Allowed only in music. -Discourage or encourage line breaks. See identifiers code(\break) and -code(\nobreak) in Section ref(ident). - -dit(code(\property) var(contextname)code(.)var(propname) code(=) var(value)) -Sets the var(propname) property of the context var(contextname) to the -specified var(value). All three arguments are strings. Depending on -the context it may be necessary to quote the strings or to leave space -on both sides of the dot. - -dit(code(\pt)) Specify a dimension in points. - -dit(code(\relative) var(pitch) var(music)) Processes the specified -var(music) in relative pitch -mode. In this mode, the octave of a pitch is chosen so that the -pitch is closest to the preceeding pitch. -The argument var(pitch) is -the starting pitch for this comparision. In the case of chords, the -first note of a chord is used as the base for the first pitches in the next -chord. See Section ref(relative). - -dit(code(\remove) var(string)code(;)) Can appear only in a -code(\translator) block. Specifies that a performer or engraver named -var(string) should be removed. See Section ref(translators). - -dit(code(\repeat) var(style) var(count) code({) var(music) code(})) -Repeats the specified -music var(count) times. Alternative endings can be specified by adding a -code(\alternative) keyword after the code(\repeat). The var(style) -parameter should be either code(semi), for regular repeats, or -code(fold) for repeats displayed vertically. - -dit(code(\scm) var(scheme)code(;)) Embeds specified Scheme code. - -dit(code(\scmfile) var(filename)code(;)) Reads Scheme code from the specified -file. - -dit(code(\score) var(statementlist)) Create a Score context. This -is the top level notation context. -COMMENT(this still needs work) - -dit(code(\script) var(alias)) Prints a symbol above or below a note. -The argument is a string which points into the script-alias table -defined in file(script.scm). The scheme definitions specify whether -the symbol follows notes into the staff, dependence of symbol -placement on staff direction, and a priority for placing several -symbols over one note. Usually the code(\script) keyword is not used -directly. Various helpful identifier definitions appear in -file(script.ly). - -dit(code(\shape) code(=) var(indent1) var(width1) var(indent2) -var(width2) ... code(;)) Allowed only within code(\paper). Each pair -of var(indent) and var(width) values is a dimension specifying how far -to indent and how wide to make the line. The indentation and width of -successive lines are specified by the successive pairs of dimensions. -The last pair of dimensions will define the characeristics of all -lines beyond those explicitly specified. - -COMMENT(First pair of dimensions seems to be skipped. At least it is -in the example file denneboom.ly.) - -dit(code(\skip) var(duration)code(;)) Skips the amount of time specified by -var(duration). A gap will be left for the skipped time with no notes -printed. It works in Note Mode or Lyrics Mode (but generates a -mysterious error in lyrics). - -dit(code(\spanrequest) var(startstop) var(type)). Define a spanning request -var(startstop) is either -1 (code(\start)) or 1 (code(\stop)). The var(type) -parameter is a string that describes what should be started. Supported types -are "crescendo", "decrescendo", "beam", "slur". This is an internal command. -Users should use the abbreviations which are defined in the -initialization file file(dynamic.ly). - -dit(code(\tempo) var(duration) = var(perminute)code(;)) Used within -code(\midi) or within music to specify the tempo. For example, -`code(\midi { \tempo 4 = 76;})' requests output with 76 quarter notes -per minute. Note that if the music contains several tempo commands, -only the last one is used to set the tempo for the entire MIDI output. -COMMENT(Is this true?) - -dit(code(\textscript) var(text) var(style)) Print the specified text as a -script in the specified style. - -dit(code(\time) var(numerator)code(/)var(denominator)code(;)) Change the time -signature. The default time signature is 4/4. - -dit(code(\times) var(numerator)code(/)var(denominator) var(music)) -Multiply the duration of var(music) by the specified fraction. - -dit(code(\translator) var(statements) or code(\translator) -var(context) = var(name)) The first variant appears only within -code(\paper) and specifies a translator for -converting music to notation. The translator is specified with a -single code(\context) statement and a series of code(\accepts), and -code(\consists) statements. See Section ref(translators). -The second variant appears in -music. It specifies that the current the contexts -contained within the specified context should be shifted to the -context with the specified name. - -COMMENT( \translator seems like a strange name for the second -operation, and is the overloading desireable? ) - -dit(code(\transpose) var(pitch) var(music)) Transposes the specified -music. Middle C is tranposed to var(pitch). This is allowed in music only, -and if it appears inside code(\relative), then any notes specified for -transposition should be specified inside another code(\relative). See Section -ref(transpose). - -dit(code(\type) var(string)code(;)) Use inside code(\translator) to -specify the type of the translator. - -dit(code(\version) var(string)) Specify the version of Mudela that a -file was written for. The argument is the version number, for example -code("1.0.1"). Note that the Mudela version is different from the -LilyPond version. - -) - - -sect(Notation Contexts) - -Notation contexts provide information that appears in printed music -but not in the music itself. A new musical context is created using -the code(\context) keyword: `code(\context) var(contexttype) [code(=) -var(contextname)] var(music)'. The following context types are -allowed. - -description( - -dit(code(LyricVoice)) Corresponds to a voice with lyrics. Handles the printing -of a single line of lyrics. - -dit(code(Voice)) Corresponds to a voice on a staff. - This context handles the conversion of noteheads, - dynamic signs, stems, beams, super- and subscripts, slurs, ties and rests. - -dit(code(ChordNamesVoice)) A voice with chord names. Handles printing -of a line of chord names. - -dit(code(ChordNames)) Typesets chord names. Can contain -code(ChordNamesVoice) contexts. - -dit(code(Lyrics)) Typesets lyrics. It can contain code(LyricVoice) contexts. - -dit(code(Staff)) Handles clefs, bar lines, keys, - accidentals. It can contain code(Voice) contexts. - -dit(code(RhythmicStaff)) A context like code(Staff) but for printing -rhythms. Pitches are ignored; the notes are printed on one line. -It can contain code(Voice) contexts. - -dit(code(GrandStaff)) Contains code(Staff) or code(RhythmicStaff) -contexts. It adds a brace on the left side grouping the staffs -together. The bar lines of the contained staffs are connected vertically. -It can contain code(Staff) contexts. - -dit(code(PianoStaff)) Just like code(GrandStaff) but with -code(minVerticalAlign) set equal to code(maxVerticalAlign) so that -interstaff beaming and slurring can be used. - -dit(code(StaffGroup)) Contains code(Staff) or code(RhythmicStaff) -contexsts. Adds a bracket on the left side, grouping the staffs -together. The bar lines of the contained staffs are connected vertically. -It can contain code(Staff), code(RhythmicStaff), code(GrandStaff) or code(Lyrics) contexts. - -dit(code(ChoirStaff)) Identical to code(StaffGroup) except that the -contained staffs are not connected vertically. - -dit(code(Score)) This is the top level notation context. It is specified with -the code(\score) keyword rather than the code(\context) command. No -other context can contain a code(Score) context. This context handles -the administration of time signatures. It also makes sure that items -such as clefs, time signatures, and key-signatures are aligned across -staffs. It can contain code(Lyrics), code(Staff), -code(RhythmicStaff), code(GrandStaff), code(StaffGroup), and -code(ChoirStaff) contexts. - -) - -The various contexts have properties associated with them. These -properties can be changed using the code(\property) command: -`code(\property) var(context)code(.)var(propname) code(=) var(value)'. -Properties can also be set within the code(\translator) block -corresponding to the appropriate context. In this case, they are -assigned by `var(propname) code(=) var(value)'. The settings made with -code(\property) are processed after settings made in the code(\translator) -block, so the code(\property) settings will override code(\translator) -settings. - -The code(\property) keyword will create any property you specify. -There is no guarantee that a property will actually be used. If you -spell a property name wrong, there will be no error message. In order to find -out what properties are used, you must search the source code -for code(get_property). -Properties that are set in one context are inherited by all of the -contained contexts. This means that a property valid for the Voice -context can be set in the Score context (for example) and thus take -effect in all Voice contexts. - -subsubsubsect(Lyrics properties) - -description( - -dit(code(textStyle)) Set the font for lyrics. The available font -choices are code(roman), code(italic), code(bold), code(large), -code(Large), code(typewriter), and code(finger). The code(finger) -font can only display numbers. Note also that you must be careful -when using code(\property) in Lyrics mode. Because of the way strings -are parsed, either put quotes around the arguments to code(\property) -or be sure to leave a space on both sides of the dot. - - -) - -subsubsubsect(Voice properties) - -description( - -dit(code(stemLeftBeamCount)) Specify the number of beams to draw on -the left side of the next note. - -dit(code(stemRightBeamCount)) Specify the number of beams to draw on -the right side of the next note. - -dit(code(beamAuto)) If set to 1 then beams are generated -automatically. If set to zero then no beams will be automatically -generated. The default value is 1. - -dit(code(beamAutoEnd)) Specifies when automatically generated beams -can end. See Section ref(autobeam). - -dit(code(beamAutoBegin)) Specifies when automatically generated beams -can start. See Section ref(autobeam). - -dit(code(textEmptyDimension)) If set to 1 then text placed above or -below the staff is assumed to have zero width. - -dit(code(noteheadStyle)) Selects type of note head. Choices are -code(cross), code(diamond), code(harmonic), code(transparent), and -code(""). They are shown in that order below. -mudela(center)( -\score{ - \notes{ - \property Staff.barNonAuto = 1 - \property Voice.noteHeadStyle = cross - a' - \property Voice.noteHeadStyle = diamond - a' - \property Voice.noteHeadStyle = harmonic - a' - \property Voice.noteHeadStyle = transparent - a' - \property Voice.noteHeadStyle = "" - a' - } - \paper{ linewidth = -1.;} -} -) - - -dit(code(restStyle)) Change the layout of rests shorter than quarter notes. -Currently, the standard layout code(restStyle="") and mensural notation -code(restStyle="mensural") are available. - -dit(code("midiInstrument")) Sets the instrument for MIDI output. This -property name must be quoted because of the embedded underscore. If -this property is not set then LilyPond will use the code(instrument) -property. This must be set to one of the strings on the list of MIDI -instruments that appears in Section ref(midilist). If you use a -string which is not listed, LilyPond will silently substitute piano. - -dit(code(transposing)) Tranpose the MIDI output. Set this property to -the number of half-steps to transpose by. - -dit(code(oldTieBehavior)) Set to 1 in order to get old tie behavior -where ties would connect unequal pitches. - -dit(code(verticalDirection)) Determines the direction of stems, subscripts, -beams, slurs, and ties. Set to code(\down) to force them down, -code(\up) to force them up, or code(\free) to let LilyPond decide. -This can be used to distinguish between voices on the same staff. The -code(\stemdown), code(\stemup), and code(\stemboth) identifiers set -this property. See also the identifiers code(\voiceone), -code(\voicetwo), code(\voicethree) and code(\voicefour). - -dit(code(slurVerticalDirection)) Set to code(\free) for free choice of slur -direction, set to code(\up) to force slurs up, set to code(\down) to -force slurs down. The shorthands code(\slurup), code(\slurdown), and -code(\slurboth) are available. - -dit(code(tieVerticalDirection)) Set to code(\free) for free choice of tie -direction, set to code(\up) to force ties up, set to code(\down) to -force ties down. - -dit(code(slurdash)) Set to 0 for normal slurs, 1 for dotted slurs, and -a larger value for dashed slurs. Identifiers code(\slurnormal) and -code(\slurdotted) are predefined to set the first two settings. - -dit(code(horizontalNoteShift)) Set to 1 to enable LilyPond to shift notes -horizontally if they collide with other notes. This is useful when -typesetting many voices on one staff. The identifier code(\shift) is -defined to enable this. If there are several voices, every voice must -have a distinct value of this property or no shifting will occur. - -dit(code(dynamicDir)) Determines location of dynamic marks. Set to -code(\up) to print marks above the staff; set to code(\down) to print -marks below the staff. - -dit(code(dynamicStyle)) Set the text style for dynamics. - -dit(code(textStyle)) Set the text style for superscripts and -subscripts. See above for list of text styles. - -dit(code(textScriptPadding)) Determines the extra space added between -super-/subscripted text and the closest staff line or note. - -dit(code(fontSize)) Can be used to select smaller font sizes for -music. The normal font size is 0, and the two smaller sizes are -1 -and -2. - -dit(code(abbrev)) Set length for tremolo to be used if no length is -explicitly specified. - -dit(code(tupletDirection)) Determines the direction of triplets and -other tuplets. Set to code(\down) to force them below the staff, -code(\up) to force them above, or code(\free) to let LilyPond decide. - -dit(code(tupletVisibility)) Determines whether tuplets of notes are -labelled. Setting to 0 shows nothing; setting to 1 shows a number; -setting to 2 shows a number and a bracket if there is no beam; setting -to 3 shows a number, and if there is no beam it adds a bracket; -setting to 4 shows both a number and a bracket unconditionally. The -code(pletoff) and code(pleton) identifiers set the property to 0 and 3, -respectively. - -dit(code(markScriptPadding)) Determines the extra space added between -the mark and the closest staff line or note. - -dit(code(markDirection)) Determines if marks should be printed above -or below the staff. Set to code(\up) to print marks above the staff; -set to code(\down) to print marks below the staff. - -dit(code(articulationScriptPadding)) Determines the extra space added -between articulation marks, such as staccato, tenuto, trill, up/down -bow or fermata, and the closest staff line or note. -) - -subsubsubsect(Staff properties) - -description( - -dit(code(createInitdefaultClef)) Specify whether clefs are created on -default? (Doesn't seem to do anything.) - -dit(code(barNumberDirection)) Set to code(\up) or code(\down) to put -bar numbers above or below the staff. - -dit(code(barNumberHangOnClef)) Set to 1 to cause bar numbers to appear -above or below the clef instead of on the bar line. - -dit(code(barNumberScriptPadding)) Sets extra space between the bar -number and the bar it labels. - -dit(code(markHangOnClef)) Set to 1 to cause marks to appear by clefs -instead of by bar lines. - -dit(code(marginDirection)) Set to code(\left) or code(\right) to -specify location of marginal scripts. - -dit(code(marginScriptPadding)) Specify extra space for marginal scripts. - -dit(code(forgetAccidentals)) Causes accidentals to be printed at every -note instead of remembered for the duration of a measure. - -dit(code(noResetKey)) Do not reset the key at the start of a measure. -Accidentals will be printed only once and are in effect until -overridden, possibly many measures later. - -dit(code(staffLineLeading)) Specifies the distance (in points) between lines -of the staff. - -dit(code(postBreakPadding)) Extra space in points to be added after -the clef, time signature and key signature on the staff. - -dit(code(barAtLineStart)) Set to 1 to produce a bar line after the -clef at the start of each line (but not at the beginning of the -music). - -dit(code(voltaVisibility)) Set to 0 to suppress the printing -of brackets over alternate endings specified by code(\alternative). - -dit(code(voltaSpannerDuration)) Set to an integer to control the size -of the brackets printed by code(\alternative). The integer specifies -the number of whole notes duration to use for the brackets. It seems -to be rounded to the nearest measure. This can be used to shrink the -length of brackets in the situation where one alternative is very -large. It may have odd effects if the specified duration is longer -than the music given in an code(\alternative). - -dit(code(barNonAuto)) If set to 1 then bar lines will not be printed -automatically; they must be explicitly created with code(\bar) keywords. -Unlike with the code(\cadenza) keyword, measures are still counted. Bar -generation will resume according to that count if this property is set to -zero. - -dit(code(defaultClef)) Determines the default clef. See code(\clef) -keyword. - -dit(code(nuberOfStaffLines)) Sets the number of lines that the staff has. - -dit(code(barAlways)) If set to 1 a bar line is drawn after each note. - -dit(code(defaultBarType)) Sets the default type of bar line. See -code(\bar) keyword. - -dit(code(keyoctaviation)) If set to 1, then keys are the same in all -octaves. If set to 0 then the key signature for different octaves can -be different and is specified independently: code(\keysignature bes -fis'). The default value is 1. Can be set to zero with -code(\specialkey) or reset to 1 with code(\normalkey). - -dit(code(instrument) and code(instr)) If code(Staff_margin_engraver) -is added to the Staff translator, then the code(instrument) property -is used to label the first line of the staff and the code(instr) -property is used to label subsequent lines. If the -code(midiInstrument) property is not set then code(instrument) is -used to determine the instrument for MIDI output. -COMMENT(This prints the instrument name on top of the staff lines.) - -dit(code(createKeyOnClefChange)) Set to a nonempty string if you want key -signatures to be printed when the clef changes. Set to the empty string (the -default) if you do not want key signatures printed. - - -dit(code(timeSignatureStyle)) Changes the default two-digit layout - for time signatures. The following values are recognized: - description( - dit(code(C)) 4/4 and 2/2 are typeset as C and struck C, - respectively. All other time signatures are written with two digits. - dit(code(old)) 2/2, 3/2, 3/4, 4/4, 6/4, 9/4, 6/8 and 9/8 are typeset - with old-style mensuration marks. All other time signatures are - written with two digits. - dit(code(1)) All time signatures are typeset with a single - digit, e.g. 3/2 is written as 3. - dit(code(C2/2), code(C4/4), code(old2/2), code(old3/2), - code(old3/4), code(old4/4), code(old6/4), code(old9/4), - code(old6/8) or code(old9/8))Tells Lilypond to use a - specific symbol as time signature. - ) -The different time signature characters are shown below with -their names: -mudela(center)( -\score{ - \notes\relative c'' { -\property Voice.textStyle = typewriter -\property Staff.timeSignatureStyle = "C2/2" -\time 2/2; a2^"C2/2" a2 -\property Staff.timeSignatureStyle = "C4/4" -\time 2/2; a2^"C4/4" a2 -\property Staff.timeSignatureStyle = "old2/2" -\time 2/2; a2^"old2/2" a2 -\property Staff.timeSignatureStyle = "old3/2" -\time 2/2; a2^"old3/2" a2 -\property Staff.timeSignatureStyle = "old4/4" -\time 2/2; a2^"old4/4" a2 -\property Staff.timeSignatureStyle = "old6/4" -\time 2/2; a2^"old6/4" a2 -\property Staff.timeSignatureStyle = "old9/4" -\time 2/2; a2^"old9/4" a2 -\property Staff.timeSignatureStyle = "old6/8" -\time 2/2; a2^"old6/8" a2 -\property Staff.timeSignatureStyle = "old9/8" -\time 2/2; a2^"old9/8" a2 -} - \paper{ linewidth= 4.5 \in; } -} -) - -dit(code(clefStyle)) Determines how clefs are typeset. When set to -code(transparent), the clefs are not printed at all, when set to -code(fullSizeChanges), clef changes in the middle of a line are -typeset with a full size clef. By default, clef changes are typeset in -smaller size. - -) - -subsubsubsect(GrandStaff properties) - -description( - -dit(code(alignmentReference)) Set to code(\center) for vertical -alignment reference point to be in the center of the vertical group. -Set to code(\up) to put the reference point at the top of the group. - -dit(code(maxVerticalAlign)) Set the maximum vertical distance between -staffs. - -dit(code(minVerticalAlign)) Set the minimum vertical distance between -staffs. - -) - -subsubsubsect(Score properties) - -description( - -dit(code(skipBars)) Set to 1 to skip the empty bars that are produced -by multimeasure notes and rests. These bars will not appear on the -printed output. Set to zero (the default) to expand multimeasure -notes and rests into their full length, printing the appropriate -number of empty bars so that synrchonization with other voices is -preserved. COMMENT(meaning of "skip" here seems to be different from -the meaning used for the keyword \skip.) - -dit(code(beamquantisation)) Set to code(\none) for no quantization. -Set to code(\normal) to quantize position and slope. Set to -code(\traditional) to avoid wedges. These three settings are -available via code(\beamposfree), code(\beamposnormal), and -code(\beampostraditional). - -dit(code(beamslopedamping)) Set to code(\none) for undamped beams. -Set to code(\normal) for damped beams. Set to code(\infinity) for -beams with zero slope. The identifiers code(\beamslopeproportional), -code(\beamslopedamped), and code(\beamslopezero) each set the -corresponding value. - -dit(code(chordInversion)) Determines whether LilyPond should look for -chord inversions when translating from notes to chord names. Set to 1 -to find inversions. The default is 0 which does not look for inversions. - -) - - - -sect(Pre-defined Identifiers) -label(ident) - -Various identifiers are defined in the initialization files to -provide shorthands for some settings. - -description( -dit(code(\aeolian)) Used as the second argument of the code(\key) -keyword to get an aeolian mode. -dit(code(\break)) Force a line break in music by using a large -argument for the keyword code(\penalty). -dit(code(\center)) Used for setting textalignment property. Is set to 0. -dit(code(\cr)) Start a crescendo. -dit(code(\decr)) Start a decrescendo. -dit(code(\dorian)) Used as the second argument of the code(\key) -keyword to get a dorian mode. -dit(code(\down)) Used for setting direction setting properties. Is -equal to -1. -dit(code(\f)) Print forte symbol on the preceeding note. -dit(code(\ff)) Print fortissimo symbol on the preceeding note. -dit(code(\fff)) Print fortississimo symbol on preceeding note. -dit(code(\ffff)) Print fortissississimo symbol on preceeding note. -dit(code(\fffff)) Print fffff symbol on preceeding note. -dit(code(\ffffff)) Print ffffff symbol on preceeding note. -dit(code(\fp)) Print fortepiano symbol on preceeding note. -dit(code(\free)) Used for setting direction setting properties. Is -equal to 0. -dit(code(\Gourlay)) Used for setting the paper variable -code(castingalgorithm). Is equal to 1.0. -dit(code(\infinity)) Used for setting the Score.beamslopedamping -property. Is actually equal to 10000. -dit(code(\ionian)) Used as the second argument of the code(\key) -keyword to get an ionian mode. -dit(code(\left)) Used for setting textalignment property. Is equal to -1. -dit(code(\locrian)) Used as the second argument of the code(\key) -keyword to get a locrian mode. -dit(code(\lydian)) Used as the second argument of the code(\key) -keyword to get a lydian mode. -dit(code(\major)) Used as the second argument of the code(\key) -keyword to get a major key. -dit(code(\minor)) Used as the second argument of the code(\key) -keyword to get a minor key. -dit(code(\mixolydian)) Used as the second argument of the code(\key) -keyword to get a mixolydian mode. -dit(code(\mf)) Print mezzoforte symbol on preceeding note. -dit(code(\mp)) Print mezzopiano symbol on preceeding note. -dit(code(\nobreak)) Prevent a line break in music by using a large -negative argument for the keyword code(\penalty). -dit(code(\none)) Used for setting Score.beamslopedamping and -Score.beamquantisation properties. Is equal to 0. -dit(code(\normal)) Used for setting Score.beamslopedamping and -Score.beamquantisation properties. Is equal to 1. -dit(code(\normalkey)) Select normal key signatures where each octave -has the same key signature. This sets the Staff.keyoctaviation property. -dit(code(\p)) Print a piano symbol on preceeding note. -dit(code(\phrygian)) Used as the second argument of the code(\key) -keyword to get a phrygian mode. -dit(code(\pp)) Print pianissimo symbol on preceeding note. -dit(code(\ppp)) Print pianississimo symbol on preceeding note. -dit(code(\pppp)) Print pianissississimo symbol on preceeding note. -dit(code(\ppppp)) Print ppppp symbol on preceeding note. -dir(code(\pppppp)) Print pppppp symbol on preceeding note. -dit(code(\rc)) Terminate a crescendo. -dit(code(\rced)) Terminate a decrescendo -dit(code(\rfz)) Print a rinforzato symbol on preceeding note. -dit(code(\right)) Used for setting textalignment property. Is set to 1. -dit(code(\sf)) Print a subito-forte symbol on preceeding note. -dit(code(\sff)) Print a subito-fortissimo symbol on preceeding note. -dit(code(\sfz)) Print a sforzato symbol on preceeding note. -dit(code(\shiftoff)) Disable horizontal shifting of note heads that collide. -Sets the Voice.horizontalNoteShift property. -dit(code(\shifton)) Enable note heads that collide with other note heads -to be shifted horiztonally. Sets the Voice.horizontalNoteShift property. -dit(code(\slurboth)) Allow slurs to be above or below notes. This -sets the Voice.slurVerticalDirection property. -dit(code(\slurdown)) Force slurs to be below notes. This sets the -Voice.slurVerticalDirection property. -dit(code(\slurup)) Force slurs to be above notes. This sets the -Voice.slurVerticalDirection property. -dit(code(\sp)) Print a subito-piano symbol on preceeding note. -dit(code(\spp)) Print a subito-forte symbol on preceeding note. -dit(code(\specialkey)) Allow keys signatures do differ in different -octaves. This sets the Staff.keyoctaviation property. -dit(code(\stemboth)) Allow stems, beams, and slurs to point either -direction. This sets the Voice.verticalDirection property. -dit(code(\stemdown)) Force stems, beams, and slurs to point down. -This sets the Voice.verticalDirection property. -dit(code(\stemup)) Force stems, beams and slurs to point up. This -sets the Voice.verticalDirection property. -dit(code(\traditional)) Used for setting the -Score.beamquantisation property. Is equal to 2. -dit(code(\up)) Used for setting various direction properties. Is -equal to 1. -dit(code(\voiceone)) Enter Voice context called code(one) and force stems down. -(See code(\stemdown).) -dit(code(\voicetwo)) Enter Voice context called code(two) and force stems -up. (See code(\stemup).) -dit(code(\voicethree)) Enter Voice context called code(three) and force stems -up. -dit(code(\voicefour)) Enter Voice context called code(four), force stems down -and turn on horizontal shifting. (See code(\stemdown) and code(\shifton).) -dit(code(\Wordwrap)) Used for setting the paper variable -code(castingalgorithm). Equal to 0.0. -) - - -sect(Output) -label(output) -label(paper) - -The output produced by LilyPond is controlled by the code(\paper) and -code(\midi) keywords. These keywords appear in the code(\score) block -to indicate that printed or musical output should be produced. If -neither keyword appears in a code(\score) block, then paper output is -produced but MIDI output is not produced. - -The contents of the code(\paper) and code(\midi) blocks can change the -output in various ways. These blocks can appear at the top level of a -Mudela file to set default parameters for each type of output. It is -still necessary to explicitly specify the output type in the -code(\score) blocks if you don't want the default behavior of -producing only paper output. - -The code(\paper) and code(\midi) blocks -may begin with an optional identifier reference. No -identifier references are allowed anywhere else in the block. -The code(\paper) block can contain the code(\shape) keyword; the -code(\midi) block can contain the code(\tempo) keyword. Both of them -can contain code(\translator) keywords. The code(\paper) block can -also contain identifier assignments and parameter assignments. Unlike -at the top level, these assignments must be terminated by a semicolon. - - -subsect(Paper variables) - -Warning: this section is outdated and inaccurate. - -There are a large number of paper variables that are used to control -details of the layout. Usually you will not want to change these -variables; they are set by default to vaules that depend on the font -size in use. The only way to find out what variables are supported is -to search the source code for code(get_var). Two variables that you -may want to change are code(linewidth) and code(indent). - -In order to change the font size used for the output, many variables -need to be changed. Some identifiers and initialization files can -simplify this process. The default size is 20pt. In order to select -a different size, you must do two things. At the top level, do -code(\include "paper)var(SZ)code(.ly") where var(SZ) is the height of -the staff in points. Values presently allowed are 11, 13, 16, 20, and -26. This loads some definitions, but does not cause them to take -effect. In order to actually change the size, you must use one of the -identifiers: code(\paper_eleven), code(\paper_thirteen), -code(\paper_sixteen), code(\paper_twenty) or code(\paper_twentysix) -inside a code(\paper) block. - - -description( - dit(var(integer)) If an integer appears on the left side of an -assignment then a code(\font) keyword must appear on the right -side. This defines a music font at a particular size. See Voice -property code(fontSize). - -dit(code(arithmetic_basicspace) and code(arithmetic_multiplier)) -The space taken by a note is determined by the formula -COMMENT( - -)verb(arithmetic_multiplier * ( c + log2 (time) ))COMMENT( - -) where code(time) is the amount of time a note occupies. The value -of code(c) is chosen such that the smallest space within a measure is -arithmetic_basicspace. The smallest space is the one following the -shortest note in the measure. Typically arithmetic_basicspace is set -to the width of a quarter note head. - -dit(code(barsize)) Specify height of bars. This value may need to be -adjusted if you change the number of lines in the staff. -dit(code(beam_dir_algorithm)) Specify algorithm for determining -whether beams go up or down. It is real valued. If set to 2.0 then -majority selection is used. If set to 3.0, then mean selection is -used based on the mean center distance. If set to 4.0 then median -selection is used, based on the median center distance. -dit(code(castingalgorithm)) -dit(code(crescendo_shorten)) -dit(code(forced_stem_shorten)) Stems that have been forced to go the -unnatural direction are shortened by this amount. Equal to -dit(code(forced_stem_shorten0)) -dit(code(gourlay_energybound)) -dit(code(gourlay_maxmeasures)) Maximum number of measures per line -when using Gourlay method. -Decreasing this greatly reduces computation time. Default value: 10. -dit(code(indent)) Sets the indentation of the first line of music. -dit(code(interbeam)) -dit(code(interbeam4)) -dit(code(interline)) The distance between two staff -lines, calculated from the center of the lines. -dit(code(linewidth)) Sets the width of the lines. If it is set to --1.0, then a single unjustified line is produced. -dit(code(notewidth)) Width of an average note head. -dit(code(output)) Specifies an alternate -name for the TeX() output. A file(.tex) extension will be added to -the string you specify. -dit(code(rulethickness)) Determines thickness of staff lines and bars. -dit(code(slur_clip_angle)) -dit(code(slur_clip_height)) -dit(code(slur_clip_ratio)) -dit(code(slur_height_limit)) Specifies the maximum height of slurs. -Normally equal to staff_height. -dit(code(slur_ratio)) Specifes the ratio of slur hight to slur width -to aim for. Default value is 0.3. -dit(code(slur_rc_factor)) -dit(code(slur_slope_damping)) Allows slurs to start and end at -different heights ???? Default value is 0.5. -dit(code(slur_thickness)) Specify slur thickness. Equal to code(1.4 * -\staffline) by default. -dit(code(slur_x_gap)) Horizontal space between note and slur. Set to -code(\interline / 5) by default. -dit(code(slur_x_minimum)) -dit(code(staffheight)) The height of the staff from the center of the -bottom line to the center of the top line. Equal to to code(4 * \interline). -dit(code(stem_length)) Specify length of stems for notes in the staff -that don't have beams. -dit(code(stemthickness)) Specifies the thickness of the stem lines. -dit(code(tie_slope_damping)) -dit(code(tie_x_minimum)) -) - - -subsect(MIDI Instrument Names) -label(midilist) - -The MIDI instrument name is set by the code(Staff.midiInstrument) -property or, if that property is not set, the code(Staff.instrument) -property. The instrument name should be chosen from this list. If -string does not exactly match one from this list then LilyPond uses -the default piano. - -COMMENT( acordina = accordion, tango accordian = concertina - distortion guitar = distorted guitar - orchestral strings = harp - pan flute = wood flute? ) - -verb("acoustic grand" "contrabass" "lead 7 (fifths)" -"bright acoustic" "tremolo strings" "lead 8 (bass+lead)" -"electric grand" "pizzicato strings" "pad 1 (new age)" -"honky-tonk" "orchestral strings" "pad 2 (warm)" -"electric piano 1" "timpani" "pad 3 (polysynth)" -"electric piano 2" "string ensemble 1" "pad 4 (choir)" -"harpsichord" "string ensemble 2" "pad 5 (bowed)" -"clav" "synthstrings 1" "pad 6 (metallic)" -"celesta" "synthstrings 2" "pad 7 (halo)" -"glockenspiel" "choir aahs" "pad 8 (sweep)" -"music box" "voice oohs" "fx 1 (rain)" -"vibraphone" "synth voice" "fx 2 (soundtrack)" -"marimba" "orchestra hit" "fx 3 (crystal)" -"xylophone" "trumpet" "fx 4 (atmosphere)" -"tubular bells" "trombone" "fx 5 (brightness)" -"dulcimer" "tuba" "fx 6 (goblins)" -"drawbar organ" "muted trumpet" "fx 7 (echoes)" -"percussive organ" "french horn" "fx 8 (sci-fi)" -"rock organ" "brass section" "sitar" -"church organ" "synthbrass 1" "banjo" -"reed organ" "synthbrass 2" "shamisen" -"accordion" "soprano sax" "koto" -"harmonica" "alto sax" "kalimba" -"concertina" "tenor sax" "bagpipe" -"acoustic guitar (nylon)" "baritone sax" "fiddle" -"acoustic guitar (steel)" "oboe" "shanai" -"electric guitar (jazz)" "english horn" "tinkle bell" -"electric guitar (clean)" "bassoon" "agogo" -"electric guitar (muted)" "clarinet" "steel drums" -"overdriven guitar" "piccolo" "woodblock" -"distorted guitar" "flute" "taiko drum" -"guitar harmonics" "recorder" "melodic tom" -"acoustic bass" "pan flute" "synth drum" -"electric bass (finger)" "blown bottle" "reverse cymbal" -"electric bass (pick)" "skakuhachi" "guitar fret noise" -"fretless bass" "whistle" "breath noise" -"slap bass 1" "ocarina" "seashore" -"slap bass 2" "lead 1 (square)" "bird tweet" -"synth bass 1" "lead 2 (sawtooth)" "telephone ring" -"synth bass 2" "lead 3 (calliope)" "helicopter" -"violin" "lead 4 (chiff)" "applause" -"viola" "lead 5 (charang)" "gunshot" -"cello" "lead 6 (voice)") - - - -subsect(Translators) -label(translators) - -The behavior of notation contexts is defined by the translators for -those contexts. The translator for a context specifies what notations -are handled by the context, it specifies what other contexts the -context can contain, and it sets property values for the context. -There are different translators for each type of output. The -translators for paper output are defined in file(engraver.ly). The -translators for MIDI output are defined in file(performer.ly). - -The first thing that appears inside a code(\translator) definition is -the type of the context being created. This is specified with the -code(\type) keyword: code(\type) var(typename)code(;). After the type -of the context is specified, property assignments, the code(\name) -keyword and code(\consists), code(\accepts), and code(\remove) -keywords can appear in any order. The code(\name) keyword specifies -the name of the context that is handled by the translator. If the -name is not specified, the translator won't do anything. Each -code(\accepts) keyword specifies what contexts can be contained inside -this one. The code(\consists) keywords specify which notations are -handled by the context. Each code(\consists) keyword specifies the -name of an engraver (for paper ouput) or performer (for MIDI output) -which handles a certain notation. The code(\remove) keyword can be -used to remove a performer or engraver from the translator. - -In the code(\paper) block, it is also possible to define translator -identifiers. Like other block identifiers, the identifier can only -be used as the very first item of a translator. In order to define -such an identifier outside of code(\score), you must do -verb(\paper{ foo=\translator{ ... } -\score{ - \notes{ ... } - \paper{ \translator{ \foo ... } } -}) - -Some All of the standard translators have predefined identifiers, making -it easy to redefine these contexts by adding or removing items. -The predefined identifiers are: code(StaffContext), -code(RhythmicStaffContext), code(VoiceContext), code(ScoreContext), code(ScoreWithNumbers) - - -subsubsect(Paper Types and Engravers and Pre-defined Translators) - -Some pre-defined identifiers can simplify modification of translators. -The pre-defined identifiers are: -description( -dit(code(StaffContext)) Default Staff context. -dit(code(RhythmicStaffContext)) Default RhythmicStaff context. -dit(code(VoiceContext)) Default Voice context. -dit(code(ScoreContext)) Default Score context. -dit(code(ScoreWithNumbers)) Score context with numbering at the -Score level. -dit(code(BarNumberingStaffContext)) Staff context with numbering at -the Staff level. -dit(code(HaraKiriStaffContext)) -dit(code(OrchestralPartStaffContext)) -dit(code(OrchestralScoreContext)) -) -Using these pre-defined values, you can remove or add items to the -translator verb(\paper{ \translator{ \StaffContext - \remove Some_engraver; - \consists Different_engraver; }}) - - - -There are four types for paper translators: -description( - dit(code(Engraver_group_engraver)) - dit(code(Hara_kiri_line_group_engraver)) - dit(code(Line_group_engraver_group)) - dit(code(Score_engraver)) -) -COMMENT( The names of these types seem somewhat confusing. ) - -The engravers for paper output are: - -description( -dit(code(Abbreviation_beam_engraver)) -dit(code(Bar_engraver)) Engraves bar lines. Normally in code(Staff) and -code(RhythmicStaff). -dit(code(Bar_number_engraver)) Engrave bar numbers. These numbers -appear at the start of each line. Not normally in any translator. Can -be added to code(Score) for Score-wide numbering or to code(Staff) for -numbering on each staff. - -dit(code(Beam_engraver)) Handles beam requests by engraving beams. Normally -appears in the code(Voice) translator. If omitted, then notes will be printed -with flags instead of beams. - -dit(code(Beam_req_swallow_translator)) Swallows beam requests. In -code(LyricVoice). -dit(code(Chord_name_engraver)) Engraves chord names. Normally in -code(ChordNameVoice) -dit(code(Clef_engraver)) Engraves the clef symbol. Normally in code(Staff). -dit(code(Collision_engraver)) -dit(code(Dot_column_engraver)) Engraves dots on dotted notes shifted to the -right of the note. Normally in code(Voice). If omitted, then dots appear on -top of the notes. -dit(code(Dynamic_engraver)) Engraves dynamics symbols. Normally in code(Voice). -dit(code(Font_size_engraver)) -dit(code(Key_engraver)) Engraves the key signature. Normally in code(Staff). -dit(code(Local_key_engraver)) -dit(code(Lyric_engraver)) Engraves lyrics. Normally in code(LyricVoice). -dit(code(Multi_measure_rest_engraver)) Engraves multi-measure rests that are -produced with code(R). Normally in code(Voice). -dit(code(Piano_bar_engraver)) -dit(code(Pitch_squash_engraver)) Treat all pitches as middle C. Used in -code(RhythmicStaff). Note that the notes move, but the locations of -accidentals stay the same. -dit(code(Priority_horizontal_align_engraver)) -dit(code(Repeat_engraver)) Handles repeats? In code(Staff) and - code(RhythmicStaff). -dit(code(Rest_collision_engraver)) Handles collisions of rests. In code(Staff). -dit(code(Rest_engraver)) Engraves rests. Normally in code(Voice). -dit(code(Rhythmic_column_engraver)) -dit(code(Score_priority_engraver)) -dit(code(Script_engraver)) Handles note ornaments generated by code(\script). -Normally in code(Voice). -dit(code(Separating_line_group_engraver)) -dit(code(Skip_req_swallow_translator)) -dit(code(Slur_engraver)) Engraves slurs. Normally in code(Voice). -dit(code(Span_bar_engraver)) Engraves lines across multiple staffs. Normally -in code(Staffgroup) and code(GrandStaff). Removing this from code(StaffGroup) -gives the definition of code(ChoirStaff). -dit(code(Span_score_bar_engraver)) -dit(code(Staff_group_bar_engraver)) -dit(code(Staff_margin_engraver)) Prints the name of the instrument -(specified by code(Staff.instrument) and code(Staff.instr)) at the -left of the staff. -dit(code(Staff_sym_engraver)) -dit(code(Stem_engraver)) Engraves stems. Normally in code(Voice). -dit(code(Ties_engraver)) Engraves ties. Normally in code(Voice). -dit(code(Time_signature_engraver)) Engraves the time signature. Normally in -code(Staff) and code(RhythmicStaff). -dit(code(Timing_engraver)) Responsible for synchronizing timing information -from staffs. Normally in code(Score). In order to create polyrhythmic music, -this engraver should be removed from code(Score) and placed in code(Staff). -dit(code(Tuplet_engraver)) Engraves tuplet brackets? In code(Staff). -dit(code(Vertical_align_engraver)) -) - - -subsubsect(MIDI Types and Performers) - -The types available for MIDI translators are: -description( -dit(code(Performer_group_performer)) -dit(code(Score_performer)) -dit(code(Staff_performer)) -) - -The performers for MIDI translators are: -description( -dit(code(Key_performer)) -dit(code(Time_signature_performer)) -dit(code(Note_performer)) -dit(code(Lyric_performer)) -dit(code(Swallow_performer)) -) - diff --git a/Documentation/topdocs/INSTALL.yo b/Documentation/topdocs/INSTALL.yo index 5dd12b7ffc..0c9e54d424 100644 --- a/Documentation/topdocs/INSTALL.yo +++ b/Documentation/topdocs/INSTALL.yo @@ -243,7 +243,9 @@ nsect(CAVEATS) itemize( it()The -O2 option triggers bugs on various platforms (PowerPC, Alpha). - If you experience problems, you should first try turning off this. + If you experience problems, you should first try turning off + this. +it() On PPC you need at least EGCS-1.1.2f. ) nsect(EXAMPLE) diff --git a/INSTALL.txt b/INSTALL.txt index c7df9a8f55..2b68d258c5 100644 --- a/INSTALL.txt +++ b/INSTALL.txt @@ -1,2995 +1,294 @@ -x T ascii -x res 240 24 40 -x init -p1 -x font 3 B -f3 -s10 -V400 -H144 -tINSTALL -wh24 -t- -wh24 -tcompiling -wh24 -tand -wh24 -tinstalling -wh24 -tGNU -wh24 -tLilyPond -n40 0 -x font 2 I -f2 -V480 -H600 -tHWN -wh24 -t& -wh24 -tJCN -n40 0 -f3 -V600 -H0 -tContents -n40 0 -x font 1 R -f1 -V680 -H120 -t1: -wh24 -tABSTRACT -n40 0 -V720 -H0 -t2: -wh24 -tOBTAINING -n40 0 -V760 -H0 -t3: -wh24 -tPREREQUISITES -n40 0 -V800 -H0 -t4: -wh24 -tRUNNING -n40 0 -V840 -H0 -t5: -wh24 -tWEBSITE -n40 0 -V880 -H0 -t6: -wh24 -tCONFIGURING -wh24 -tand -wh24 -tCOMPILING -n40 0 -V920 -H0 -t7: -wh24 -tCONFIGURING -wh24 -tFOR -wh24 -tMULTIPLE -wh24 -tPLATFORMS -n40 0 -V960 -H0 -t8: -wh24 -tINSTALLING -n40 0 -V1000 -H0 -t9: -wh24 -tREDHAT -wh24 -tLINUX -n40 0 -V1040 -H0 -t10: -wh24 -tDEBIAN -wh24 -tGNU/LINUX -n40 0 -V1080 -H0 -t11: -wh24 -tWINDOWS -wh24 -tNT/95 -n40 0 -V1120 -H0 -t12: -wh24 -tAUTHORS -n40 0 -V2560 -H1440 -n40 0 -V2640 -p2 -x font 1 R -f1 -s10 -V160 -H696 -t-2- -h672 -n40 0 -x font 3 B -f3 -V280 -H0 -t1: -wh24 -tABSTRACT -n40 0 -f1 -V400 -H0 -tThis -wh48 -tdocument -wh48 -texplains -wh48 -twhat -wh24 -tyou -wh24 -tneed -wh24 -tto -wh24 -tinstall -wh24 -tLilyPond, -n40 0 -V440 -H0 -tand -wh24 -twhat -wh24 -tyou -wh24 -tshould -wh24 -tdo. -wh48 -tIf -wh24 -tyou -wh24 -tare -wh48 -tgoing -wh48 -tto -wh48 -tcompile -wh48 -tand -n40 0 -V480 -H0 -tinstall -wh48 -tLilyPond -wh48 -toften, -wh48 -te.g. -wh48 -twhen -wh24 -tdoing -wh24 -tdevelopment, -wh24 -tyou -n40 0 -V520 -H0 -tmight -wh24 -twant -wh24 -tto -wh24 -tcheck -wh24 -tout -wh24 -tthe -wf3 -h24 -tbuildscripts/set-lily.sh -wf1 -h24 -tscript. -n40 0 -V560 -H0 -tIt -wh24 -tsets -wh24 -tsome -wh24 -tenvironment -wh24 -tvariables -wh24 -tand -wh24 -tsymlinks, -wh24 -twhich -wh24 -tcomes -n40 0 -V600 -H0 -tin -wh24 -thandly -wh24 -twhen -wh24 -tyou -wh24 -thave -wh24 -tto -wh24 -tcompile -wh24 -tLilyPond -wh24 -tmore -wh24 -toften. -n40 0 -f3 -V720 -H0 -t2: -wh24 -tOBTAINING -n40 0 -f1 -V840 -H0 -tYou -wh48 -tcan -wh72 -tget -wh72 -tthe -wh72 -tlatest -wh72 -tversion -wh72 -tof -wh72 -tLilyPond -wh72 -tat -n40 0 -V880 -H0 -tftp://ftp.cs.uu.nl/pub/GNU/LilyPond/. -wh72 -tRefer -wh48 -tto -wh48 -tthe -wh24 -tlinks -n40 0 -V920 -H0 -tdocument -wh24 -tfor -wh24 -tmirror -wh24 -tsites. -n40 0 -x font 2 I -f2 -V1000 -H0 -tIf -wh24 -tyou -wh24 -tupgrade -wh24 -tby -wh24 -tpatching -wh24 -tdo -wh48 -tremember -wh48 -tto -wh48 -trerun -wh48 -tautoconf -n40 0 -V1040 -H0 -tafter -wh24 -tapplying -wh24 -tthe -wh24 -tpatch -f1 -t. -n40 0 -f3 -V1160 -H0 -t3: -wh24 -tPREREQUISITES -n40 0 -f1 -V1280 -H0 -tFor -wh24 -tcompilation -wh24 -tyou -wh24 -tneed: -n40 0 -V1400 -H0 -to -h96 -tA -wh24 -tGNU -wh24 -tsystem: -wh24 -tGNU -wh24 -tLilyPond -wh24 -tis -wh24 -tknown -wh24 -tto -wh24 -trun -wh24 -ton -wh24 -tthese -wh24 -tGNU -n40 0 -V1440 -H120 -tsystems: -wh24 -tLinux -wh24 -t(PPC, -wh24 -tintel), -wh48 -tFreeBSD, -wh48 -tAIX, -wh48 -tNeXTStep, -n40 0 -V1480 -H120 -tIRIX, -wh24 -tDigital -wh24 -tUnix -wh24 -tand -wh24 -tSolaris. -n40 0 -V1600 -H0 -to -h96 -tLots -wh48 -tof -wh48 -tdisk -wh24 -tspace: -wh24 -tLilyPond -wh24 -ttakes -wh24 -tbetween -wh24 -t30 -wh24 -tand -wh24 -t100 -n40 0 -V1640 -H120 -tmb -wh24 -tto -wh24 -tcompile -wh24 -tif -wh24 -tyou -wh24 -tuse -wh24 -tdebugging -wh24 -tinformation. -wh48 -tIf -wh24 -tyou -n40 0 -V1680 -H120 -tare -wh48 -tshort -wh48 -ton -wh24 -tdisk-space -wh24 -trun -wh24 -tconfigure -wh24 -twith -wh24 -t--disable- -n40 0 -V1720 -H120 -tdebugging. -n40 0 -V1800 -H120 -tAlthough -wh24 -twe -wh24 -trecommend -wh24 -tto -wh24 -tuse -wh24 -tUnix, -wh24 -tLilyPond -wh24 -tis -wh24 -tknown -wh24 -tto -n40 0 -V1840 -H120 -trun -wh24 -ton -wh24 -tWindows -wh24 -tNT/95/98 -wh24 -tas -wh24 -twell. -wh48 -tSee -wh24 -tSection -wh24 -t11. -n40 0 -V1960 -H0 -to -h96 -tEGCS -wh24 -t1.1 -wh24 -tor -wh24 -tnewer. -n40 0 -V2080 -H0 -to -h96 -tPython -wh72 -t1.5, -wh72 -tCheck -wh72 -tout -wh72 -tftp://ftp.python.org -wh72 -tor -n40 0 -V2120 -H120 -tftp://ftp.cwi.nl/pub/python. -n40 0 -V2240 -H0 -to -h96 -tGUILE -wh72 -t1.3, -wh96 -tcheck -wh72 -tout -wh96 -thttp://www.gnu.org/soft -Chy -h24 -n40 0 -V2280 -H120 -tware/guile/guile.html. -n40 0 -V2560 -H1440 -n40 0 -V2640 -p3 -x font 1 R -f1 -s10 -V160 -H696 -t-3- -h672 -n40 0 -V280 -H0 -to -h96 -tGNU -wh24 -tmake. -wh48 -tCheck -wh24 -tout -wh24 -tftp://ftp.gnu.org. -n40 0 -V400 -H0 -to -h96 -tFlex -wh96 -t(version -wh96 -t2.5.4 -wh72 -tor -wh72 -tnewer). -wh96 -tCheck -wh72 -tout -n40 0 -V440 -H120 -tftp://ftp.gnu.org. -n40 0 -V560 -H0 -to -h96 -tBison -wh72 -t(version -wh72 -t1.25 -wh72 -tor -wh72 -tnewer). -wh120 -tCheck -wh96 -tout -n40 0 -V600 -H120 -tftp://ftp.gnu.org. -n40 0 -V720 -H0 -to -h96 -tYodl. -wh72 -tAll -wh48 -tdocumentation -wh48 -twill -wh48 -tbe -wh24 -tin -wh24 -tYodl. -wh24 -t(1.30.17) -n40 0 -V760 -H120 -tftp://ftp.lilypond.org/pub/yodl -n40 0 -V880 -H0 -to -h96 -tThe -wh24 -tgeometry -wh24 -tpackage -wh24 -tfor -wh24 -tLaTeX -wh24 -tis -wh24 -tneeded -wh24 -tto -wh24 -tuse -wh24 -tly2dvi. -n40 0 -V920 -H120 -tAvailable -wh264 -tat -wh240 -tftp://ftp.ctan.org/tex- -n40 0 -V960 -H120 -tarchive/macros/latex/contrib/supported/geometry -wh48 -tor -wh48 -tat -n40 0 -V1000 -H120 -tmirror -wh24 -tsite -wh24 -tftp://ftp.dante.de -n40 0 -x font 3 B -f3 -V1120 -H0 -t4: -wh24 -tRUNNING -n40 0 -f1 -V1240 -H0 -tGNU -wh48 -tLilyPond -wh24 -tdoes -wh24 -tuse -wh24 -ta -wh24 -tlot -wh24 -tof -wh24 -tresources. -wh24 -tFor -wh24 -toperation -wh24 -tyou -n40 0 -V1280 -H0 -tneed -wh24 -tthe -wh24 -tfollowing -wh24 -tsoftware -n40 0 -V1400 -H0 -to -h96 -tTeX -n40 0 -V1480 -H0 -to -h96 -tA -wh72 -tPostScript -wh72 -tprinter -wh72 -tand/or -wh72 -tviewer -wh72 -t(such -wh72 -tas -n40 0 -V1520 -H120 -tGhostscript) -wh48 -tis -wh48 -tstrongly -wh24 -trecommended. -wh48 -tXdvi -wh24 -twill -wh24 -tshow -n40 0 -V1560 -H120 -tall -wh24 -tembedded -wh24 -tPostScript -wh24 -ttoo -wh48 -tif -wh48 -tyou -wh48 -thave -wh48 -tGhostscript -n40 0 -V1600 -H120 -tinstalled. -n40 0 -V1680 -H0 -to -h96 -tGUILE -wh96 -t1.3, -wh96 -tcheck -wh96 -tout -wh72 -thttp://www.gnu.org/pro -Chy -h24 -n40 0 -V1720 -H120 -tgrams/guile.html -n40 0 -V1800 -H0 -tFor -wh24 -trunning -wh24 -tLilyPond -wh24 -tsuccessfully -wh24 -tyou -wh24 -thave -wh24 -tto -wh24 -thelp -wh48 -tTeX -wh48 -tand -n40 0 -V1840 -H0 -tMetaFont -wh48 -tfind -wh48 -tvarious -wh24 -tfiles. -wh48 -tThe -wh24 -trecommended -wh24 -tway -wh24 -tof -wh24 -tdoing -n40 0 -V1880 -H0 -tso -wh24 -tis -wh24 -tadjusting -wh24 -tthe -wh24 -tenvironment -wh24 -tvariables -wh48 -tin -wh48 -tthe -wh48 -tstart-up -n40 0 -V1920 -H0 -tscripts -wh48 -tof -wh48 -tyour -wh48 -tshell. -wh72 -tAn -wh24 -texample -wh24 -tis -wh24 -tgiven -wh24 -there -wh24 -tfor -wh24 -tthe -n40 0 -V1960 -H0 -tBourne -wh24 -tshell: -n40 0 -V2160 -H120 -texport -wh24 -tMFINPUTS="/usr/local/share/lilypond/mf:" -n40 0 -V2200 -H120 -texport -wh24 -tTEXINPUTS="/usr/local/share/lilypond/tex:/usr/local/share/lilypond/ps:" -n40 0 -V2400 -H0 -tThe -wh24 -tempty -wh24 -tpath -wh24 -tcomponent -wh24 -trepresents -wh48 -tand -wh24 -tMetaFont -Caa -h24 -ts -wh48 -tdefault -n40 0 -V2560 -H1440 -n40 0 -V2640 -p4 -x font 1 R -f1 -s10 -V160 -H696 -t-4- -h672 -n40 0 -V280 -H0 -tsearch -wh48 -tpaths. -wh48 -tScripts -wh24 -twith -wh24 -tthe -wh24 -tproper -wh24 -tpaths -wh24 -tfor -wh24 -tthe -wh24 -tbourne -n40 0 -V320 -H0 -tand -wh72 -tC-shell -wh72 -trespectively -wh72 -tare -wh72 -tgenerated -wh72 -tin -wx font 3 B -f3 -h72 -tbuild -Chy -h24 -n40 0 -V360 -H0 -tscripts/out/lilypond-profile -wf1 -h48 -tand -wf3 -h24 -tbuildscripts/out/lilypond- -n40 0 -V400 -H0 -tlogin -wf1 -h24 -tduring -wh24 -tcompilation. -n40 0 -V480 -H0 -tLilyPond -wh24 -tis -wh24 -ta -wh24 -thideously -wh24 -tslow -wh24 -tprogram. -wh48 -tA -wh24 -tfast -wh24 -tCPU -wh24 -tand -wh24 -tplenty -n40 0 -V520 -H0 -tof -wh24 -tRAM -wh24 -tis -wh24 -trecommended -wh24 -tfor -wh24 -tcomfortable -wh24 -tuse. -n40 0 -f3 -V640 -H0 -t5: -wh24 -tWEBSITE -n40 0 -f1 -V760 -H0 -tIf -wh48 -tyou -wh48 -twant -wh48 -tto -wh48 -tauto-generate -wh24 -tLily -Caa -h24 -ts -wh24 -twebsite, -wh24 -tyou -Caa -h24 -tll -wh24 -tneed -n40 0 -V800 -H0 -tsome -wh24 -tadditional -wh24 -tconversion -wh24 -ttools. -n40 0 -V920 -H0 -to -h96 -txpmtoppm -wh24 -t(from -wh24 -tthe -wh24 -tPortable -wh24 -tBitmap -wh24 -tUtilities) -wh24 -t(For -wh24 -tRed -Chy -h24 -n40 0 -V960 -H120 -tHat -wh48 -tLinux -wh48 -tusers: -wh48 -tit -wh48 -tis -wh48 -tincluded -wh24 -twithin -wh24 -tthe -wh24 -tpackage -n40 0 -V1000 -H120 -tlibgr-progs). -n40 0 -V1080 -H0 -to -h96 -tBib2html -wh24 -thttp://pertsserver.cs.uiuc.edu/~hull/bib2html. -n40 0 -V1120 -H120 -tWhich, -wh24 -tin -wh24 -tturn -wh24 -tdepends -wh24 -ton -wh24 -tman2html -wh24 -tfor -wh24 -tproper -wh24 -tinstalla -Chy -h24 -n40 0 -V1160 -H120 -ttion. -wh72 -tman2html -wh48 -tcan -wh48 -tbe -wh72 -thad -wh72 -tfrom -wh72 -thttp://askdon -Chy -h24 -n40 0 -V1200 -H120 -tald.ask.uni-karlsruhe.de/hppd/hpux/Network -Chy -h24 -n40 0 -V1240 -H120 -ting/WWW/Man2html-1.05. -n40 0 -V1320 -H120 -tTeTeX -wh24 -tusers -wh24 -tshould -wh24 -tnot -wh24 -tforget -wh24 -tto -wh24 -trerun -wh24 -ttexhash. -n40 0 -V1400 -H0 -tBuilding -wh24 -tthe -wh24 -twebsite -wh24 -trequires -wh24 -tpnmtopng. -wh48 -tThe -wh24 -tversion -wh24 -tof -wf3 -h24 -tpnm -Chy -h24 -n40 0 -V1440 -H0 -ttopng -wf1 -h24 -tthat -wh24 -tis -wh24 -tdistributed -wh24 -twith -wh24 -tRedHat -wh24 -t5.1 -wh24 -tand -wh24 -t5.2 -wh24 -tcontains -wh24 -ta -n40 0 -V1480 -H0 -tbug: -wh24 -tpnmtopng -wh24 -tis -wh24 -tdynamically -wh24 -tlinked -wh24 -tto -wh24 -tthe -wh24 -twrong -wh24 -tversion -wh48 -tof -n40 0 -V1520 -H0 -tlibpng. -wh72 -tRecompile -wh48 -tit -wh48 -tfrom -wh24 -tsource, -wh24 -tand -wh24 -tmake -wh24 -tsure -wh24 -tthat -wh24 -tthe -n40 0 -V1560 -H0 -tpnmtopng -wh24 -tbinary -wh24 -tis -wh24 -tlinked -wh24 -tstatically -wh24 -tto -wh24 -tthe -wh24 -tlibpng -wh48 -tthat -wh48 -tis -n40 0 -V1600 -H0 -tincluded -wh48 -tin -wh24 -tlibgr. -wh72 -tRedHat -wh24 -t6.0 -wh24 -tdoes -wh24 -tnot -wh24 -thave -wh24 -tthis -wh24 -tproblem. -n40 0 -V1840 -H144 -ttar -wh24 -txzf -wh24 -tlibgr-2.0.13.tar.gz -n40 0 -V1880 -H264 -tmake -n40 0 -V1920 -H264 -tcd -wh24 -tpng -n40 0 -V1960 -H264 -trm -wh24 -tlibpng.so* -n40 0 -V2000 -H264 -tmake -wh24 -tpnmtopng -n40 0 -V2240 -H0 -tYou -wh24 -tcan -wh24 -tthen -wh24 -tinstall -wh24 -tthe -wh24 -tnew -wh24 -tpnmtopng -wh24 -tinto -wh24 -t/usr/local/bin/ -n40 0 -V2560 -H1440 -n40 0 -V2640 -p5 -x font 1 R -f1 -s10 -V160 -H696 -t-5- -h672 -n40 0 -x font 3 B -f3 -V280 -H0 -t6: -wh24 -tCONFIGURING -wh24 -tand -wh24 -tCOMPILING -n40 0 -f1 -V400 -H0 -tto -wh24 -tinstall -wh24 -tGNU -wh24 -tLilyPond, -wh24 -tsimply -wh24 -ttype: -n40 0 -V640 -H240 -tgunzip -wh24 -t-c -wh24 -tlilypond-x.y.z -wh24 -t| -wh24 -ttar -wh24 -txf -wh24 -t- -n40 0 -V680 -H240 -tcd -wh24 -tlilypond-x.y.z -n40 0 -V720 -H240 -t./configure -h216 -t# -wh24 -tfill -wh24 -tin -wh24 -tyour -wh24 -tstandard -wh24 -tprefix -wh24 -twith -wh24 -t--prefix -n40 0 -V760 -H240 -tmake -n40 0 -V800 -H240 -tmake -wh24 -tinstall -n40 0 -V1040 -H0 -tThis -wh24 -twill -wh24 -tinstall -wh24 -ta -wh24 -tnumber -wh24 -tof -wh24 -tfiles, -wh24 -tsomething -wh24 -tclose -wh24 -tto: -n40 0 -V1280 -H240 -t/usr/local/man/man1/mi2mu.1 -n40 0 -V1320 -H240 -t/usr/local/man/man1/convert-mudela.1 -n40 0 -V1360 -H240 -t/usr/local/man/man1/mudela-book.1 -n40 0 -V1400 -H240 -t/usr/local/man/man1/lilypond.1 -n40 0 -V1440 -H240 -t/usr/local/bin/lilypond -n40 0 -V1480 -H240 -t/usr/local/bin/mi2mu -n40 0 -V1520 -H240 -t/usr/local/share/lilypond/* -n40 0 -V1560 -H240 -t/usr/local/share/locale/{it,nl}/LC_MESSAGES/lilypond.mo -n40 0 -V1800 -H0 -tThe -wh24 -tabove -wh24 -tassumes -wh24 -tthat -wh24 -tyou -wh24 -tare -wh24 -troot -wh24 -tand -wh24 -thave -wh24 -tthe -wh24 -tGNU -wh48 -tdevel -Chy -h24 -n40 0 -V1840 -H0 -topment -wh24 -ttools, -wh24 -tand -wh24 -tyour -wh24 -tmake -wh24 -tis -wh24 -tGNU -wh24 -tmake. -wh48 -tIf -wh24 -tthis -wh24 -tis -wh24 -tnot -wh24 -tthe -n40 0 -V1880 -H0 -tcase, -wh24 -tyou -wh24 -tcan -wh24 -tadjust -wh48 -tyour -wh48 -tenvironment -wh48 -tvariables -wh48 -tto -wh48 -tyour -n40 0 -V1920 -H0 -ttaste: -n40 0 -V2200 -H240 -texport -wh24 -tCPPFLAGS="-I -wh24 -t/home/me/my_include -wh24 -t-DWEIRD_FOOBAR" -n40 0 -V2240 -H240 -t./configure -n40 0 -V2560 -H1440 -n40 0 -V2640 -p6 -x font 1 R -f1 -s10 -V160 -H696 -t-6- -h672 -n40 0 -V280 -H0 -tCPPFLAGS -wh24 -tare -wh24 -tthe -wh24 -tpreprocessor -wh24 -tflags. -n40 0 -V360 -H0 -tThe -wh24 -tconfigure -wh24 -tscript -wh24 -tis -wh24 -tCygnus -wh24 -tconfigure, -wh24 -tand -wh24 -tit -wh24 -twill -wh24 -taccept -n40 0 -x font 3 B -f3 -V400 -H0 -t--help -f1 -t. -wh24 -tIf -wh24 -tyou -wh24 -tare -wh24 -tnot -wh24 -troot, -wh24 -tyou -wh24 -twill -wh24 -tprobably -wh24 -thave -wh24 -tto -wh48 -tmake -n40 0 -V440 -H0 -tit -wh24 -twith -wh24 -ta -wh24 -tdifferent -wf3 -h24 -t--prefix -wf1 -h24 -toption. -wh48 -tOur -wh24 -tfavourite -wh24 -tlocation -n40 0 -V480 -H0 -tis -n40 0 -V760 -H240 -t./configure -wh24 -t--prefix=$HOME/usr -n40 0 -V1000 -H0 -tIn -wh24 -tthis -wh24 -tcase, -wh24 -tyou -wh24 -twill -wh24 -thave -wh24 -tto -wh24 -tset -wh24 -tup -wh24 -tMFINPUTS, -wh48 -tand -wh48 -tTEXIN -Chy -h24 -n40 0 -V1040 -H0 -tPUTS -wh24 -taccordingly. -n40 0 -V1120 -H0 -tSince -wh48 -tGNU -wh48 -tLilyPond -wh48 -tcurrently -wh48 -tis -wh24 -tbeta, -wh24 -tyou -wh24 -tare -wh24 -tadvised -wh24 -tto -n40 0 -V1160 -H0 -talso -wh24 -tuse -n40 0 -V1440 -H240 -t--enable-debugging -n40 0 -V1480 -H240 -t--enable-checking -n40 0 -V1720 -H0 -tOptions -wh24 -tto -wh24 -tconfigure -wh24 -tinclude: -n40 0 -f3 -V1840 -H0 -t--enable-printing -n40 0 -f1 -V1880 -H120 -tEnable -wh24 -tdebugging -wh24 -tprint -wh24 -troutines -wh24 -t(lilypond -wf3 -h24 -t-D -wf1 -h24 -toption) -n40 0 -f3 -V1960 -H0 -t--enable-optimise -n40 0 -f1 -V2000 -H120 -tSet -wh24 -tmaximum -wh24 -toptimisation: -wh24 -tcompile -wh24 -twith -wf3 -h24 -t-O2 -f1 -t. -wh72 -tThis -wh48 -tcan -n40 0 -V2040 -H120 -tbe -wh48 -tunreliable -wh48 -ton -wh48 -tsome -wh24 -tcompiler/platform -wh24 -tcombinations -n40 0 -V2080 -H120 -t(eg, -wh24 -tDEC -wh24 -tAlpha -wh24 -tand -wh24 -tPPC) -n40 0 -f3 -V2160 -H0 -t--enable-profiling -n40 0 -f1 -V2200 -H120 -tCompile -wh24 -twith -wh24 -tsupport -wh24 -tfor -wh24 -tprofiling. -n40 0 -f3 -V2280 -H0 -t--enable-config -n40 0 -f1 -V2320 -H120 -tOutput -wh24 -tto -wh24 -ta -wh24 -tdifferent -wh24 -tconfiguration -wh24 -tfile. -wh72 -tNeeded -wh48 -tfor -n40 0 -V2360 -H120 -tmulti-platform -wh24 -tbuilds -n40 0 -V2560 -H1440 -n40 0 -V2640 -p7 -x font 1 R -f1 -s10 -V160 -H696 -t-7- -h672 -n40 0 -V280 -H0 -tAll -wh48 -toptions -wh24 -tare -wh24 -tdocumented -wh24 -tin -wh24 -tthe -wx font 3 B -f3 -h24 -tconfigure -wf1 -h24 -thelp -wh24 -tThe -wh24 -toption -n40 0 -f3 -V320 -H0 -t--enable-optimise -wf1 -h24 -tis -wh24 -trecommended -wh24 -tfor -wh24 -tReal -wh24 -tLife -wh24 -tusage. -n40 0 -V400 -H0 -tIf -wh24 -tyou -wh24 -tdo -n40 0 -V680 -H240 -tmake -wh24 -tall -n40 0 -V920 -H0 -teverything -wh24 -twill -wh24 -tbe -wh24 -tcompiled, -wh24 -tbut -wh24 -tnothing -wh24 -twill -wh24 -tbe -wh48 -tinstalled. -n40 0 -V960 -H0 -tThe -wh48 -tresulting -wh48 -tbinaries -wh48 -tcan -wh24 -tbe -wh24 -tfound -wh24 -tin -wh24 -tthe -wh24 -tsubdirectories -n40 0 -f3 -V1000 -H0 -tout/ -wf1 -h24 -t(which -wh24 -tcontain -wh24 -tall -wh24 -tfiles -wh24 -tgenerated -wh24 -tduring -wh24 -tcompilation). -n40 0 -f3 -V1120 -H0 -t7: -wh24 -tCONFIGURING -wh24 -tFOR -wh24 -tMULTIPLE -wh24 -tPLATFORMS -n40 0 -f1 -V1240 -H0 -tIf -wh24 -tyou -wh24 -twant -wh24 -tto -wh24 -tcompile -wh24 -tLilyPond -wh24 -twith -wh24 -tdifferent -wh24 -tconfiguration -n40 0 -V1280 -H0 -tsettings, -wh24 -tthen, -wh24 -tyou -wh48 -tcan -wh48 -tuse -wh48 -tthe -wf3 -h48 -t--enable-config -wf1 -h48 -toption. -n40 0 -V1320 -H0 -tExample: -wh48 -tsuppose -wh24 -tI -wh24 -twant -wh24 -tto -wh24 -tbuild -wh24 -twith -wh24 -tand -wh72 -twithout -wh24 -tprofil -Chy -h24 -n40 0 -V1360 -H0 -ting. -wh48 -tThen -wh24 -tI -Caa -h24 -td -wh24 -tuse -wh24 -tthe -wh24 -tfollowing -wh24 -tfor -wh24 -tthe -wh24 -tnormal -wh24 -tbuild, -n40 0 -V1640 -H264 -t./configure -wh24 -t--prefix=~ -wh24 -t--disable-optimise -wh24 -t--enable-checking -n40 0 -V1680 -H264 -tmake -n40 0 -V1720 -H264 -tmake -wh24 -tinstall -n40 0 -V1960 -H0 -tand -wh24 -tfor -wh24 -tthe -wh24 -tprofiling -wh24 -tversion, -wh24 -tI -wh24 -tspecify -wh24 -ta -wh24 -tdifferent -wh24 -tconfig -Chy -h24 -n40 0 -V2000 -H0 -turation. -n40 0 -V2560 -H1440 -n40 0 -V2640 -p8 -x font 1 R -f1 -s10 -V160 -H696 -t-8- -h672 -n40 0 -V280 -H264 -t./configure -wh24 -t--prefix=~ -wh24 -t--enable-profiling -wh24 -t--enable-config=optprof -wh24 -t--enable-optimise -wh24 -t--disable-checking -n40 0 -V320 -H264 -tmake -wh24 -tconfig=optprof -n40 0 -V360 -H264 -tmake -wh24 -tconfig=optprof -wh24 -tinstall -n40 0 -x font 3 B -f3 -V640 -H0 -t8: -wh24 -tINSTALLING -n40 0 -f1 -V760 -H0 -tIf -wh24 -tyou -wh24 -thave -wh24 -tdone -wh24 -ta -wh24 -tsuccessful -wh24 -tmake, -wh24 -tthen -wh24 -ta -wh24 -tsimple -n40 0 -V1040 -H240 -tmake -wh24 -tinstall -n40 0 -V1280 -H0 -tshould -wh24 -tdo -wh24 -tthe -wh24 -ttrick. -n40 0 -V1360 -H0 -tIf -wh24 -tyou -wh24 -tare -wh24 -tdoing -wh24 -tan -wh24 -tupgrade, -wh24 -tplease -wh24 -tremember -wh24 -tto -wh24 -tremove -wh24 -tobso -Chy -h24 -n40 0 -V1400 -H0 -tlete -wf3 -h24 -t.pk -wf1 -h24 -tand -wf3 -h24 -t.tfm -wf1 -h24 -tfiles -wh24 -tof -wh24 -tthe -wh24 -tfonts. -wh72 -tA -wh48 -tscript -wh48 -thas -wh48 -tbeen -n40 0 -V1440 -H0 -tprovided -wh24 -tto -wh24 -tdo -wh24 -tthe -wh24 -twork -wh24 -tfor -wh24 -tyou, -wh24 -tsee -wf3 -h24 -tbin/clean-fonts.sh -f1 -t. -n40 0 -f3 -V1560 -H0 -tCAVEATS -n40 0 -f1 -V1720 -H0 -to -h96 -tThe -wh48 -t-O2 -wh48 -toption -wh72 -ttriggers -wh72 -tbugs -wh24 -ton -wh24 -tvarious -wh24 -tplatforms -n40 0 -V1760 -H120 -t(PowerPC, -wh24 -tAlpha). -wh72 -tIf -wh48 -tyou -wh48 -texperience -wh48 -tproblems, -wh48 -tyou -n40 0 -V1800 -H120 -tshould -wh24 -tfirst -wh24 -ttry -wh48 -tturning -wh24 -toff -wh24 -tthis. -n40 0 -f3 -V1920 -H0 -tEXAMPLE -n40 0 -f1 -V2040 -H0 -tThis -wh24 -tis -wh24 -twhat -wh24 -tI -wh24 -ttype -wh24 -tin -wh24 -tmy -wh24 -txterm: -n40 0 -V2560 -H1440 -n40 0 -V2640 -p9 -x font 1 R -f1 -s10 -V160 -H696 -t-9- -h672 -n40 0 -V280 -H240 -tlilypond -wh24 -tsomeinput.ly -n40 0 -V320 -H240 -ttex -wh24 -tsomeinput.tex -n40 0 -V360 -H240 -txdvi -wh24 -tsomeinput& -n40 0 -V600 -H0 -tThis -wh24 -tis -wh24 -twhat -wh24 -tthe -wh24 -toutput -wh24 -tlooks -wh24 -tlike -wh24 -tover -wh24 -there: -n40 0 -V880 -H240 -tGNU -wh24 -tLilyPond -wh24 -t0.0.78 -wh24 -t#4/FlowerLib -wh24 -t1.1.24 -wh24 -t#0 -n40 0 -V920 -H240 -tParsing -wh24 -t... -wh24 -t[/home/hw/share/lilypond/init// -n40 0 -V960 -H360 -t<..etc..> -n40 0 -V1000 -H360 -tinit//performer.ly]]][input/kortjakje.ly] -n40 0 -V1040 -H240 -tCreating -wh24 -telements -wh24 -t...[8][16][24][25] -n40 0 -V1080 -H240 -tPreprocessing -wh24 -telements... -n40 0 -V1120 -H240 -tCalculating -wh24 -tcolumn -wh24 -tpositions -wh24 -t... -wh24 -t[14][25] -n40 0 -V1160 -H240 -tPostprocessing -wh24 -telements... -n40 0 -V1200 -H240 -tTeX -wh24 -toutput -wh24 -tto -wh24 -tsomeinput.tex -wh24 -t... -n40 0 -V1240 -H240 -tCreating -wh24 -tMIDI -wh24 -telements -wh24 -t...MIDI -wh24 -toutput -wh24 -tto -wh24 -tsomeinput.midi -wh24 -t... -n40 0 -V1360 -H240 -thw:~/musix/spacer$ -wh24 -txdvi -wh24 -tsomeinput& -n40 0 -V1400 -H240 -t[1] -wh24 -t855 -n40 0 -V1640 -H0 -tCheck -wh24 -tout -wh24 -tthe -wh24 -tinput -wh24 -tfiles, -wh24 -tsome -wh24 -tof -wh24 -tthem -wh24 -thave -wh24 -tcomments -wh24 -tPlease -n40 0 -V1680 -H0 -trefer -wh24 -tto -wh24 -tthe -wh24 -tman -wh24 -tpage -wh24 -tfor -wh24 -tmore -wh24 -tinformation. -n40 0 -x font 3 B -f3 -V1800 -H0 -t9: -wh24 -tREDHAT -wh24 -tLINUX -n40 0 -f1 -V1920 -H0 -tRedHat -wh24 -tLinux -wh24 -tusers -wh24 -tcan -wh24 -tcompile -wh24 -tan -wh24 -tRPM. -wh24 -tA -wh48 -tspec -wh48 -tfile -wh48 -tis -wh48 -tin -n40 0 -f3 -V1960 -H0 -tmake/out/lilypond.spec -f1 -t, -wh48 -tit -wh48 -tis -wh48 -tdistributed -wh48 -talong -wh24 -twith -wh24 -tthe -n40 0 -V2000 -H0 -tsources. -n40 0 -V2080 -H0 -tYou -wh24 -tcan -wh24 -tmake -wh24 -tthe -wh24 -trpm -wh24 -tby -wh24 -tissuing -n40 0 -V2560 -H1440 -n40 0 -V2640 -p10 -x font 1 R -f1 -s10 -V160 -H672 -t-10- -h672 -n40 0 -V280 -H240 -trpm -wh24 -t-tb -wh24 -tlilypond-x.y.z.tar.gz -n40 0 -V320 -H240 -trpm -wh24 -t-i -wh24 -t/usr/src/redhat/RPMS/i386/lilypond-x.y.z -n40 0 -V560 -H0 -tPrecompiled -wh72 -ti386 -wh72 -teRedHat -wh72 -tRPMS -wh72 -tare -wh72 -tavailable -wh72 -tfrom -n40 0 -V600 -H0 -thttp://linux.umbc.edu/software/lilypond/rpms/. -n40 0 -x font 3 B -f3 -V720 -H0 -t10: -wh24 -tDEBIAN -wh24 -tGNU/LINUX -n40 0 -f1 -V840 -H0 -tA -wh48 -tDebian -wh48 -tpackage -wh48 -tis -wh48 -talso -wh48 -tavailable; -wh24 -tcontact -wh24 -tAnthony -wh24 -tFok -n40 0 -V880 -H0 -tfoka@debian.org -wh24 -t. -wh48 -tThe -wh24 -tbuild -wh24 -tscripts -wh24 -tare -wh24 -tin -n40 0 -V920 -H0 -tthe -wh24 -tsubdirectory -wf3 -h24 -tdebian/ -f1 -t. -n40 0 -f3 -V1040 -H0 -t11: -wh24 -tWINDOWS -wh24 -tNT/95 -n40 0 -f1 -V1160 -H0 -tSeparate -wh24 -tinstructions -wh24 -ton -wh24 -tbuilding -wh24 -tfor -wh24 -tW32 -wh24 -tare -wh24 -tavaible -wh24 -tin -wh24 -tthe -n40 0 -V1200 -H0 -tfile -wh24 -tREADME-W32.yo. -n40 0 -f3 -V1320 -H0 -t12: -wh24 -tAUTHORS -n40 0 -f1 -V1440 -H0 -tHan-Wen -wh24 -tNienhuys -wh24 -t -n40 0 -V1520 -H0 -tJan -wh24 -tNieuwenhuizen -wh24 -t -n40 0 -V1600 -H0 -tHave -wh24 -tfun! -n40 0 -V2560 -H1440 -n40 0 -x trailer -V2640 -x stop + +TITLE INFORMATION: INSTALL - compiling and installing GNU LilyPond +AUTHOR INFORMATION: HWN & JCN + +Contents + +1: ABSTRACT +2: OBTAINING +3: PREREQUISITES +4: RUNNING +5: WEBSITE +6: CONFIGURING and COMPILING +7: CONFIGURING FOR MULTIPLE PLATFORMS +8: INSTALLING +9: REDHAT LINUX +10: DEBIAN GNU/LINUX +11: WINDOWS NT/95 +12: AUTHORS + +1: ABSTRACT + +This document explains what you need to install LilyPond, and what you +should do. If you are going to compile and install LilyPond often, +e.g. when doing development, you might want to check out the +buildscripts/set-lily.sh script. It sets some environment +variables and symlinks, which comes in handly when you have to compile +LilyPond more often. + +2: OBTAINING + +You can get the latest version of LilyPond at +ftp://ftp.cs.uu.nl/pub/GNU/LilyPond/. Refer to the links +document for mirror sites. + +If you upgrade by patching do remember to rerun autoconf after +applying the patch. + +3: PREREQUISITES + +For compilation you need: + +o A GNU system: GNU LilyPond is known to run on these GNU systems: Linux + (PPC, intel), FreeBSD, AIX, NeXTStep, IRIX, Digital Unix and +Solaris. + +o Lots of disk space: LilyPond takes between 30 and 100 mb to +compile if you use debugging information. If you are short on +disk-space run configure with --disable-debugging. + +Although we recommend to use Unix, LilyPond is known to run on Windows +NT/95/98 as well. See Section [w32]. + +o EGCS 1.1 or newer. + +o Python 1.5, +Check out +ftp://ftp.python.org or ftp://ftp.cwi.nl/pub/python. + +o GUILE 1.3, check out http://www.gnu.org/software/guile/guile.html. + +o GNU make. +Check out ftp://ftp.gnu.org. + +o Flex (version 2.5.4 or newer). +Check out ftp://ftp.gnu.org. + +o Bison (version 1.25 or newer). +Check out ftp://ftp.gnu.org. + +o Yodl. All documentation will be in Yodl. (1.30.17) +ftp://ftp.lilypond.org/pub/yodl + +o The geometry package for LaTeX is needed to use ly2dvi. +Available at +ftp://ftp.ctan.org/tex-archive/macros/latex/contrib/supported/geometry +or at mirror site ftp://ftp.dante.de + +4: RUNNING + +GNU LilyPond does use a lot of resources. For operation you need the +following software + +o TeX +o A PostScript printer and/or viewer (such as Ghostscript) is strongly + recommended. Xdvi will show all embedded PostScript too if you have + Ghostscript installed. +o GUILE 1.3, check out http://www.gnu.org/programs/guile.html + +For running LilyPond successfully you have to help TeX and MetaFont +find various files. The recommended way of doing so is adjusting the +environment variables in the start-up scripts of your shell. An +example is given here for the Bourne shell: +export MFINPUTS="/usr/local/share/lilypond/mf:" +export TEXINPUTS="/usr/local/share/lilypond/tex:/usr/local/share/lilypond/ps:" + +The empty path component +represents TeX and MetaFont's default search paths. Scripts with +the proper paths for the bourne and C-shell respectively are generated in +buildscripts/out/lilypond-profile and +buildscripts/out/lilypond-login during compilation. + +LilyPond is a hideously slow program. A fast CPU and plenty of RAM is +recommended for comfortable use. + +5: WEBSITE + +If you want to auto-generate Lily's website, you'll need some additional +conversion tools. + +o xpmtoppm (from the Portable Bitmap Utilities) (For RedHat Linux + users: it is included within the package libgr-progs). +o Bib2html http://pertsserver.cs.uiuc.edu/~hull/bib2html. + Which, in turn depends on man2html for proper installation. +man2html can be had from http://askdonald.ask.uni-karlsruhe.de/hppd/hpux/Networking/WWW/Man2html-1.05. + + TeTeX users should not forget to rerun texhash. + +Building the website requires pnmtopng. The version of pnmtopng +that is distributed with RedHat 5.1 and 5.2 contains a bug: pnmtopng +is dynamically linked to the wrong version of libpng. Recompile it +from source, and make sure that the pnmtopng binary is linked +statically to the libpng that is included in libgr. RedHat 6.0 does +not have this problem. + + tar xzf libgr-2.0.13.tar.gz + make + cd png + rm libpng.so* + make pnmtopng + +You can then install the new pnmtopng into /usr/local/bin/ + +6: CONFIGURING and COMPILING + +to install GNU LilyPond, simply type: + + gunzip -c lilypond-x.y.z | tar xf - + cd lilypond-x.y.z + ./configure # fill in your standard prefix with --prefix + make + make install + +This will install a number of files, something close to: + + /usr/local/man/man1/mi2mu.1 + /usr/local/man/man1/convert-mudela.1 + /usr/local/man/man1/mudela-book.1 + /usr/local/man/man1/lilypond.1 + /usr/local/bin/lilypond + /usr/local/bin/mi2mu + /usr/local/share/lilypond/* + /usr/local/share/locale/{it,nl}/LC_MESSAGES/lilypond.mo + +The above assumes that you are root and have the GNU development +tools, and your make is GNU make. If this is not the case, you can +adjust your environment variables to your taste: + + export CPPFLAGS="-I /home/me/my_include -DWEIRD_FOOBAR" + ./configure + +CPPFLAGS are the preprocessor flags. + +The configure script is Cygnus configure, and it will accept +--help. If you are not root, you will probably have to make it +with a different --prefix option. Our favourite location is + + ./configure --prefix=$HOME/usr + +In this case, you will have to set up MFINPUTS, and TEXINPUTS accordingly. + +Since GNU LilyPond currently is beta, you are advised to also use + + --enable-debugging + --enable-checking + +Options to configure include: + +o --enable-printing + Enable debugging print routines (lilypond -D option) +o --enable-optimise + Set maximum optimisation: compile with -O2. This can be +unreliable on some compiler/platform combinations (eg, DEC Alpha and PPC) +o --enable-profiling + Compile with support for profiling. +o --enable-config + Output to a different configuration file. Needed for multi-platform + builds + +All options are documented in the configure help +The option --enable-optimise is recommended for Real Life usage. + +If you do + + make all + +everything will be compiled, but nothing will be installed. The +resulting binaries can be found in the subdirectories out/ (which +contain all files generated during compilation). + +7: CONFIGURING FOR MULTIPLE PLATFORMS + +If you want to compile LilyPond with different configuration settings, +then, you can use the --enable-config option. Example: suppose I +want to build with and without profiling. Then I'd use the +following for the normal build, + + ./configure --prefix=~ --disable-optimise --enable-checking + make + make install + +and for the profiling version, I specify a different configuration. + + ./configure --prefix=~ --enable-profiling --enable-config=optprof --enable-optimise --disable-checking + make config=optprof + make config=optprof install + +8: INSTALLING + +If you have done a successful make, then a simple + + make install + +should do the trick. + +If you are doing an upgrade, please remember to remove obsolete +.pk and .tfm files of the fonts. A script has been +provided to do the work for you, see bin/clean-fonts.sh. + +CAVEATS + +o The -O2 option triggers bugs on various platforms (PowerPC, Alpha). + If you experience problems, you should first try turning off + this. +o On PPC you need at least EGCS-1.1.2f. + +EXAMPLE + +This is what I type in my xterm: + + lilypond someinput.ly + tex someinput.tex + xdvi someinput& + +This is what the output looks like over here: + + GNU LilyPond 0.0.78 #4/FlowerLib 1.1.24 #0 + Parsing ... [/home/hw/share/lilypond/init// + <..etc..> + init//performer.ly]]][input/kortjakje.ly] + Creating elements ...[8][16][24][25] + Preprocessing elements... + Calculating column positions ... [14][25] + Postprocessing elements... + TeX output to someinput.tex ... + Creating MIDI elements ...MIDI output to someinput.midi ... + + hw:~/musix/spacer$ xdvi someinput& + [1] 855 + +Check out the input files, some of them have comments +Please refer to the man page for more information. + +9: REDHAT LINUX + +RedHat Linux users can compile an RPM. A spec file is in +make/out/lilypond.spec, it is distributed along with the +sources. + +You can make the rpm by issuing + + rpm -tb lilypond-x.y.z.tar.gz + rpm -i /usr/src/redhat/RPMS/i386/lilypond-x.y.z + +Precompiled i386 eRedHat RPMS are available from +http://linux.umbc.edu/software/lilypond/rpms/. + +10: DEBIAN GNU/LINUX + +A Debian package is also available; contact Anthony Fok +. The build scripts are in the subdirectory +debian/. + +11: WINDOWS NT/95 + +Separate instructions on building for W32 are avaible +in the file README-W32.yo. + +12: AUTHORS + +Han-Wen Nienhuys + +Jan Nieuwenhuizen + +Have fun! diff --git a/NEWS b/NEWS index fd4812c871..25c143f79d 100644 --- a/NEWS +++ b/NEWS @@ -1,23 +1,41 @@ ---- ../lilypond-1.1.52.gp1/NEWS Fri Jul 2 21:08:04 1999 -++ b/NEWS Mon Jul 5 15:05:33 1999 -@@ -1,3 +1,5 @@ -pl 52.gp2 - - hyphens between syllables of lyrics: - pl 52.gp1 - - bf: make doc++ corrected to only include *.h and *.hh files. - ************--- ../lilypond-1.1.52.mb1/NEWS Thu Jul 1 00:53:02 1999 -++ b/NEWS Sat Jul 3 23:11:12 1999 -@@ -1,3 +1,8 @@ + +pl 52.jcn3 + - bf: mi2mu: midi without key + - try at grace-performer-group; breaks MIDI output even when no \grace + - silly tie-performer + - performers play_element () delayed to do_pre_move_processing () + +pl 52.jcn2 + - bfs standchen + grace, gnossienne-4 + - decoupled midi output from input + +pl 52.jcn1 + - bf: moved accidental code from Key_engraver to Key_change_req + - bf: midi-key + - bfs: mi2mu: core-dumps, keys, key-names, key-changes, notenames + +pl 52.hwn2 + - new-beaming.cc: new beaming code + * now does [c8. c32 c32] correct by itself. + * beam over barlines + * non-fitting stems handled gracefully (eg. [c8 c4 c8] ) + - junked rhythmic grouping, \grouping and all associated bits. + - bf: do try_visibility_lambda for nonbreakable items as well (fixes \nobreak on barline) + - bf: Cons_list::truncate() + +pl 52.hwn1 + - repeat-engraver cleanup +pl 52.gp1 + - bf: make doc++ corrected to only include *.h and *.hh files. pl 52.mb2 - Added \repetitions: prints symbol for repeated bars. Same syntax as multi-measure rests! - Added \segno and \wheel script symbols +pl 52.mb3 + - Added barSize property. Junked barsize variable. - pl 52.mb1 - - clean-fonts using kpsepath - - bf: volta brackets broken over several lines get open end.pl 52.gp1 - - bf: make doc++ corrected to only include *.h and *.hh files. ************ +i pl 51.uu2 - grace note flags, move Lookup::flag into Stem - faq updates: doc++, Matt's page diff --git a/PATCHES.txt b/PATCHES.txt index 55e1a71ea7..800a025cf6 100644 --- a/PATCHES.txt +++ b/PATCHES.txt @@ -1,135 +1,125 @@ NAME - PATCHES - track and distribute your code changes +PATCHES - track and distribute your code changes DESCRIPTION - This page documents how to distribute your changes to -GNU lilypond +This page documents how to distribute your changes to GNU lilypond ABSTRACT - We would like to have unified context diffs with full -pathnames. A script automating supplied with Lily. Dis- -tributing a change normally goes like this: +We would like to have unified context diffs with full pathnames. A +script automating supplied with Lily. -o make your fix/add your code + Distributing a change normally +goes like this: -o Add changes to NEWS, and add yourself to Documenta- - tion/AUTHORS.yo - -o generate a patch, - -o e-mail your patch to one of the mailing lists gnu- - music-discuss@gnu.org or bug-gnu-music@gnu.org +o make your fix/add your code +o Add changes to NEWS, and add yourself to Documentation/AUTHORS.yo +o generate a patch, +o e-mail your patch to one of the mailing lists + gnu-music-discuss@gnu.org or bug-gnu-music@gnu.org GENERATING A PATCH - In VERSION, set MY_PATCH_LEVEL: +In VERSION, set MY_PATCH_LEVEL: - VERSION: - ... - MY_PATCH_LEVEL=jcn1 + VERSION: + ... + MY_PATCH_LEVEL=jcn1 In NEWS, enter a summary of changes: - NEWS: - pl 0.1.73.jcn1 - - added PATCHES.yo + NEWS: + pl 0.1.73.jcn1 + - added PATCHES.yo Then, from the top of Lily's source tree, type - make dist - make diff + make dist + make diff -which rolls the tarball ../releases/lilypond-0.1.73.tar.gz -and leaves your patch as ./lilypond-0.1.73.jcn1.diff. [1] -We assume that there is a tarball lilypond-0.1.73.tar.gz in -the directory ../releases. +which rolls the tarball ../releases/lilypond-0.1.73.tar.gz +and leaves your patch as ./lilypond-0.1.73.jcn1.diff. + ('Make diff' generates a patch between two tarballs. For +more info type 'make diff help=='.) We assume that there is a tarball +lilypond-0.1.73.tar.gz in the directory ../releases. If you didn't configure Lily using --srcdir, you can do: - make release + make release - tar-ball: ../patches/lilypond-0.1.73.jcn1.gz - patch: ../patches/lilypond-0.1.73.jcn1.gz - updeet: ../test/updeet + tar-ball: ../patches/lilypond-0.1.73.jcn1.gz + patch: ../patches/lilypond-0.1.73.jcn1.gz + updeet: ../test/updeet PREREQUISITES For creating a patch you need -o All items mentioned in INSTALL. You're not going to - send a patch that you haven't even built, right? - -o GNU diff +o All items mentioned in INSTALL. You're not going to send a patch + that you haven't even built, right? +o GNU diff +o Python (version 1.5 or newer). + You can of course make a patch by hand, which would go something like: -o Python (version 1.5 or newer). You can of course make - a patch by hand, which would go something like: + make distclean + cd .. + diff -urN lilypond-0.1.73 lilypond-0.1.73.jcn1 > lilypond-0.1.73.jcn1 ------------ -[1] 'Make diff' generates a patch between two tar- -balls. For more info type 'make diff help=='. +but there are handy python scripts available. If you're doing development, +you'll need Python for other LilyPond scripts anyway. - make distclean - cd .. - diff -urN lilypond-0.1.73 lilypond-0.1.73.jcn1 > lilypond-0.1.73.jcn1 +o The Lily directory structure, which looks like: - but there are handy python scripts available. If - you're doing development, you'll need Python for other - LilyPond scripts anyway. + doos/ # gnu/windows32 build and binary releases + harmonia -> harmonia-x.y.z + harmonia-x.y.z/ + lilypond -> lilypond-x.y.z # symlink to development directory + lilypond-x.y.z/ # current development + patches/ # patches between different releases + RedHat/BUILD # RedHat build and binary releases + RedHat/RPMS + RedHat/SPECS + releases/ # .tar.gz releases + test/ # tarballs and diffs from current version + yodl -> yodl-1.30.17 + yodl-1.30.17 -o The Lily directory structure, which looks like: +with prefix $HOME/usr/src +and (for building rpms only) in $HOME/.rpmrc: - doos/ # gnu/windows32 build and binary releases - harmonia -> harmonia-x.y.z - harmonia-x.y.z/ - lilypond -> lilypond-x.y.z # symlink to development directory - lilypond-x.y.z/ # current development - patches/ # patches between different releases - RedHat/BUILD # RedHat build and binary releases - RedHat/RPMS - RedHat/SPECS - releases/ # .tar.gz releases - test/ # tarballs and diffs from current version - yodl -> yodl-1.30.17 - yodl-1.30.17 - - with prefix $HOME/usr/src and (for building rpms only) - in $HOME/.rpmrc: - - topdir: /home/fred/usr/src/RedHat + topdir: /home/fred/usr/src/RedHat APPLYING PATCHES -If you're following LilyPond development regularly, you -probably want to download just the patch for each subsequent -release. After downloading the patch (into the patches -directory, of course), simply apply it: +If you're following LilyPond development regularly, you probably want to +download just the patch for each subsequent release. +After downloading the patch (into the patches directory, of course), simply +apply it: - gzip -dc ../patches/lilypond-0.1.74.diff.gz | patch -p1 -E + gzip -dc ../patches/lilypond-0.1.74.diff.gz | patch -p1 -E and don't forget to make automatically generated files: - autoconf footnote(patches don't include automatically generated files, - i.e. file(configure) and files generated by file(configure).) + autoconf footnote(patches don't include automatically generated files, + i.e. file(configure) and files generated by file(configure).) - configure + configure SYNCHRONISE -If you're not very quick with sending your patch, there's a -good chance that an new release of LilyPond comes available. -In such a case, the maintainer will probably ask you to make -a new patch against the latest release. Your best bet is to -download the latest release, and apply your patch against -this new source tree: - - cd lilypond-0.1.74 - gzip -dc ../patches/lilypond-0.1.73.jcn1.diff.gz | patch -p1 -E - autoconf - configure +If you're not very quick with sending your patch, there's a good +chance that an new release of LilyPond comes available. In such a +case, the maintainer will probably ask you to make a new patch against +the latest release. Your best bet is to download the latest release, +and apply your patch against this new source tree: + + cd lilypond-0.1.74 + gzip -dc ../patches/lilypond-0.1.73.jcn1.diff.gz | patch -p1 -E + autoconf + configure Then, make a patch as shown above. diff --git a/README.txt b/README.txt index be3bd2a836..e96abe18a2 100644 --- a/README.txt +++ b/README.txt @@ -1,91 +1,82 @@ - This is the toplevel README to LilyPond +TITLE INFORMATION: This is the toplevel README to LilyPond -LilyPond is the GNU Project music typesetter. This program -can print beautiful sheet music from a music definition -file. It can also play mechanical performances to a MIDI -file. Features include multiple staffs, meters, clefs, -keys, lyrics, versatile input language, cadenzas, beams, -slurs, triplets, named chords, transposing, formatting -scores, part extraction. It includes a nice font of musical -symbols. + LilyPond is the GNU Project music typesetter. This program can print +beautiful sheet music from a music definition file. It can also play +mechanical performances to a MIDI file. Features include multiple +staffs, meters, clefs, keys, lyrics, versatile input language, cadenzas, +beams, slurs, triplets, named chords, transposing, formatting scores, +part extraction. It includes a nice font of musical symbols. 1: VERSIONING -LilyPond uses a versioning scheme similar to the Linux ker- -nel. In a version "x.y.z", an even second number 'y' -denotes a stable version. For development versions 'y' is -odd. For using straightforward score production, please use -the latest stable version. Development versions may not -produce good or nice scores. +LilyPond uses a versioning scheme similar to the Linux kernel. In a +version "x.y.z", an even second number 'y' denotes a stable version. +For development versions 'y' is odd. For using straightforward score +production, please use the latest stable version. Development versions +may not produce good or nice scores. 2: REQUIREMENTS -For the compilation and running of LilyPond you need some -additional packages. Please refer to the installation -instructions. +For the compilation and running of LilyPond you need some additional +packages. Please refer to the installation instructions. -NOTE: If you downloaded a binary (.rpm or a W95/NT .zip -file), then you don't have to compile LilyPond. +NOTE: If you downloaded a binary (.rpm or a W95/NT .zip file), then +you don't have to compile LilyPond. 3: INSTALLATION -For your convenience, a formatted copy of the INSTALL -instructions are in the toplevel directory, as INSTALL.txt +For your convenience, a formatted copy of the INSTALL instructions are +in the toplevel directory, as INSTALL.txt -The process is fairly straightforward, but chances are that -you have to specify directories for to configure: this is -done with the options --enable-tex-dir and --enable-mf-dir +The process is fairly straightforward, but chances are that you have +to specify directories for TeX to configure: this is done with +the options --enable-tex-dir and --enable-mf-dir 4: DOCUMENTATION The real documentation is the directory Documentation/ -To generate the pretty-printed docs, you have to run config- -ure first, and then do this: +To generate the pretty-printed docs, you have to run configure first, +and then do this: -make doc + make doc -You can also simply read the .yo sources. They are ASCII -text. The complete documentation is accessible in formatted -form at the website http://www.cs.uu.nl/people/hanwen/lily- -pond/index.html +You can also simply read the .yo sources. They are ASCII text. +The complete documentation is accessible in formatted form at the +website http://www.cs.uu.nl/people/hanwen/lilypond/index.html 5: COMMENTS -LilyPond is a long way from finished and polished. We do -appreciate criticism, comments, bugreports, patches, etc. +LilyPond is a long way from finished and polished. We do appreciate +criticism, comments, bugreports, patches, etc. - Please send your e-mail to one of the MAILING LISTS + Please send your e-mail to one of the MAILING LISTS -and not to us personally. See Documentation/links.yo for -more info. +and not to us personally. See Documentation/links.yo for more info. 6: WINDOWS 32 -If you have received this file as part of a DOS/Window32 -distribution (LilyPond-*.zip), then it is advisable to also -download the source package, since it might contain more -documentation ftp://ftp.cs.uu.nl/pub/GNU/LilyPond/ +If you have received this file as part of a DOS/Window32 distribution +(LilyPond-*.zip), then it is advisable to also download the source +package, since it might contain more documentation +ftp://ftp.cs.uu.nl/pub/GNU/LilyPond/ -If you decide to build LilyPond from source, please read the -INSTALL.txt document first, especially the Windows NT/95 -section. +If you decide to build LilyPond from source, please read the INSTALL.txt +document first, especially the Windows NT/95 section. 7: CAVEATS -* Please read the file BUGS for some ugly bugs. +* Please read the file BUGS for some ugly bugs. -* If you have installed a previous version, be sure to -remove old font files, eg +* If you have installed a previous version, be sure to remove old font +files, eg +rm `find /var/lib/texmf/fonts -name 'feta*'` - rm `find /var/lib/texmf/fonts -name 'feta*'` - -a script to do this for you is in buildscripts/clean- -fonts.sh +a script to do this for you is in buildscripts/clean-fonts.sh 8: CDROM DISTRIBUTIONS -If you have received LilyPond on a cdrom, chances are that -development has moved a some patchlevels up. Please check -the latest version of LilyPond before reporting bugs. +If you have received LilyPond on a cdrom, chances are that development +has moved a some patchlevels up. Please check the latest version of +LilyPond before reporting bugs. diff --git a/TODO b/TODO index 9ed49271f0..776239db00 100644 --- a/TODO +++ b/TODO @@ -15,28 +15,10 @@ Grep for TODO and ugh/ugr/urg. . * header for PS enteredby = "bla " . * ps/lily.ps see comments. . * didot / big point. -. * midi key. . * fix singleStaffBracket . * declare performers in \midi . * check EGCS version . * input/test/stem-spacing.ly: 12/4 touches first note -. * timesig: sometimes bottom digit too high -. * [ ] -. * I'm using lilypond version 1.1.50 and have a problem with repeat/alternative. -I tried this code - - \time 4/4; - \repeat semi 2 - { - \partial 4; f'8 g' | a'4 a'8 a'4 g'8 f'4 | f' d'8 c'( )c'2 | - f'4 f' - } - \alternative - { - { [g'8 f'] g' a'( | )a'2 r4 } - { \partial 2; [g'8 f'] e' f'( | )f'2 r2 } - } -. * fix MIDI . * \shape 1st dim skipped? . * turn slope-damping on/off . * We need feta-din*.mf files for more sizes than 10. @@ -60,6 +42,7 @@ preMudelaExample[eps]{}, and change it in document body sometimes. a circle, not a quarter tied to a sixteenth. is this at all possible with lily? . * grace_align_item -> stackingdir = left, weird placement. +. * grace before triplet, see standchen . * tuplets that are written as "number : note", for example "3 : [image of a half note here]". possible? @@ -78,13 +61,13 @@ preMudelaExample[eps]{}, and change it in document body sometimes. . * Stem . * Rhythmic_column and interaction stem/rhythmic_column/note_head/dots. . * Slur -. * Rhythmic_grouping . * Duration . * clef engraver . * parser .* TODO before 1.2 . * Grace_slur_engraver. +. * Break_req handling is silly (break_forbid () + \break fucks up.) . * Morally pure LilyPond. . * Remove non-free software links. . * Remove meta article LilyPond. @@ -112,12 +95,6 @@ preMudelaExample[eps]{}, and change it in document body sometimes. . * make "in-between" engraver (Tie, Extender) . * make wide_spanner_engraver (line_group_spanner, staff_symbol) . * do scaled fonts generally -. * The Lilypond accidental symbols are available through the TeX macros, -\textflat, \textsharp and \textnatural defined in the init file -lilyponddefs.tex. All the symbols are defined in the files fetaXX.tex -where XX corresponds to the size. I don't know where (or even if) they -are installed but they are generated in the mf/out/ directory during the -compilation. . * make dependencies () a virtual function. . * store req -> element, element -> element causes for warnings . * include examples in RPM. @@ -137,17 +114,11 @@ compilation. . * Staff_margin (with a partial measure.) . * fix convert-mudela manpage . * decimal point in \paper {} -. * { \voiceone [g''8 fis'' e''] d''4 |} - and - { \voicetwo d'4 d'2.*2/3 } spacing -. * tied notes for MIDI -. * sharp / flat on trills (in MIDI ??) . * scm-ify \property values. . * move class Lookup {} into scm . * msgfmt -o check? . * add new glyphs to font.ly . * formatting of input stuff. -. * \notes{ a \< b \cr } vs \notes{ a \< b \! } . * broken scripts: lbheel = \script { "bheel" 0 0 -1 0 0 } rbheel = \script { "bheel" 0 0 1 0 0 } @@ -157,12 +128,10 @@ compilation. rfheel = \script { "fheel" 0 0 1 0 0 } lftoe = \script { "ftoe" 0 0 -1 0 0 } rftoe = \script { "ftoe" 0 0 1 0 0 } - and also - portato= \script { "portato" 0 -1 0 1 0 } -. * ly2dvi -. * bottomnote for ly2dvi . * deps for ly2dvi +. * decide wether to junk _ in lyrics. + .* STUFF . * compulsory hshift . * @@ -229,7 +198,6 @@ repeated section with different words for each repeat. * { a4 a16 } c <-- duration of c? * < a4 b8 > c <-- duration of c? . * \tempo 4. = 90; -. * fix audio-items (don't use (input) requests, but copy data) . * make sure all ex's have a mudela-version . * do rest-collisions for Multi_measure_rests as well. . * split error/warning in error/warning/non_fatal_error @@ -244,7 +212,7 @@ repeated section with different words for each repeat. . * add full cello suites to web site (kom op, Maarten!) . * add mudela-book-doc source to webstie. . * Rethink Time_description -\cadenza , \meter, \grouping should all be \properties +\cadenza , \meter, should all be \properties . * fix singleStaffBracket . * rename . * measure -> bar @@ -265,7 +233,6 @@ which is irritating. touching it. . * put errorlevel in Input class . * junk nesting slurs -. * integrate midi-elts from mi2mu and lily? . * distinguish between unset and empty properties. .* FONT @@ -311,6 +278,8 @@ touching it. assert (feof (f)) . * tetex: mfplain.mem +. * timesig: sometimes bottom digit too high: Xdvi doesn't handle + newly created fonts correctly. .* 3RD PARTY PROJECTS: . * make GCC warn about ctor that leaves member vars uninitialised. . * GNU patch @@ -383,6 +352,8 @@ languages: . * SMDL? . * add to MIDI output: +. * tied notes for MIDI +. * sharp / flat on trills (in MIDI ??) . * tempo change . * ornaments (and trills?) . * slurs @@ -420,7 +391,6 @@ hesitate to ask. . * account for rhythmic position in measure . * etc. -. * accidentals per Voice_group . * Output class, handles : (smallish) . * help text /(c) notice? @@ -456,12 +426,9 @@ hesitate to ask. . * Glissando . * trill -. * Rewrite Stem, Beam and Rhythmic_grouping (hairy) -. * [c8. c32 c32] -. * doc on Rhythmic_grouping +. * Rewrite Stem, Beam (hairy) . * general shaving on Beam and Stem . * use plet grouping -. * separate visual from rhythmic info even more . * beams over bars . * lines: @@ -517,8 +484,6 @@ hesitate to ask. .* SMALLISH PROJECTS -. * Faulenzer sign (% repeat). Perhaps also use \repeat syntax? - . * fix confusing naming in Engraver vs Engraver_group_engraver (context) . * progress when creating MIDI elts. diff --git a/VERSION b/VERSION index a69ab678e9..d06e719920 100644 --- a/VERSION +++ b/VERSION @@ -1,8 +1,8 @@ PACKAGE_NAME=LilyPond MAJOR_VERSION=1 MINOR_VERSION=1 -PATCH_LEVEL=52 -MY_PATCH_LEVEL=gp2 +PATCH_LEVEL=53 +MY_PATCH_LEVEL= # use the above to send patches: MY_PATCH_LEVEL is always empty for a # released version. diff --git a/buildscripts/set-lily.sh b/buildscripts/set-lily.sh index 8d79a65668..7371d675a6 100755 --- a/buildscripts/set-lily.sh +++ b/buildscripts/set-lily.sh @@ -53,6 +53,7 @@ showln -sf $LILYPOND_SOURCEDIR/lily/out/lilypond $prefix/bin/lilypond showln -sf $LILYPOND_SOURCEDIR/mi2mu/out/mi2mu $prefix/bin/mi2mu showln -sf $LILYPOND_SOURCEDIR/scripts/out/ly2dvi $prefix/bin/ly2dvi showln -sf $LILYPOND_SOURCEDIR/scripts/out/mudela-book $prefix/bin/mudela-book +showln -sf $LILYPOND_SOURCEDIR/buildscripts/out/genheader $prefix/bin/genheader chmod 755 $LILYPOND_SOURCEDIR/buildscripts/ps-to-gifs.sh showln -sf $LILYPOND_SOURCEDIR/buildscripts/ps-to-gifs.sh $prefix/bin/ps-to-gifs diff --git a/flower/include/array.hh b/flower/include/array.hh index 10f38ec0bf..d6349588aa 100644 --- a/flower/include/array.hh +++ b/flower/include/array.hh @@ -185,6 +185,23 @@ public: } + + T& boundary (int dir, int idx) + { + assert (dir); + if (dir == 1) + return top (idx); + else + return elem_ref (idx); + } + T boundary (int dir, int idx) const + { + assert (dir); + if (dir == 1) + return top (idx); + else + return elem (idx); + } void swap (int i,int j) { T t ((*this)[i]); diff --git a/flower/include/array.icc b/flower/include/array.icc index be8e95d680..8b876ce85d 100644 --- a/flower/include/array.icc +++ b/flower/include/array.icc @@ -25,8 +25,10 @@ arrcpy (T*dest, T*src, int count) #ifdef __powerpc__ { /* - urg: wierd egcs-1.1.2 bug on ppc + urg: wierd egcs-1.1.2-12c (stock LinuxPPC R5) bug on ppc bug report filed + fixed in egcs-1.1.2-12f + ftp://dev.linuxppc.org/users/fsirl/R5/RPMS/ppc/ */ *dest = *src; dest++, src++; diff --git a/flower/include/cons.hh b/flower/include/cons.hh index 8fd58acb7f..266b9ce51c 100644 --- a/flower/include/cons.hh +++ b/flower/include/cons.hh @@ -106,6 +106,10 @@ public: head_ =0; nil_pointer_address_ = &head_; } + void append (T *c) + { + append (new Cons (c,0)); + } void append (Cons *c) { assert (!c->next_); @@ -124,6 +128,24 @@ public: return ::remove_cons (pp); } + + /// junk everything after the first I elements. + void truncate (int i) + { + Cons **p = &head_; + for (; *p && i; p = &((*p)->next_)) + { + i--; + } + + if (*p) + { + delete *p; + *p = 0; + } + nil_pointer_address_ = p; + } + void junk () { delete head_; diff --git a/input/bugs/Overture.ly b/input/bugs/Overture.ly index 99c37f13aa..93ba0bc43e 100644 --- a/input/bugs/Overture.ly +++ b/input/bugs/Overture.ly @@ -4,7 +4,7 @@ composer = "Johann Christoph Faber"; piece = "1. Overture"; } -\version "1.0.21"; +\version "1.1.52"; global=\notes{ \time 2/2; diff --git a/input/bugs/foo.ly b/input/bugs/foo.ly deleted file mode 100644 index 5c158b32e7..0000000000 --- a/input/bugs/foo.ly +++ /dev/null @@ -1,9 +0,0 @@ - -\score {\notes { - c2. - c1 - \grace { [c32 d] } - c4 - - -}} diff --git a/input/bugs/grouping.fly b/input/bugs/grouping.fly deleted file mode 100644 index ca109804ea..0000000000 --- a/input/bugs/grouping.fly +++ /dev/null @@ -1,2 +0,0 @@ - -[bes:16 e e e] diff --git a/input/bugs/nobreak.ly b/input/bugs/nobreak.ly deleted file mode 100644 index 0636efd789..0000000000 --- a/input/bugs/nobreak.ly +++ /dev/null @@ -1,2 +0,0 @@ - -\score { \context Staff \notes { c1 \nobreak c1 }} diff --git a/input/bugs/rep.ly b/input/bugs/rep.ly deleted file mode 100644 index a6739d325e..0000000000 --- a/input/bugs/rep.ly +++ /dev/null @@ -1,14 +0,0 @@ -\score{ - < - \context Staff \notes\relative c'{ - c4 d e f - \repeat semi 3 { g a b c } - \alternative { { c b a g } { f e d c } } c c c c -% \alternative { { c b a g } { f e d c } { c d e f } } - g g g g - \repeat semi 2 { c c c c } - \repeat semi 2 { c c c c } - g g g g - } - > -} diff --git a/input/bugs/semirepeat.ly b/input/bugs/semirepeat.ly new file mode 100644 index 0000000000..70928d8a91 --- /dev/null +++ b/input/bugs/semirepeat.ly @@ -0,0 +1,5 @@ +\score { \notes\context Staff\relative c'' { + +% less alts than body +\repeat semi 4 { c^"4$\\times$ 2alt" d } \alternative { e f } \repeat "semi" 2 c4 +}} diff --git a/input/bugs/spacing.ly b/input/bugs/spacing.ly index 47fb626f7c..ddd2903abc 100644 --- a/input/bugs/spacing.ly +++ b/input/bugs/spacing.ly @@ -1,9 +1,9 @@ \score { - \notes \transpose c''{ c\longa*1/4 c\breve*1/2 c1 c2 c4 c8 c16 c32 c64 } + \notes \transpose c'' \context Staff { c\longa*1/4 c\breve*1/2 c1 c2 c4 c8 c16 c32 c64 } \paper { \translator { \StaffContext - \remove "Staff_symbol_engraver"; + % \remove "Staff_symbol_engraver"; \remove "Time_signature_engraver"; \remove "Bar_engraver"; \remove "Clef_engraver"; diff --git a/input/bugs/sv.ly b/input/bugs/sv.ly index a25db83a26..a3856eb934 100644 --- a/input/bugs/sv.ly +++ b/input/bugs/sv.ly @@ -1,5 +1,7 @@ - +% +% Jan -> dit is Auto_B_E bug, niet grouping bug. +% \score{ \notes{ \time 13/8; diff --git a/input/bugs/threads.ly b/input/bugs/threads.ly deleted file mode 100644 index 845fea6b6b..0000000000 --- a/input/bugs/threads.ly +++ /dev/null @@ -1,201 +0,0 @@ -%K1 -rh = {\property Thread.noteHeadStyle = ""} -lh = {\property Thread.noteHeadStyle = "diamond"} -\score { -\notes { -\context Staff = staffOne < -\property Staff.numberOfStaffLines = "11" -%\property Staff.timeSignatureStyle = "C" -\keysignature bes; -\time 4/4; -\clef alto; -\context ThreadedVoice = vOne < -\context Thread=tOne{ -\stemup \slurup -%1 -\rh [d''16 e'' f'' g''][a'' a' cis'' a'] d''4. e''8| -%2 -[f''16 d'' g'' e''][a'' f'' e'' d''][cis''8 a''] a''4^\prall~ -%3 -[a''16 g'' f'' e''][d'' c'' bes' a'][bes'8 \lh g''] g''4^\prall~ -%4 -[g''16 f'' e'' d''][c'' bes' a' g'][a'8 \rh f''] f''4^\prall~ -%5 -[f''16 e'' d'' c''][bes' a' g' f'][g'8 \lh e''] e''4^\prall~ -%6 -[e''16 d'' cis'' b'][a' g' f' \rh e'] [f' d' g' e'][a' f' e' d']| -%7 -[cis'16 a d' b][e' cis' f' d'][g' e' a' f'][b' g' cis'' a']| -%8 -[d''16 b' e'' cis''][f'' d'' g'' e''] a''4 g''^\prall| -%9 -\lh a''4 g''^\prall \rh a'' g''^\prall| -%10 -[f''16 d'' g'' e''][a'' f'' e'' d''] [cis'' a' d'' b'][e'' g' f' e']| -%11 -[f'16 d' g' e'][a' f' e' d'][cis' a d' b][e' cis' f' d']| -%12 -[g'16 g' f' e'][f'8 g'16^\prall f'32 g'][a'16 e' f' d'][e' cis' \lh f'8]| -%13 -[e'8 d'] cis'16 s8. s2 \bar "||"; -%14 -\rh [a'16 b' cis'' d''][e'' cis'' f'' d''] e''4. a'8| -%15 -[b'16 g' cis'' a'][d'' b' e'' cis''][fis'' d'' g'' e''][a'' c'' bes' a']| -%16 -[bes'16 g' c'' a'][d'' bes' a' g'][fis' d' g' e'][a' c' bes a]| -%17 -\lh [bes16 g c' a][d' bes e' c'][f' d' g' e'][a' f' bes' g']| -%18 -\rh c''4 bes'^\prall \lh c'' bes'^\prall| -%19 -\rh [c''8 f''][bes' e''][a'16 f' c'' a'][f'' c'' a'' f'']| -%20 -[e''16 g'' c'' e''][g' c'' bes' a'] \lh [bes' g' d'' bes'][g'' d'' bes'' g'']| -%21 -[f''16 a'' d'' f''][a' d'' c'' b'] \rh [c'' a' e'' c''][a'' e'' c''' a'']| -%22 -[gis''16 b'' e'' gis''][b' d'' cis'' b'][cis''8 a''] a''4^\prall^"\\textflat"~ -%23 -[a''16 g'' f'' e''][d'' c'' \lh bes' a'] [bes'8 \rh g''] g''4^\prall~ -%24 -[g''16 f'' e'' d''][c'' bes' \lh a' g'][a'8 \rh f''] f''4^\prall~ -%25 -[f''16 e'' d'' c''][bes' a' \lh g' f'][g'8 \rh e''] e''4^\prall~ -%26 -[e''16 d'' cis'' b'][a' g' f' e'] [f' d' g' e'][a' f' bes' g']| -%27 -\lh [f'16 d' g' e'][a' f' bes' g'] \rh [f' d' g' e'][a' f' bes' g']| -%28 -[a'8 d''][g' cis''] \lh [a' f''][g' e'']| -%29 -\rh [a'8 d''][g' e''][f'16 d' g'16 e'][a' f' b' g']| -%30 -[cis''16 a' d'' e''][f'' d'' e'' cis''][d'' a' bes' g'][a' f' \lh bes'8]| -%31 -[a'8 g'] f'16 s8. s2 \bar "|."; -} -\context Thread=tTwo{ -s1*9| -%10 -d''16 s4.. a'16 s4..| -%11 -d'16 s2...| -s1*3| -%15 -s2 d''16 s4..| -%16 -g'16 s4.. d'16 s4..| -s1*2| -%19 -s8 \rh a'' s g'' s2| -s1*8 -%28 -s8 f'' s e'' s d'' s cis''| -%29 -s8 f'' s cis'' -}> -\context ThreadedVoice = vTwo < -\context Thread=tThree{ -\stemdown \slurdown -%1 -\lh s2 [d'16 e' f' g'][a' a cis' a]| -%2 -[d'8 e' f' g'][a' a' a' a']| -%3 -[a'8 a' a' f'][g \rh bes' bes' bes']| -%4 -[g'8 g' g' e'][f \lh a' f' a']| -%5 -[d'8 f' d' d'][e \rh g' g' g']| -%6 -[e'8 e' e' a] [d' \lh e f g]| -%7 -a8 s [cis' d'][e' f'][g' a']| -%8 -[b'8 cis''][d'' e''][f''16 d'' bes' g'][e'' cis'' a' cis'']| -%9 -\rh [f''16 d'' bes' g'][e'' cis'' a' cis''] \lh [f'' d'' bes' g'][e'' cis'' a' cis'']| -%10 -[d'8 e' f' g'][a b cis' a]| -%11 -[d8 e f g][a b][cis' d']| -%12 -[e16 e' d' cis'][d'8 bes] \stemup a,4 \stemdown s8 \rh [d'16 b]| -%13 -[cis'16 a b gis][a16 e cis e] \lh \stemup a,4^\prall^"\\textnatural" r^\fermata| -%14 -\stemdown s2 [a16 b cis' d'][e' cis' f' d']| -%15 -[g'8 a'][b' cis''][d' e' fis' d']| -%16 -[g8 a bes c'][d e fis d]| -%17 -\rh [g8 a][bes c'][d' e'][f' g']| -%18 -\lh [a'16 f' d' bes][g' e' c' e'] \rh [a' f' d' bes][g' e' c' e']| -%19 -\lh [a'16 f' d' bes][g' e' c' e'][f'8 f f f,]| -%20 -[c8 c' c' fis'] \rh [g' g g g,]| -%21 -[d8 d' d' gis'] \lh [a' a a a,]| -%22 -[e8 e, e, e,][a, a' a' a']| -%23 -[f,8 a' a' f'][\rh g, \lh bes' bes' bes']| -%24 -[e,8 e' g' e'][\rh f, \lh a' a' a']| -%25 -[d,8 f' f' d'][\rh e, \lh g' g' g']| -%26 -[a,8 a e' a] [d' e'][f' g']| -%27 -[d'8 e'][f' g'] \rh [d' e'][f' g']| -%28 -\lh [f'16 d' bes g][e' cis' a cis'] \rh [f' d' bes g][e' cis' a cis']| -%29 -\lh [f'16 d' bes g][e' cis' a cis'][d8 e][f g]| -%30 -[a8 g a a,] \stemup d4 \stemdown s8 \rh [g'16 e']| -%31 -[f'16 d' e' cis'][d'16 a f a] \lh \stemup d4^\prall r4^\fermata| -} -\context Thread=tFour{ -s1*2| -%3 -\lh f'8 f' f' s4 \rh g'8 g' g'| -%4 -e'8 e' e' s4 \lh f'8 a' f'| -%5 -f'8 d' f' s4 \rh e'8 e' e'| -%6 -a8 a a s d s4.| -s1*16| -%23 -\lh s8 f' f' s4 g'8 g' g'| -%24 -s8 g' e' s4 f'8 f' f'| -%25 -s8 d' d' s4 e'8 e' e'| -%26 -s8 e' a s s2| -s1*2| -%29 -s2 d'8 -}> -\context ThreadedVoice = vThree < -\context Thread=tFive{ -\stemdown \slurdown -s1*25| -%26 -\stemup s2 \rh d''4 s| -%27 -\lh d''4 s \rh d''4 -}> ->} -\paper{barsize=50.0; indent=0.0; -\translator {\VoiceContext beamAuto=0; \remove Auto_beam_engraver;} -\translator {\StaffContext \consists Bar_number_engraver;} - \translator {\VoiceContext \remove Tuplet_engraver;} -}} diff --git a/input/bugs/unfold-many.ly b/input/bugs/unfold-many.ly deleted file mode 100644 index 0b1bedbc2b..0000000000 --- a/input/bugs/unfold-many.ly +++ /dev/null @@ -1,12 +0,0 @@ -\score{ - \context Staff \notes\relative c'{ - % compare this to 'semi' with numbered voltas: - % 1-3: alternative 1 - % 4: alternative 2 - \repeat unfold 4 { g a b c } - \alternative { - { c c c c } - { d d d d } - } - } -} diff --git a/input/bugs/unfold.ly b/input/bugs/unfold.ly deleted file mode 100644 index be41b7f906..0000000000 --- a/input/bugs/unfold.ly +++ /dev/null @@ -1,5 +0,0 @@ -\score{ - \context Staff \notes\relative c'{ - \repeat unfold 4 { g a b c }%\alternative {c1 d e f} - } -} diff --git a/input/example-3.ly b/input/example-3.ly index 950f45ab57..753fd8faca 100644 --- a/input/example-3.ly +++ b/input/example-3.ly @@ -1,4 +1,4 @@ -\version "1.0.21"; +\version "1.1.52"; one = \notes\relative c{ c'' d e f diff --git a/input/just-friends.ly b/input/just-friends.ly index b08f6f3176..dfd40560bb 100644 --- a/input/just-friends.ly +++ b/input/just-friends.ly @@ -57,4 +57,4 @@ of a certain tune (Jazz, Real Book, for example), like } } -\version "1.0.21"; +\version "1.1.52"; diff --git a/input/keys.ly b/input/keys.ly index 66e95fd41b..5a12cc0bb0 100644 --- a/input/keys.ly +++ b/input/keys.ly @@ -1,4 +1,4 @@ -\version "1.0.21"; +\version "1.1.52"; blah = \notes { diff --git a/input/kortjakje.ly b/input/kortjakje.ly index e88af13ef3..9e06348b70 100644 --- a/input/kortjakje.ly +++ b/input/kortjakje.ly @@ -10,7 +10,7 @@ copyright = "public domain"; Tested Features: example file with comments %} -\version "1.0.21"; +\version "1.1.52"; % the % is a comment. diff --git a/input/part.ly b/input/part.ly index a0f60f576b..b07f963591 100644 --- a/input/part.ly +++ b/input/part.ly @@ -1,4 +1,4 @@ -\version "1.0.21"; +\version "1.1.52"; part = \notes { c-1 c c c r1*3 diff --git a/input/pedal.ly b/input/pedal.ly index 514fee0325..905715b6c9 100644 --- a/input/pedal.ly +++ b/input/pedal.ly @@ -28,7 +28,7 @@ % \lbheel \lbheel \lfheel \lftoe % \rbheel \rbtoe \rfheel \rftoe -\version "1.0.21"; +\version "1.1.52"; \score{ \notes { diff --git a/input/praeludium-fuga-E.ly b/input/praeludium-fuga-E.ly index 1742c1286e..214795e22d 100644 --- a/input/praeludium-fuga-E.ly +++ b/input/praeludium-fuga-E.ly @@ -23,7 +23,7 @@ * organ staff... %} -\version "1.0.21"; +\version "1.1.52"; diff --git a/input/rhythm.ly b/input/rhythm.ly index b0de5a90bd..53198954a3 100644 --- a/input/rhythm.ly +++ b/input/rhythm.ly @@ -7,7 +7,7 @@ TestedFeatures = "multiple meters, beaming, unsynced bars, userdefd engravers"; -\version "1.0.21"; +\version "1.1.52"; ritme = \notes\transpose c'' { \time 4/4; @@ -19,7 +19,7 @@ ritme = \notes\transpose c'' { \time 5/16; % divide measure in 5 equal parts. Usually it 2+3 or 3+2 - \grouping 16*5 ; + [c8 c16 c8 ] | % watch THIS! \times 5/4 { [ c16 c16 c16 c16] } | \time 2/8; diff --git a/input/scales.ly b/input/scales.ly index 18ae6a9844..a4ea103048 100644 --- a/input/scales.ly +++ b/input/scales.ly @@ -16,7 +16,7 @@ copyright = "public domain"; % scales with accents. % -\version "1.0.21"; +\version "1.1.52"; blah = \notes { \time 6/8; \transpose c { diff --git a/input/scripts.ly b/input/scripts.ly index a78e1f8c25..92d4a624af 100644 --- a/input/scripts.ly +++ b/input/scripts.ly @@ -1,5 +1,5 @@ -\version "1.0.21"; +\version "1.1.52"; blah = \notes{ \transpose c'' { diff --git a/input/star-spangled-banner.ly b/input/star-spangled-banner.ly index 49a0e4f3c9..ef7324b2ca 100644 --- a/input/star-spangled-banner.ly +++ b/input/star-spangled-banner.ly @@ -118,4 +118,4 @@ global = \notes { } -\version "1.0.21"; +\version "1.1.52"; diff --git a/input/test/alphabet.ly b/input/test/alphabet.ly index 361ec08752..9d72e6a90a 100644 --- a/input/test/alphabet.ly +++ b/input/test/alphabet.ly @@ -121,4 +121,4 @@ xxx\break } } -\version "1.0.21"; +\version "1.1.52"; diff --git a/input/test/ass-extra-voice.ly b/input/test/ass-extra-voice.ly new file mode 100644 index 0000000000..c7c57badd7 --- /dev/null +++ b/input/test/ass-extra-voice.ly @@ -0,0 +1,94 @@ +global = \notes { + \key a \minor; + \time 6/4; +% \skip 1.*34; +% \bar ".|"; +} + +melody = \notes\relative c''{ + r2 r r + r2 r r + r4 a'8-- \< a-- a-- a-- c-- \!b-- a--\> gis f \!e + es8 \grace b c r4 r2 r +} + +basloopje = \notes\relative c{ + d,8( a' d f a d f d a f d )a +} + +accompany = \notes \relative c{ + \notes\relative c \basloopje + \notes\relative c \basloopje + \notes\relative c \basloopje + \notes\relative c \basloopje +} + +\score{ + \notes{ + \context AutoSwitchGrandStaff \relative c < + \global + \context Staff=upper { + \context Voice=foo + \property Voice.verticalDirection = 1 + \property Voice.scriptVerticalDirection = 1 + \melody + } + \context AutoSwitchContext \accompany + > + } + + \paper { + gourlay_maxmeasures = 4.; + indent = 8.\mm; + textheight = 295.\mm; + + % no slur damping + slur_slope_damping = 100.0; + + \translator{ + \StaffContext + % don't auto-generate bars: not a good idea: -> no breakpoints + % barAuto = "0"; + % urg defaultBarType = ""; + defaultBarType = "empty"; + \remove "Time_signature_engraver"; + } + \translator{ + \GraceContext + \remove "Local_key_engraver"; + } + \translator { + \ScoreContext + \accepts AutoSwitchGrandStaff; + } + \translator{ + \type "Engraver_group_engraver"; + \name AutoSwitchGrandStaff; + \consists "Span_bar_engraver"; + \consists "Vertical_align_engraver"; + \consists "Piano_bar_engraver"; + \consistsend "Axis_group_engraver"; + minVerticalAlign = 2.*\staffheight; + maxVerticalAlign = 2.*\staffheight; + switcherName = "Voice"; + acceptorName = "Thread"; + staffContextName = "Staff"; + + \accepts "AutoSwitchContext"; + \accepts "Staff"; + slurVerticalDirection = 1; + verticalDirection = -1; + beamAutoEnd = "1/2"; + } + \translator { + \type "Engraver_group_engraver"; + \name "AutoSwitchContext"; + \consists "Staff_switching_translator"; + } + } +% broken 1.1.51.hwn2 +% \midi { +% \tempo 4 = 54; +% } +} + diff --git a/input/test/auto-staff-switch.ly b/input/test/auto-staff-switch.ly index 627447148d..ddf2b840be 100644 --- a/input/test/auto-staff-switch.ly +++ b/input/test/auto-staff-switch.ly @@ -35,4 +35,4 @@ }} -\version "1.0.21"; +\version "1.1.52"; diff --git a/input/test/bar-scripts.ly b/input/test/bar-scripts.ly index 0eebd74cab..640fb0df69 100644 --- a/input/test/bar-scripts.ly +++ b/input/test/bar-scripts.ly @@ -1,5 +1,5 @@ -\version "1.0.21"; +\version "1.1.52"; onestaff = \context Staff = foo\notes { \property Staff.instr = instr diff --git a/input/test/beam-chord.ly b/input/test/beam-chord.ly index d9553639b5..6362e8c1f4 100644 --- a/input/test/beam-chord.ly +++ b/input/test/beam-chord.ly @@ -1,4 +1,4 @@ -\version "1.0.21"; +\version "1.1.52"; \score{ \notes\transpose c'{ diff --git a/input/test/beam-interstaff.ly b/input/test/beam-interstaff.ly index 41e0adc669..287ff990f3 100644 --- a/input/test/beam-interstaff.ly +++ b/input/test/beam-interstaff.ly @@ -30,4 +30,4 @@ } } -\version "1.0.21"; +\version "1.1.52"; diff --git a/input/test/beam-isknee.ly b/input/test/beam-isknee.ly index 342b553526..a3b35770fb 100644 --- a/input/test/beam-isknee.ly +++ b/input/test/beam-isknee.ly @@ -21,4 +21,4 @@ } } -\version "1.0.21"; +\version "1.1.52"; diff --git a/input/test/beam-pos.ly b/input/test/beam-pos.ly index 6d2abe6cb4..ad0f619d21 100644 --- a/input/test/beam-pos.ly +++ b/input/test/beam-pos.ly @@ -1,4 +1,4 @@ -\version "1.0.21"; +\version "1.1.52"; \score{ \notes\transpose c''{ diff --git a/input/test/beaming.ly b/input/test/beaming.ly new file mode 100644 index 0000000000..cba2132db8 --- /dev/null +++ b/input/test/beaming.ly @@ -0,0 +1,20 @@ + +\score { \context Staff \notes \relative c'' { + [c8. c16] + [c8. c16 c8. c16] + [c16 c8.] | + [c8. c16 c16 c8.] + [c8. c32 c32] + [c8 c8] | + [c16 c16] + [c32 c32] + [c64 c64] + c32 + [c8 c,4 c'8] % should warn here! + [c8 c c] c8 % over barline + [c16 c8 c16] + [c32 c16 c16 c16 c32] + [c32 c16 c8 c32] % hmm ? + + }} + diff --git a/input/test/beams.ly b/input/test/beams.ly index 819c9cdffe..fa773dd69c 100644 --- a/input/test/beams.ly +++ b/input/test/beams.ly @@ -6,7 +6,7 @@ copyright = "PD"; TestedFeatures = "beams and beamflags"; } -\version "1.0.21"; +\version "1.1.52"; \score{ < diff --git a/input/test/breathing-sign.ly b/input/test/breathing-sign.ly index 9cc99442af..541a817623 100644 --- a/input/test/breathing-sign.ly +++ b/input/test/breathing-sign.ly @@ -1,4 +1,4 @@ -\version "1.0.21"; +\version "1.1.52"; \score { \notes \relative c' { diff --git a/input/test/broken.ly b/input/test/broken.ly index 7c87350096..d7403184e4 100644 --- a/input/test/broken.ly +++ b/input/test/broken.ly @@ -5,7 +5,7 @@ TestedFeatures = "This file tests Feta embedded slurs" + "(Feta definitively is not an abbreviation of Font-En-TjA)"; } -\version "1.0.21"; +\version "1.1.52"; shortlong = \notes{ c4()c( c c | diff --git a/input/test/chord-inversion.ly b/input/test/chord-inversion.ly index e2d63ff9c2..0c9b3f6f98 100644 --- a/input/test/chord-inversion.ly +++ b/input/test/chord-inversion.ly @@ -22,4 +22,4 @@ inversions = \notes\transpose c''\chords{ > } -\version "1.0.21"; +\version "1.1.52"; diff --git a/input/test/chord-table.ly b/input/test/chord-table.ly index e31e92a57e..907782915f 100644 --- a/input/test/chord-table.ly +++ b/input/test/chord-table.ly @@ -41,4 +41,4 @@ tab = \notes\transpose c'''\chords{ } -\version "1.0.21"; +\version "1.1.52"; diff --git a/input/test/chords.ly b/input/test/chords.ly index dda0de434d..44e92b17a7 100644 --- a/input/test/chords.ly +++ b/input/test/chords.ly @@ -1,4 +1,4 @@ -\version "1.0.21"; +\version "1.1.52"; %{ Would this be acceptable/good enough/convenient for entry? diff --git a/input/test/clefs.ly b/input/test/clefs.ly index de74c39138..cd97e9815f 100644 --- a/input/test/clefs.ly +++ b/input/test/clefs.ly @@ -1,4 +1,4 @@ -\version "1.0.21"; +\version "1.1.52"; \score { \notes{ diff --git a/input/test/collisions.ly b/input/test/collisions.ly index 9c8e46f3d8..1e8796cc5f 100644 --- a/input/test/collisions.ly +++ b/input/test/collisions.ly @@ -5,7 +5,7 @@ enteredby = "HWN,JCN"; copyright = "public domain"; Tested = "test the Collision resolution "; } -\version "1.0.21"; +\version "1.1.52"; twovoice = \context Staff \notes < \context Voice=i { \stemdown c4 d e f g2~ g4 a [c8 d e f] c2| } diff --git a/input/test/defaultbars.ly b/input/test/defaultbars.ly index 664d0bc54d..2997c12deb 100644 --- a/input/test/defaultbars.ly +++ b/input/test/defaultbars.ly @@ -1,4 +1,4 @@ -\version "1.0.21"; +\version "1.1.52"; \score { diff --git a/input/test/denneboom.ly b/input/test/denneboom.ly index f0105edf90..3579f8d3d6 100644 --- a/input/test/denneboom.ly +++ b/input/test/denneboom.ly @@ -7,7 +7,7 @@ TestedFeatures = "This file tests silly line shapes"; \include "paper20.ly" -\version "1.0.21"; +\version "1.1.52"; oden = \lyrics{ O8 | diff --git a/input/test/dotted-slur.ly b/input/test/dotted-slur.ly index 1504b5bc12..5050baddbc 100644 --- a/input/test/dotted-slur.ly +++ b/input/test/dotted-slur.ly @@ -1,4 +1,4 @@ -\version "1.0.21"; +\version "1.1.52"; \score{ \notes{ diff --git a/input/test/extender.ly b/input/test/extender.ly index 643acb4fcd..45c2ae105f 100644 --- a/input/test/extender.ly +++ b/input/test/extender.ly @@ -5,4 +5,4 @@ > } -\version "1.0.21"; +\version "1.1.52"; diff --git a/input/test/extra-staff.ly b/input/test/extra-staff.ly index b12ab289f5..98269b0aea 100644 --- a/input/test/extra-staff.ly +++ b/input/test/extra-staff.ly @@ -42,4 +42,4 @@ extra-staff.ly: } -\version "1.0.21"; +\version "1.1.52"; diff --git a/input/test/find-fifths.ly b/input/test/find-fifths.ly new file mode 100644 index 0000000000..8d88c31f39 --- /dev/null +++ b/input/test/find-fifths.ly @@ -0,0 +1,10 @@ +\version "1.0.21"; + +\score{ + \notes \relative c { + c d c f c g c b, c g, c f, c c'' c +% run with find-quarts should suggest: +% c d c f c g' c, b c g c f, c' c'' c,, + } +} + diff --git a/input/test/find-quarts.ly b/input/test/find-quarts.ly deleted file mode 100644 index 8d88c31f39..0000000000 --- a/input/test/find-quarts.ly +++ /dev/null @@ -1,10 +0,0 @@ -\version "1.0.21"; - -\score{ - \notes \relative c { - c d c f c g c b, c g, c f, c c'' c -% run with find-quarts should suggest: -% c d c f c g' c, b c g c f, c' c'' c,, - } -} - diff --git a/input/test/font-body.ly b/input/test/font-body.ly index 277d1acc58..65d91f885b 100644 --- a/input/test/font-body.ly +++ b/input/test/font-body.ly @@ -1,4 +1,4 @@ -\version "1.0.21"; +\version "1.1.52"; FontBody= \notes\transpose c''{ \bar "|:"; diff --git a/input/test/font.ly b/input/test/font.ly index dd65dc0756..95bfcc5840 100644 --- a/input/test/font.ly +++ b/input/test/font.ly @@ -7,7 +7,7 @@ description = "This file tests the Feta music font"; % "(Feta definitively is not an abbreviation of Font-En-TjA)"; } -\version "1.0.21"; +\version "1.1.52"; \include "font-body.ly" \score{ diff --git a/input/test/font16.ly b/input/test/font16.ly index 6701a291be..f8b65b215e 100644 --- a/input/test/font16.ly +++ b/input/test/font16.ly @@ -7,7 +7,7 @@ description = "This file tests the Feta music font"; % "(Feta definitively is not an abbreviation of Font-En-TjA)"; } -\version "1.0.21"; +\version "1.1.52"; \include "paper16.ly" \include "font-body.ly" diff --git a/input/test/font20.ly b/input/test/font20.ly index d342c427ea..2f5e368d45 100644 --- a/input/test/font20.ly +++ b/input/test/font20.ly @@ -17,5 +17,5 @@ TestedFeatures = gourlay_maxmeasures =5.; } } -\version "1.0.21"; +\version "1.1.52"; diff --git a/input/test/gourlay.ly b/input/test/gourlay.ly index f7321e04a4..0975b2d978 100644 --- a/input/test/gourlay.ly +++ b/input/test/gourlay.ly @@ -4,7 +4,7 @@ copyright = "PD"; TestedFeatures = "This file tests some nasty Gourlay spacings"; } -\version "1.0.21"; +\version "1.1.52"; %{ diff --git a/input/test/hara-kiri.ly b/input/test/hara-kiri.ly index 58a1366b38..d337bc7e36 100644 --- a/input/test/hara-kiri.ly +++ b/input/test/hara-kiri.ly @@ -1,4 +1,4 @@ -\version "1.0.21"; +\version "1.1.52"; toeter_i = \notes\relative c <{ \property Staff.instrument = "Toeters" diff --git a/input/test/hyphen.ly b/input/test/hyphen.ly deleted file mode 100644 index 149b02d9b4..0000000000 --- a/input/test/hyphen.ly +++ /dev/null @@ -1,11 +0,0 @@ -\score{ - < - \context Staff \notes { c' () c' () c' c' } - \context Lyrics \context LyricVoice \lyrics { bla -- alb xxx -- yyy } - > -} - -\version "1.0.21"; - - - diff --git a/input/test/incipit.ly b/input/test/incipit.ly index 73bd6aec3b..d2057b2d77 100644 --- a/input/test/incipit.ly +++ b/input/test/incipit.ly @@ -6,7 +6,7 @@ /Mats B %} -\version "1.0.21"; +\version "1.1.52"; incipit = \notes\relative c'{ diff --git a/input/test/keys.ly b/input/test/keys.ly index 0f0c3c7ec1..8dc730e6b3 100644 --- a/input/test/keys.ly +++ b/input/test/keys.ly @@ -1,4 +1,4 @@ -\version "1.0.21"; +\version "1.1.52"; %{ test key itemv breaking diff --git a/input/test/knee.ly b/input/test/knee.ly index 37de7fa18d..d854ee539d 100644 --- a/input/test/knee.ly +++ b/input/test/knee.ly @@ -1,4 +1,4 @@ -\version "1.0.21"; +\version "1.1.52"; \score{ \notes\relative c'{ [c16 \stemdown c'' \stemboth c,, d] diff --git a/input/test/mark.ly b/input/test/mark.ly index dae0e41ddd..ab478a9b21 100644 --- a/input/test/mark.ly +++ b/input/test/mark.ly @@ -1,4 +1,4 @@ -\version "1.0.21"; +\version "1.1.52"; global = \notes { s1 | \mark "A"; diff --git a/input/test/memory.ly b/input/test/memory.ly index 90f508f2fb..804aca9c57 100644 --- a/input/test/memory.ly +++ b/input/test/memory.ly @@ -11,5 +11,5 @@ bla = \notes { > \paper { Gourlay_maxmeaures = 2.; } } -\version "1.0.21"; +\version "1.1.52"; diff --git a/input/test/multi-rest.ly b/input/test/multi-rest.ly index aaf3fd8c68..e05b218f4f 100644 --- a/input/test/multi-rest.ly +++ b/input/test/multi-rest.ly @@ -1,4 +1,4 @@ -\version "1.0.21"; +\version "1.1.52"; voice_one = \notes\transpose c''{ \stemup R1 * 2 | f'4-. r r2 | R1 * 3 | diff --git a/input/test/noteheadstyle.ly b/input/test/noteheadstyle.ly index 3db8223a4b..abc1e5fbd4 100644 --- a/input/test/noteheadstyle.ly +++ b/input/test/noteheadstyle.ly @@ -26,4 +26,4 @@ c4 c2 c8 c16 c16 c1 } } -\version "1.0.21"; +\version "1.1.52"; diff --git a/input/test/notemode-chords.ly b/input/test/notemode-chords.ly index b8652f0582..5b26d4c1c2 100644 --- a/input/test/notemode-chords.ly +++ b/input/test/notemode-chords.ly @@ -1,4 +1,4 @@ -\version "1.0.21"; +\version "1.1.52"; \score{ \notes \transpose c''{ diff --git a/input/test/number-staff-lines.fly b/input/test/number-staff-lines.fly index 4794afadc7..92a96187cf 100644 --- a/input/test/number-staff-lines.fly +++ b/input/test/number-staff-lines.fly @@ -1,2 +1,2 @@ -c' c c \property Staff . numberOfStaffLines = 3 +c' c c c | g' g g g \property Staff . numberOfStaffLines = 3 diff --git a/input/test/orchestscore.ly b/input/test/orchestscore.ly index 2887bd11ec..f055cdd281 100644 --- a/input/test/orchestscore.ly +++ b/input/test/orchestscore.ly @@ -1,4 +1,4 @@ -\version "1.0.21"; +\version "1.1.52"; m = \notes \relative c''{ c1 | c2 c | c c | c c | c c | c c | c c | c c | diff --git a/input/test/ossia.ly b/input/test/ossia.ly index 059cc24019..1057776aff 100644 --- a/input/test/ossia.ly +++ b/input/test/ossia.ly @@ -1,4 +1,4 @@ -\version "1.0.21"; +\version "1.1.52"; \score { diff --git a/input/test/perform-tie.fly b/input/test/perform-tie.fly new file mode 100644 index 0000000000..484f1368c5 --- /dev/null +++ b/input/test/perform-tie.fly @@ -0,0 +1,2 @@ +c8 c c ~ c c c c ~ c ~ c ~ c ~ c c c +%\grace { d16 c16 d16 } c8 diff --git a/input/test/rest-collision.ly b/input/test/rest-collision.ly index b97610a4ca..d5e5e9bc5b 100644 --- a/input/test/rest-collision.ly +++ b/input/test/rest-collision.ly @@ -38,4 +38,4 @@ restsII = \context Staff \notes { } } -\version "1.0.21"; +\version "1.1.52"; diff --git a/input/test/rhythmic.ly b/input/test/rhythmic.ly new file mode 100644 index 0000000000..9670f5b44b --- /dev/null +++ b/input/test/rhythmic.ly @@ -0,0 +1,8 @@ +\score{ + \context RhythmicStaff { + \notes\relative c''{ + \time 4/4; + r4 r g2 | r4 g r2 | g1:32 | r1 | + } + } +} diff --git a/input/test/scales.fly b/input/test/scales.fly new file mode 100644 index 0000000000..d53b627070 --- /dev/null +++ b/input/test/scales.fly @@ -0,0 +1,102 @@ +% sharp-major +% c g d a e b fis cis + +\key c; +c' d e f g a b c + +\key g; +g a b c d e fis g + +\key d; +d, e fis g a b cis d + +\key a; +a b cis d e fis gis a + +\key e; +e, fis gis a b cis dis e + +\key b; +b cis dis e fis gis ais b + +\key fis; +fis, gis ais b cis dis eis fis + +\key cis; +cis, dis eis fis gis ais bis cis + +% sharp-minor +% a e b fis cis gis dis ais + +\key a\minor; +a b c d e f gis a + +\key e\minor; +e, fis g a b c dis e + +\key b\minor; +b cis d e fis g ais b + +\key fis\minor; +fis, gis a b cis d eis fis + +\key cis\minor; +cis, dis e fis gis a bis cis + +\key gis\minor; +gis ais b cis dis e fisis gis + +\key dis\minor; +dis, eis fis gis ais b cisis dis + +\key ais\minor; +ais bis cis dis eis fis gisis ais + +% flat-major +% c f bes es as des ges ces + +\key f; +f, g a bes c d e f + +\key bes; +bes, c d es f g a bes + +\key es; +es,, f g as bes c d es + +\key as; +as, bes c des es f g as + +\key des; +des,, es f ges as bes c des + +\key ges; +ges, as bes ces des es f ges + +\key ces; +ces,, des es fes ges as bes ces + +% flat-minor +% a d g c f bes es as + +\key d\minor; +d, e f g a bes cis d + +\key g\minor; +g, a bes c d es fis g + +\key c\minor; +c,, d es f g as b c + +\key f\minor; +f, g as bes c des e f + +\key bes\minor; +bes, c des es f ges a bes + +\key es\minor; +es,, f ges as bes ces d es + +\key as\minor; +as, bes ces des es fes g as + diff --git a/input/test/score-bar-scripts.ly b/input/test/score-bar-scripts.ly index 4d5ab9466f..4e155e5632 100644 --- a/input/test/score-bar-scripts.ly +++ b/input/test/score-bar-scripts.ly @@ -1,7 +1,7 @@ -\version "1.0.21"; +\version "1.1.52"; onestaff = \context Staff = foo\notes { \property Staff.instr = instr diff --git a/input/test/sleur.ly b/input/test/sleur.ly index d74f328c4b..b5ae077078 100644 --- a/input/test/sleur.ly +++ b/input/test/sleur.ly @@ -5,7 +5,7 @@ TestedFeatures = "This file tests Feta embedded slurs" + "(Feta definitively is not an abbreviation of Font-En-TjA)"; } -\version "1.0.21"; +\version "1.1.52"; shortlong = \notes{ c4()c( c c | diff --git a/input/test/slur-bug.ly b/input/test/slur-bug.ly index 4814daaac7..ff28f8d777 100644 --- a/input/test/slur-bug.ly +++ b/input/test/slur-bug.ly @@ -1,4 +1,4 @@ -\version "1.0.21"; +\version "1.1.52"; % bug % excentric slur can't handle this ... diff --git a/input/test/slur-damping.ly b/input/test/slur-damping.ly index 313d75a777..6b5619b7c8 100644 --- a/input/test/slur-damping.ly +++ b/input/test/slur-damping.ly @@ -1,5 +1,5 @@ % test damping -\version "1.0.21"; +\version "1.1.52"; \score{ \notes\relative c'{ diff --git a/input/test/slur-interstaff.ly b/input/test/slur-interstaff.ly index 90d03844c9..2d176e5565 100644 --- a/input/test/slur-interstaff.ly +++ b/input/test/slur-interstaff.ly @@ -38,4 +38,4 @@ } } -\version "1.0.21"; +\version "1.1.52"; diff --git a/input/test/slur-swap.ly b/input/test/slur-swap.ly index 13abcdd1a1..ccd6dd0b3a 100644 --- a/input/test/slur-swap.ly +++ b/input/test/slur-swap.ly @@ -1,4 +1,4 @@ -\version "1.0.21"; +\version "1.1.52"; % urg, the direction of the slur gets swapped! \score{ diff --git a/input/test/slurs.ly b/input/test/slurs.ly index 2bd6626572..0cc8f2f06c 100644 --- a/input/test/slurs.ly +++ b/input/test/slurs.ly @@ -1,5 +1,5 @@ -\version "1.0.21"; +\version "1.1.52"; \score{ \notes\transpose c'{ diff --git a/input/test/spacing-2.ly b/input/test/spacing-2.ly index 9f0f43243c..3977dc81e1 100644 --- a/input/test/spacing-2.ly +++ b/input/test/spacing-2.ly @@ -33,4 +33,4 @@ source = "Petits Preludes et Fugues. Urtext. Editions Henry Lemoine, Paris."; } } -\version "1.0.21"; +\version "1.1.52"; diff --git a/input/test/spacing.ly b/input/test/spacing.ly index cecb18c9d8..de7accdd5a 100644 --- a/input/test/spacing.ly +++ b/input/test/spacing.ly @@ -6,7 +6,7 @@ copyright = "public domain"; TestedFeatures = "This file tests various spacings"; } -\version "1.0.21"; +\version "1.1.52"; multipart = \notes \relative c'{ \context StaffGroup < diff --git a/input/test/span-bars.ly b/input/test/span-bars.ly index 37d13ef68a..ce5d89b3e1 100644 --- a/input/test/span-bars.ly +++ b/input/test/span-bars.ly @@ -1,5 +1,5 @@ -\version "1.0.21"; +\version "1.1.52"; nt = \notes { c1 \break c1 c1 } stuff = \notes \relative c'' < \context Staff = stone { \nt } diff --git a/input/test/staff-margin.ly b/input/test/staff-margin.ly index ca8e9dea33..fbf54a16f4 100644 --- a/input/test/staff-margin.ly +++ b/input/test/staff-margin.ly @@ -1,6 +1,6 @@ -\version "1.0.21"; +\version "1.1.52"; \score { diff --git a/input/test/staff-side-slur.ly b/input/test/staff-side-slur.ly index ff92e5b0b3..3c1a5fe44e 100644 --- a/input/test/staff-side-slur.ly +++ b/input/test/staff-side-slur.ly @@ -18,4 +18,4 @@ } -\version "1.0.21"; +\version "1.1.52"; diff --git a/input/test/staff-size.ly b/input/test/staff-size.ly index adf8d50c26..40db541ff0 100644 --- a/input/test/staff-size.ly +++ b/input/test/staff-size.ly @@ -14,4 +14,4 @@ > \paper { linewidth = -1.; } } -\version "1.0.21"; +\version "1.1.52"; diff --git a/input/test/stem-tremolo.ly b/input/test/stem-tremolo.ly index 6e76092aad..bc59e46504 100644 --- a/input/test/stem-tremolo.ly +++ b/input/test/stem-tremolo.ly @@ -1,5 +1,5 @@ -\version "1.0.21"; +\version "1.1.52"; \score{ \notes \transpose c'''{ \stemup diff --git a/input/test/stem.ly b/input/test/stem.ly index a728939ef8..274405cbb6 100644 --- a/input/test/stem.ly +++ b/input/test/stem.ly @@ -8,7 +8,7 @@ of beams"; } -\version "1.0.21"; +\version "1.1.52"; beamintervals = \notes{ \time 7/4; diff --git a/input/test/tchaikovsky.ly b/input/test/tchaikovsky.ly index 6a0dc872ea..7b819215e4 100644 --- a/input/test/tchaikovsky.ly +++ b/input/test/tchaikovsky.ly @@ -7,7 +7,7 @@ enteredby = "Maarten Storm"; instrument= "Violoncello"; } -\version "1.0.21"; +\version "1.1.52"; % this is an example of extreme dynamics diff --git a/input/test/test-lyrics.ly b/input/test/test-lyrics.ly index f0cc24574e..8cbeaaa738 100644 --- a/input/test/test-lyrics.ly +++ b/input/test/test-lyrics.ly @@ -1,4 +1,4 @@ -\version "1.0.21"; +\version "1.1.52"; $somewhat_long = \lyrics{ \property Lyrics . textStyle = "roman" diff --git a/input/test/thumb.ly b/input/test/thumb.ly index 57dd37d821..ae3016d156 100644 --- a/input/test/thumb.ly +++ b/input/test/thumb.ly @@ -7,7 +7,7 @@ % the thumb-script is used in cello music to indicate a note that should % be played with your thumb. -\version "1.0.21"; +\version "1.1.52"; \score { \notes \relative c'' { [ <)b_\thumb b'-3> diff --git a/input/test/tie-bug.ly b/input/test/tie-bug.ly index 8df3c3c5a3..f52151068f 100644 --- a/input/test/tie-bug.ly +++ b/input/test/tie-bug.ly @@ -1,4 +1,4 @@ -\version "1.0.21"; +\version "1.1.52"; % middle tie is wrong diff --git a/input/test/tie.ly b/input/test/tie.ly index 61f4c512a3..90e9389b40 100644 --- a/input/test/tie.ly +++ b/input/test/tie.ly @@ -1,4 +1,4 @@ -\version "1.0.21"; +\version "1.1.52"; tie = \notes\transpose c''{ diff --git a/input/test/title.ly b/input/test/title.ly index 6058ef4d0a..05ee23883d 100644 --- a/input/test/title.ly +++ b/input/test/title.ly @@ -10,7 +10,7 @@ source = "urtext"; instrument= "Instrument"; } -\version "1.0.21"; +\version "1.1.52"; \score{ \notes diff --git a/input/test/transposition.ly b/input/test/transposition.ly index 72efd42818..be8fca2c86 100644 --- a/input/test/transposition.ly +++ b/input/test/transposition.ly @@ -22,7 +22,7 @@ copyright = "public domain"; } -\version "1.0.21"; +\version "1.1.52"; vOne = \notes \relative c''{ \clef"violin"; diff --git a/input/test/tup.ly b/input/test/tup.ly index 06b9dc8458..6a0e13cb09 100644 --- a/input/test/tup.ly +++ b/input/test/tup.ly @@ -8,4 +8,4 @@ } } -\version "1.0.21"; +\version "1.1.52"; diff --git a/input/test/vertical-align.ly b/input/test/vertical-align.ly index 8295ae22ef..b3de054952 100644 --- a/input/test/vertical-align.ly +++ b/input/test/vertical-align.ly @@ -1,5 +1,5 @@ -\version "1.0.21"; +\version "1.1.52"; \score { \notes < diff --git a/input/test/vertical-text.ly b/input/test/vertical-text.ly index f6b98c1072..59d8024761 100644 --- a/input/test/vertical-text.ly +++ b/input/test/vertical-text.ly @@ -15,4 +15,4 @@ } } -\version "1.0.21"; +\version "1.1.52"; diff --git a/input/test/wtk-huh.ly b/input/test/wtk-huh.ly index 5b38a572b0..d7111dac20 100644 --- a/input/test/wtk-huh.ly +++ b/input/test/wtk-huh.ly @@ -21,4 +21,4 @@ What's supposed to be demonstrated here? } } -\version "1.0.21"; +\version "1.1.52"; diff --git a/input/tril.ly b/input/tril.ly index e513f364cf..60c612bd65 100644 --- a/input/tril.ly +++ b/input/tril.ly @@ -5,7 +5,7 @@ TestedFeatures = "This file tests trills" + "(Feta definitively is not an abbreviation of Font-En-TjA)"; } -\version "1.0.21"; +\version "1.1.52"; \score{ \notes{ diff --git a/input/twinkle-pop.ly b/input/twinkle-pop.ly index c7fb240f10..cb188cc04c 100644 --- a/input/twinkle-pop.ly +++ b/input/twinkle-pop.ly @@ -7,11 +7,7 @@ enteredby = "HWN, chords by Johan Vromans"; copyright = "public domain"; } -%{ -Tested Features lyrics and chords -%} - -\version "1.0.21"; +\version "1.1.52"; melodie = \notes\relative c'' { \clef "violin"; @@ -40,7 +36,7 @@ acc = \chords { text = \lyrics{ \property Lyrics . textStyle = "italic" - Ah!4 vous dir- ai_- je ma man2 + Ah!4 vous dir- ai- je ma man2 Ce4 qui cau- se mon tour- ment2 Pa-4 pa veut que je rai- so- nne Comme4 un- e grand- e per- so- nne diff --git a/input/twinkle.ly b/input/twinkle.ly index b791a6d665..1f5c15fa1b 100644 --- a/input/twinkle.ly +++ b/input/twinkle.ly @@ -19,7 +19,7 @@ traditional song in various languages. Tested Features: lyrics, interleaving lyrics and staffs, repeats %} -\version "1.0.21"; +\version "1.1.52"; melody = \notes \relative c'' { \clef violin; @@ -53,11 +53,11 @@ global = \notes { tekst = \lyrics{ Al-4 tijd is Kort- jak- je ziek,2 - midden4 in_de week maar s,_zon- dags niet.2 - s,_Zon-4 dags gaat ze naar de kerk,2 + midden4 "in de" week maar "'s zon-" dags niet.2 + "'s Zon-"4 dags gaat ze naar de kerk,2 met4 een boek vol zil- ver werk.2 Al-4 tijd is Kort- jak- je ziek,2 - midden8 _8 in_de8 _8 week4 maar s,_zon- dags niet.2 + mid-8 den in de week4 maar "'s zon-" dags niet.2 } @@ -69,7 +69,7 @@ tekst. Mogen wij ook af en toe ergens op afgeven? hegedraagjetekst = \lyrics{ Al-4 tijd zuigt Bill Gates mijn piek,2 "\TeX"4 is slecht- ser dan mu- ziek.2 - s,_Zon-4 dags gaat het door een raam,2 + "'s Zon-"4 dags gaat het door een raam,2 Weet4 dat ik me er- voor schaam.2 Al-4 tijd zuigt Bill Gates mijn piek,2 "\TeX"4 is slecht- ser dan mu- ziek.2 @@ -78,7 +78,7 @@ hegedraagjetekst = \lyrics{ texte = \lyrics{ \property Lyrics . textStyle" = "italic" % \property Lyrics . textStyle" = "roman" - Ah!4 vous dir- ai_- je ma- man2 + Ah!4 vous dir- ai- je ma- man2 Ce4 qui cau- se mon tour- ment2 Pa-4 pa veut que je rai- son- ne Comm' u- ne gran- de per- son- ne @@ -109,7 +109,7 @@ textii = \lyrics{ textiii = \lyrics{ Then4 the tra- veler in the dark2 Thanks4 you for your ti- ny spark;2 - He_could4 not see which way to go,2 + He4 could not see which way8 to8 go,2 If4 you did not twin- kle so.2 Twin-4 kle, twin- kle, lit- tle star,2 How4 I won- der what you are!2 diff --git a/lily/audio-element.cc b/lily/audio-element.cc index 275e0a50a5..717e2b0ea1 100644 --- a/lily/audio-element.cc +++ b/lily/audio-element.cc @@ -9,7 +9,9 @@ #include "audio-element.hh" #include "debug.hh" - +Audio_element::Audio_element () +{ +} Audio_element::~Audio_element() { diff --git a/lily/audio-item.cc b/lily/audio-item.cc index 7adf3de060..f48f92179c 100644 --- a/lily/audio-item.cc +++ b/lily/audio-item.cc @@ -8,92 +8,61 @@ #include "debug.hh" #include "audio-item.hh" #include "midi-item.hh" -#include "request.hh" #include "audio-column.hh" Audio_instrument::Audio_instrument (String instrument_str) - : Audio_item (0) { str_ = instrument_str; } -Midi_item* -Audio_instrument::midi_item_p() -{ - return str_.length_i() ? new Midi_instrument(0, str_) : 0; -} - - -Audio_item::Audio_item (Request* req_l) +Audio_item::Audio_item () { audio_column_l_ = 0; - req_l_ = req_l; -} - -Audio_key::Audio_key (Request* req_l) - : Audio_item (req_l) -{ } -Midi_item* -Audio_key::midi_item_p() -{ - return new Midi_key (this); -} - - -Audio_note::Audio_note (Request* req_l, int transposing_i) - : Audio_item (req_l) +Audio_note::Audio_note (Musical_pitch p, Moment m, int transposing_i) { + pitch_ = p; + length_mom_ = m; transposing_i_ = transposing_i; } -Midi_item* -Audio_note::midi_item_p() +Audio_key::Audio_key (Key_def const& k) { - return new Midi_note (this); + key_ = k; } - - Audio_tempo::Audio_tempo (int per_minute_4_i) - : Audio_item (0) { per_minute_4_i_ = per_minute_4_i; } -Midi_item* -Audio_tempo::midi_item_p() +Audio_time_signature::Audio_time_signature (int beats, int one_beat) { - return new Midi_tempo (this); + beats_i_ = beats; + one_beat_i_ = one_beat; } - - -Audio_time_signature::Audio_time_signature (Request* req_l) - : Audio_item (req_l) +Audio_text::Audio_text (Audio_text::Type type, String text_str) { + text_str_ = text_str; + type_ = type; } -Midi_item* -Audio_time_signature::midi_item_p() +Audio_tie::Audio_tie () { - return new Midi_time_signature (this); + note_l_drul_[RIGHT] = 0; + note_l_drul_[LEFT] = 0; } - - -Audio_text::Audio_text (Audio_text::Type type, String text_str) - : Audio_item (0) +void +Audio_tie::set_note (Direction d, Audio_note* note_l) { - text_str_ = text_str; - type_ = type; -} + assert (!note_l_drul_[d]); + note_l_drul_[d] = note_l; + //set_bounds (d, head_l); -Midi_item* -Audio_text::midi_item_p() -{ - return text_str_.length_i() ? new Midi_text(this) : 0; + // add_dependency (head_l); } void @@ -104,11 +73,6 @@ Audio_item::do_print () const { DOUT << "at: "<< audio_column_l_->at_mom (); } - if (req_l_) - { - DOUT << "from: "; - req_l_->print (); - } #endif } diff --git a/lily/auto-beam-engraver.cc b/lily/auto-beam-engraver.cc index 20cb6b70c8..acca44ad5a 100644 --- a/lily/auto-beam-engraver.cc +++ b/lily/auto-beam-engraver.cc @@ -6,16 +6,16 @@ (c) 1999 Jan Nieuwenhuizen */ - +#include "new-beaming.hh" #include "auto-beam-engraver.hh" #include "musical-request.hh" #include "bar.hh" #include "beam.hh" -#include "rhythmic-grouping.hh" #include "rest.hh" #include "stem.hh" #include "debug.hh" -#include "time-description.hh" +#include "timing-engraver.hh" +#include "engraver-group-engraver.hh" ADD_THIS_TRANSLATOR (Auto_beam_engraver); @@ -26,6 +26,14 @@ Auto_beam_engraver::Auto_beam_engraver () finished_beam_p_ = 0; finished_grouping_p_ = 0; grouping_p_ = 0; + timer_l_ =0; +} + +void +Auto_beam_engraver::do_creation_processing () +{ + Translator * t = daddy_grav_l ()->get_simple_translator ("Timing_engraver"); + timer_l_ = dynamic_cast (t); } void @@ -37,7 +45,10 @@ Auto_beam_engraver::do_process_requests () void Auto_beam_engraver::consider_end_and_begin () { - Time_description const *time = get_staff_info().time_C_; + if (!timer_l_) + return; + + Time_description const *time = &timer_l_->time_; int num = time->whole_per_measure_ / time->one_beat_; int den = time->one_beat_.den_i (); String time_str = String ("time") + to_str (num) + "_" + to_str (den); @@ -158,7 +169,9 @@ Auto_beam_engraver::begin_beam () assert (!stem_l_arr_p_); stem_l_arr_p_ = new Array; assert (!grouping_p_); - grouping_p_ = new Rhythmic_grouping; + grouping_p_ = new Beaming_info_list; + beam_start_moment_ = now_mom (); + beam_start_location_ = timer_l_->time_.whole_in_measure_; } Beam* @@ -205,9 +218,8 @@ Auto_beam_engraver::typeset_beam () { if (finished_beam_p_) { - Rhythmic_grouping const * rg_C = get_staff_info().rhythmic_C_; - rg_C->extend (finished_grouping_p_->interval()); - finished_beam_p_->set_grouping (*rg_C, *finished_grouping_p_); + finished_grouping_p_->beamify (); + finished_beam_p_->set_beaming (finished_grouping_p_); typeset_element (finished_beam_p_); finished_beam_p_ = 0; @@ -246,85 +258,68 @@ Auto_beam_engraver::same_grace_state_b (Score_element* e) void Auto_beam_engraver::acknowledge_element (Score_element_info info) { + if (!same_grace_state_b (info.elem_l_) || !timer_l_) + return; + if (stem_l_arr_p_) { if (Beam *b = dynamic_cast (info.elem_l_)) { - if (same_grace_state_b (b)) - junk_beam (); + junk_beam (); } else if (Bar *b = dynamic_cast (info.elem_l_)) { - if (same_grace_state_b (b)) - junk_beam (); + junk_beam (); } - else if (Rhythmic_req *rhythmic_req = dynamic_cast (info.req_l_)) + else if (Rest* rest_l = dynamic_cast (info.elem_l_)) { - if (Rest* rest_l = dynamic_cast (info.elem_l_)) + end_beam (); + } + else if (Stem* stem_l = dynamic_cast (info.elem_l_)) + { + Rhythmic_req *rhythmic_req = dynamic_cast (info.req_l_); + if (!rhythmic_req) { - if (same_grace_state_b (rest_l)) - end_beam (); + programming_error ("Stem must have rhythmic structure"); + return; } - else if (Stem* stem_l = dynamic_cast (info.elem_l_)) + + if (stem_l->beam_l_) { + junk_beam (); + return ; + } + /* - if we're a nice grace beam, but the new note is regular, - gracefully end beam, and consider starting a regular one. - */ + now that we have last_add_mom_, perhaps we can (should) do away + with these individual junk_beams + */ + + int durlog =rhythmic_req->duration_.durlog_i_; + if (durlog <= 2) + end_beam (); + else + { /* - When does that happen !? --hwn - */ -#if 0 - if (stem_l_arr_p_ && stem_l_arr_p_->size () - && grace_b (stem_l_arr_p_->top ()) - && !grace_b (stem_l)) - { - end_beam (); - consider_end_and_begin (); - if (!stem_l_arr_p_) - return; - } -#endif - if (same_grace_state_b (stem_l)) + if shortest duration would change + reconsider ending/starting beam first. + */ + Moment mom = rhythmic_req->duration_.length_mom (); + if (mom < shortest_mom_) { - if (stem_l->beam_l_) - junk_beam (); - /* - now that we have last_add_mom_, perhaps we can (should) do away - with these individual junk_beams - */ - else if (rhythmic_req->duration_.durlog_i_ <= 2) - end_beam (); - else + if (stem_l_arr_p_->size ()) { - Moment start = get_staff_info().time_C_->whole_in_measure_; - if (!grouping_p_->child_fit_b (start)) - end_beam (); - else - { - /* - if shortest duration would change - reconsider ending/starting beam first. - */ - Moment mom = rhythmic_req->duration_.length_mom (); - if (mom < shortest_mom_) - { - if (stem_l_arr_p_->size ()) - { - shortest_mom_ = mom; - consider_end_and_begin (); - } - shortest_mom_ = mom; - } - grouping_p_->add_child (start, rhythmic_req->length_mom ()); - - stem_l_arr_p_->push (stem_l); - Moment now = now_mom (); - last_add_mom_ = now; - extend_mom_ = extend_mom_ >? now + rhythmic_req->length_mom (); - } + shortest_mom_ = mom; + consider_end_and_begin (); } + shortest_mom_ = mom; } + Moment now = now_mom (); + + grouping_p_->add_stem (now - beam_start_moment_ + beam_start_location_, durlog - 2); + stem_l_arr_p_->push (stem_l); + last_add_mom_ = now; + extend_mom_ = extend_mom_ >? now + rhythmic_req->length_mom (); } } } diff --git a/lily/bar-engraver.cc b/lily/bar-engraver.cc index 04eca12429..2d48eb6c4a 100644 --- a/lily/bar-engraver.cc +++ b/lily/bar-engraver.cc @@ -6,7 +6,7 @@ (c) 1997, 1998, 1999 Han-Wen Nienhuys Jan Nieuwenhuizen */ - +#include "score-engraver.hh" #include "bar-engraver.hh" #include "staff-bar.hh" #include "musical-request.hh" @@ -14,6 +14,7 @@ #include "command-request.hh" #include "time-description.hh" #include "engraver-group-engraver.hh" +#include "warn.hh" Bar_engraver::Bar_engraver() { @@ -34,7 +35,6 @@ Bar_engraver::do_try_music (Music*r_l) } return false; - } @@ -62,10 +62,21 @@ Bar_engraver::create_bar () { bar_p_->set_elt_property (at_line_start_scm_sym, SCM_BOOL_T); } + prop = get_property ("barSize", 0); + if (prop.isnum_b ()) + { + bar_p_->set_elt_property (bar_size_scm_sym, + gh_double2scm (Real(prop))); + } announce_element (Score_element_info (bar_p_, bar_req_l_)); } } +/** + Make a barline. If there are both |: and :| requested, merge them + to :|: + +*/ void Bar_engraver::request_bar (String type_str) { @@ -77,10 +88,11 @@ Bar_engraver::request_bar (String type_str) return; } create_bar (); + if (((type_str == "|:") && (bar_p_->type_str_ == ":|")) || ((type_str == ":|") && (bar_p_->type_str_ == "|:"))) bar_p_->type_str_ = ":|:"; - else + else if (type_str_.length_i ()) bar_p_->type_str_ = type_str; } @@ -128,9 +140,17 @@ Bar_engraver::do_process_requests() if (!bar_p_) { - Break_req r; - r.penalty_i_ = Break_req::DISALLOW; - daddy_grav_l ()->try_music (&r); + Score_engraver * e = 0; + Translator * t = daddy_grav_l (); + for (; !e && t; t = t->daddy_trans_l_) + { + e = dynamic_cast (t); + } + + if (!e) + programming_error ("No score engraver!"); + else + e->forbid_breaks (); } } diff --git a/lily/bar.cc b/lily/bar.cc index 31ff0b9c25..913c2c72ed 100644 --- a/lily/bar.cc +++ b/lily/bar.cc @@ -32,7 +32,8 @@ Bar::do_print () const Real Bar::get_bar_size () const { - return paper_l ()->get_var ("barsize"); + // Never called! + return 0; } diff --git a/lily/beam-engraver.cc b/lily/beam-engraver.cc index 4e860dcd21..849163e5be 100644 --- a/lily/beam-engraver.cc +++ b/lily/beam-engraver.cc @@ -6,21 +6,23 @@ (c) 1998--1999 Han-Wen Nienhuys */ - +#include "timing-engraver.hh" +#include "engraver-group-engraver.hh" #include "beam-engraver.hh" #include "musical-request.hh" #include "beam.hh" -#include "rhythmic-grouping.hh" #include "stem.hh" #include "warn.hh" #include "time-description.hh" +#include "new-beaming.hh" +#include "score-engraver.hh" Beam_engraver::Beam_engraver () { beam_p_ = 0; finished_beam_p_ =0; - finished_grouping_p_ = 0; - grouping_p_ =0; + finished_beam_info_p_=0; + beam_info_p_ =0; reqs_drul_[LEFT] = reqs_drul_[RIGHT] =0; prev_start_req_ =0; } @@ -56,10 +58,26 @@ Beam_engraver::do_process_requests () reqs_drul_[STOP]->warning (_("No beam to end")); prev_start_req_ =0; finished_beam_p_ = beam_p_; - finished_grouping_p_ = grouping_p_; + finished_beam_info_p_ = beam_info_p_; + beam_info_p_ =0; beam_p_ = 0; - grouping_p_ = 0; + } + + + if (beam_p_) + { + Score_engraver * e = 0; + Translator * t = daddy_grav_l (); + for (; !e && t; t = t->daddy_trans_l_) + { + e = dynamic_cast (t); + } + + if (!e) + programming_error ("No score engraver!"); + else + e->forbid_breaks (); } if (reqs_drul_[START]) @@ -72,7 +90,14 @@ Beam_engraver::do_process_requests () prev_start_req_ = reqs_drul_[START]; beam_p_ = new Beam; - grouping_p_ = new Rhythmic_grouping; + + Translator * t = daddy_grav_l ()->get_simple_translator ("Timing_engraver"); + Timing_engraver *timer = dynamic_cast (t); + beam_start_location_ = (t) ? timer->time_.whole_in_measure_ : Moment (0); + beam_start_mom_ = now_mom(); + beam_info_p_ = new Beaming_info_list; + + Scalar prop = get_property ("beamslopedamping", 0); if (prop.isnum_b ()) @@ -91,15 +116,14 @@ Beam_engraver::typeset_beam () { if (finished_beam_p_) { - Rhythmic_grouping const * rg_C = get_staff_info().rhythmic_C_; - rg_C->extend (finished_grouping_p_->interval()); - finished_beam_p_->set_grouping (*rg_C, *finished_grouping_p_); + finished_beam_info_p_->beamify (); + + finished_beam_p_->set_beaming (finished_beam_info_p_); typeset_element (finished_beam_p_); + delete finished_beam_info_p_; + finished_beam_info_p_ =0; finished_beam_p_ = 0; - delete finished_grouping_p_; - finished_grouping_p_= 0; - reqs_drul_[STOP] = 0; } } @@ -124,7 +148,7 @@ Beam_engraver::do_removal_processing () { prev_start_req_->warning (_ ("Unfinished beam")); finished_beam_p_ = beam_p_; - finished_grouping_p_ = grouping_p_; + finished_beam_info_p_ = beam_info_p_; typeset_beam (); } } @@ -164,27 +188,10 @@ Beam_engraver::acknowledge_element (Score_element_info info) return; } - /* - TODO: do something sensible if it doesn't fit in the beam. - */ - Moment start = get_staff_info().time_C_->whole_in_measure_; - - if (!grouping_p_->child_fit_b (start)) - { - String s (_ ("please fix me") + ": " - + _f ("stem at %s doesn't fit in beam", now_mom ().str ())); - - if (info.req_l_) - info.req_l_->warning(s); - else - warning (s); - } - else - { - grouping_p_->add_child (start, rhythmic_req->length_mom ()); - stem_l->flag_i_ = rhythmic_req->duration_.durlog_i_; - beam_p_->add_stem (stem_l); - } + stem_l->flag_i_ = rhythmic_req->duration_.durlog_i_; + Moment stem_location = now_mom () - beam_start_mom_ + beam_start_location_; + beam_info_p_->add_stem (stem_location, rhythmic_req->duration_.durlog_i_ - 2); + beam_p_->add_stem (stem_l); } } diff --git a/lily/beam.cc b/lily/beam.cc index c6ae9c7f89..e523466d3c 100644 --- a/lily/beam.cc +++ b/lily/beam.cc @@ -24,6 +24,7 @@ needs what, and what information should be available when. #include +#include "new-beaming.hh" #include "proto.hh" #include "dimensions.hh" #include "beam.hh" @@ -34,7 +35,6 @@ needs what, and what information should be available when. #include "stem.hh" #include "paper-def.hh" #include "lookup.hh" -#include "rhythmic-grouping.hh" Beam::Beam () { @@ -573,6 +573,8 @@ Beam::set_stemlens () // enge floots Real epsilon_f = staffline_f / 8; + + // je bent zelf eng --hwn. Real dy_f = check_stemlengths_f (false); for (int i = 0; i < 2; i++) { @@ -589,52 +591,42 @@ Beam::set_stemlens () test_pos %= 4; } -/* - FIXME - ugh. this is broken and should be rewritten. - - [c8. c32 c32] - */ void -Beam::set_grouping (Rhythmic_grouping def, Rhythmic_grouping cur) +Beam::set_beaming (Beaming_info_list *beaming) +{ + Direction d = LEFT; + for (int i=0; i < stems_.size (); i++) + { + do + { + if (stems_[i]->beams_i_drul_[d] < 0) + stems_[i]->beams_i_drul_[d] = beaming->infos_.elem (i).beams_i_drul_[d]; + } + while (flip (&d) != LEFT); + } +} + + +void +Beam::do_add_processing () { - def.OK (); - cur.OK (); - assert (cur.children.size () == stems_.size ()); - - cur.split (def); - - Array b; - { - Array flags; - for (int j=0; j flag_i_ - 2; - assert (f>0); - flags.push (f); - } - int fi =0; - b= cur.generate_beams (flags, fi); - b.insert (0,0); - b.push (0); - assert (stems_.size () == b.size ()/2); - } - - for (int j=0, i=0; i < b.size () && j beams_i_drul_[d] < 0) - s->beams_i_drul_[d] = b[i]; - - multiple_i_ = multiple_i_ >? s->beams_i_drul_[d]; - i++; + multiple_i_ = multiple_i_ >? stems_[i]->beams_i_drul_[d]; } while ((flip (&d)) != LEFT); } + + if (stems_.size ()) + { + stems_[0]->beams_i_drul_[LEFT] =0; + stems_.top()->beams_i_drul_[RIGHT] =0; + } } + + /* beams to go with one stem. */ diff --git a/lily/command-request.cc b/lily/command-request.cc index 6cbd2bc92f..7ce3b9fd6c 100644 --- a/lily/command-request.cc +++ b/lily/command-request.cc @@ -11,10 +11,10 @@ #include "musical-request.hh" void -Cadenza_req::do_print() const +Cadenza_req::do_print () const { #ifndef NPRINT - DOUT << on_b_; + DOUT << (int)on_b_; #endif } @@ -40,7 +40,7 @@ Bar_req::do_equal_b (Request*r) const } void -Bar_req::do_print() const +Bar_req::do_print () const { #ifndef NPRINT DOUT << type_str_; @@ -73,7 +73,7 @@ Barcheck_req::do_equal_b (Request*r) const } void -Clef_change_req::do_print() const +Clef_change_req::do_print () const { #ifndef NPRINT DOUT << clef_str_ ; @@ -86,13 +86,13 @@ Clef_change_req::Clef_change_req (String s) } void -Partial_measure_req::do_print() const +Partial_measure_req::do_print () const { DOUT << length_mom_; } void -Time_signature_change_req::do_print() const +Time_signature_change_req::do_print () const { #ifndef NPRINT DOUT << beats_i_ << "/" << one_beat_i_; @@ -109,23 +109,23 @@ Time_signature_change_req::do_equal_b (Request * r) const && one_beat_i_ == m->one_beat_i_; } -Time_signature_change_req::Time_signature_change_req() +Time_signature_change_req::Time_signature_change_req () { beats_i_ = 0; one_beat_i_ =0; } -Tempo_req::Tempo_req() +Tempo_req::Tempo_req () { metronome_i_ = 60; dur_. durlog_i_ = 2; } void -Tempo_req::do_print() const +Tempo_req::do_print () const { - DOUT << dur_.str() << " = " << metronome_i_; + DOUT << dur_.str () << " = " << metronome_i_; } @@ -137,145 +137,24 @@ Tempo_req::do_equal_b (Request *r) const return t&& t->dur_.length_mom ()== dur_.length_mom () && metronome_i_ == t->metronome_i_; } -void -Measure_grouping_req::do_print() const -{ - for (int i=0; i < elt_length_arr_.size(); i++) - { - DOUT << beat_i_arr_[i] << "*" << elt_length_arr_[i].str () << " "; - } -} -bool -Measure_grouping_req::do_equal_b (Request*) const -{ - return false; // todo -} - -void -Key_change_req::transpose (Musical_pitch d) -{ - if (ordinary_key_b_ ) - { - if (pitch_arr_.size () > 0) - pitch_arr_[0].transpose(d); - else - { - warning(_ ("don't know how handle empty keys")); // TODO - } - } - else - { - Array old_pitch_arr_; - for (int i = 0; i < pitch_arr_.size(); i++) - { - old_pitch_arr_.push(pitch_arr_[i]); - } - // set accidentals for \key d (as in Key_engraver::read_req) - // (later called "new accidentals") - int p = d.semitone_pitch (); - /* Solve the equation 7*no_of_acc mod 12 = p, -6 <= no_of_acc <= 5 */ - int no_of_acc = (7*p) % 12; - no_of_acc = (no_of_acc + 18) % 12 -6; - - /* Correct from flats to sharps or vice versa */ - if (no_of_acc * d.accidental_i_ < 0) - no_of_acc += 12 * sign (d.accidental_i_); - - pitch_arr_.clear (); - if (no_of_acc < 0) - { - int accidental = 6 ; // First accidental: bes - for ( ; no_of_acc < 0 ; no_of_acc++ ) - { - Musical_pitch m; - m.accidental_i_ = -1; - m.notename_i_ = accidental; - pitch_arr_.push(m); - - accidental = (accidental + 3) % 7 ; - } - } - else - { - int accidental = 3 ; // First accidental: fis - for ( ; no_of_acc > 0 ; no_of_acc-- ) - { - Musical_pitch m; - m.accidental_i_ = 1; - m.notename_i_ = accidental; - pitch_arr_.push(m); - - accidental = (accidental + 4) % 7 ; - } - } - // Check if transposed old accidentals and the new ones coincide - no_of_acc = pitch_arr_.size(); - int acc_found; - Musical_pitch mm; - for (int i=0; i < old_pitch_arr_.size(); i++) - { - acc_found = 0; - mm = old_pitch_arr_[i]; - mm.transpose(d); - for (int j=0; ((j < no_of_acc) && (acc_found == 0)); j++) - { - if (pitch_arr_[j].notename_i_ == mm.notename_i_) - { - if (mm.accidental_i_ == 0) - { - // remove new accidental - pitch_arr_.del(j); - no_of_acc--; - acc_found = 1; - } - else - { - // change new accidental - pitch_arr_[j].accidental_i_ = mm.accidental_i_; - acc_found = 1; - } - } - } - if (acc_found == 0) - { - // add transposed old accidental - pitch_arr_.push(mm); - } - } - } -} - - -void -Key_change_req::squash_octaves() -{ - for (int i=0; i < pitch_arr_.size(); i++) - { - pitch_arr_[i].octave_i_ = 0; - } -} void -Key_change_req::do_print() const +Key_change_req::do_print () const { #ifndef NPRINT - for (int i=0; i < pitch_arr_.size(); i++) + for (int i=0; i < key_.pitch_arr_.size (); i++) { - pitch_arr_[i].print(); + key_.pitch_arr_[i].print (); } #endif } -Key_change_req::Key_change_req() +Key_change_req::Key_change_req () { - modality_i_ = 0; - ordinary_key_b_= false; } - - Break_req::Break_req () { penalty_i_ = 0; @@ -291,33 +170,3 @@ Mark_req::do_print () const { DOUT << str_; } - -int -Key_change_req::flats_i() -{ - int flats_i = 0; - for (int i = 0; i < pitch_arr_.size(); i++) - { - if (pitch_arr_[i].accidental_i_ < 0) - flats_i -= pitch_arr_[i].accidental_i_; - } - return flats_i; -} - -bool -Key_change_req::minor_b() const -{ - return modality_i_ == 3; -} - -int -Key_change_req::sharps_i() -{ - int sharps_i = 0; - for (int i = 0; i < pitch_arr_.size(); i++) - { - if (pitch_arr_[i].accidental_i_ > 0) - sharps_i += pitch_arr_[i].accidental_i_; - } - return sharps_i; -} diff --git a/lily/graphical-axis-group.cc b/lily/graphical-axis-group.cc index 484b25368d..a3b8ffdb28 100644 --- a/lily/graphical-axis-group.cc +++ b/lily/graphical-axis-group.cc @@ -104,8 +104,8 @@ Graphical_axis_group::do_print() const Graphical_axis_group::Graphical_axis_group () { ordered_b_ = false; - axes_[0] = -1 ; - axes_[1] = -1 ; + axes_[0] = (Axis)-1 ; + axes_[1] = (Axis)-1 ; } void diff --git a/lily/hyphen-engraver.cc b/lily/hyphen-engraver.cc deleted file mode 100644 index 013c9620b6..0000000000 --- a/lily/hyphen-engraver.cc +++ /dev/null @@ -1,121 +0,0 @@ -/* - hyphen-engraver.cc -- implement Hyphen_engraver - - (c) 1999 Glen Prideaux -*/ - -#include "proto.hh" -#include "musical-request.hh" -#include "hyphen-engraver.hh" -#include "hyphen-spanner.hh" -#include "score-column.hh" -#include "text-item.hh" -#include "extender-engraver.hh" - -ADD_THIS_TRANSLATOR (Hyphen_engraver); - -Hyphen_engraver::Hyphen_engraver () -{ - hyphen_spanner_p_ = 0; - req_l_ = 0; -} - -void -Hyphen_engraver::acknowledge_element (Score_element_info i) -{ - if (Text_item* t = dynamic_cast (i.elem_l_)) - { - Rhythmic_req * rh = dynamic_cast (i.req_l_); - if (!rh) - return; - - now_lyrics_.push (Text_lyric_tuple (t, rh, now_mom () + rh->length_mom ())); - /* - UGH. What do we do in case of multiple alternatives? - */ - if (hyphen_spanner_p_ - && !hyphen_spanner_p_->spanned_drul_[RIGHT] - ) - { - hyphen_spanner_p_->set_textitem (RIGHT, t); - } - } -} - - -bool -Hyphen_engraver::do_try_music (Music* r) -{ - if (Hyphen_req* p = dynamic_cast (r)) - { - if (req_l_) - return false; - - req_l_ = p; - return true; - } - return false; -} - -void -Hyphen_engraver::do_removal_processing () -{ - if (hyphen_spanner_p_) - { - req_l_->warning (_ ("unterminated hyphen")); - hyphen_spanner_p_->set_bounds(RIGHT, get_staff_info ().command_pcol_l ()); - } -} - -void -Hyphen_engraver::do_process_requests () -{ - Array stopped_texts; - Moment now = now_mom (); - - stopped_texts.clear (); - while (past_lyrics_pq_.size () - && past_lyrics_pq_.front ().end_ == now) - stopped_texts.push (past_lyrics_pq_.get ()); - - if (req_l_) - { - if (!stopped_texts.size ()) - { - req_l_->warning ("Nothing to connect hyphen to on the left. Ignoring hyphen request"); - return; - } - - hyphen_spanner_p_ = new Hyphen_spanner; - hyphen_spanner_p_->set_textitem (LEFT, stopped_texts[0].text_l_); - announce_element (Score_element_info (hyphen_spanner_p_, req_l_)); - } -} - - -void -Hyphen_engraver::do_pre_move_processing () -{ - for (int i=0; i < now_lyrics_.size (); i++) - { - past_lyrics_pq_.insert (now_lyrics_[i]); - } - now_lyrics_.clear (); - - if (hyphen_spanner_p_) - { - typeset_element (hyphen_spanner_p_); - hyphen_spanner_p_ = 0; - } -} -void -Hyphen_engraver::do_post_move_processing () -{ - Moment now = now_mom (); - while (past_lyrics_pq_.size () && past_lyrics_pq_.front ().end_ < now) - past_lyrics_pq_.delmin (); - - req_l_ =0; -} - - diff --git a/lily/hyphen-spanner.cc b/lily/hyphen-spanner.cc deleted file mode 100644 index 8636dbb756..0000000000 --- a/lily/hyphen-spanner.cc +++ /dev/null @@ -1,96 +0,0 @@ -/* - hyphen-spanner.cc -- implement Hyphen_spanner - - source file of the GNU LilyPond music typesetter - - (c) 1999 Glen Prideaux - - (adapted from extender-spanner) -*/ - -/* - TODO: too complicated implementation. Why the dx_drul?. - */ - -#include -#include "box.hh" -#include "debug.hh" -#include "lookup.hh" -#include "molecule.hh" -#include "p-col.hh" -#include "paper-def.hh" -#include "hyphen-spanner.hh" - -Hyphen_spanner::Hyphen_spanner () - : Directional_spanner () -{ - dx_f_drul_[LEFT] = dx_f_drul_[RIGHT] = 0.0; -} - -// UGH - is this even used? -Offset -Hyphen_spanner::center () const -{ - Real dx = extent (X_AXIS).length (); - - return Offset (dx / 2, 0); -} - -Molecule* -Hyphen_spanner::do_brew_molecule_p () const -{ - Molecule* mol_p = new Molecule; - - Real w = extent (X_AXIS).length (); - - w += (dx_f_drul_[RIGHT] - dx_f_drul_[LEFT]); - - Real th = paper_l ()->get_realvar (hyphen_thickness_scm_sym); - Real h = paper_l ()->get_realvar (hyphen_height_scm_sym); - - // UGH. First try: just make the hyphen take 1/3 of the available space - // for length, use a geometric mean of the available space and some minimum - Real l = paper_l ()->get_realvar (hyphen_minimum_length_scm_sym); - if(l < w) - l = sqrt(l*w); - Molecule a = lookup_l ()->filledbox ( Box (Interval ((w-l)/2,(w+l)/2), Interval (h,h+th))); - a.translate (Offset (dx_f_drul_[LEFT], 0)); - - mol_p->add_molecule (a); - - return mol_p; -} - -Interval -Hyphen_spanner::do_height () const -{ - return Interval (0,0); -} - -void -Hyphen_spanner::do_post_processing () -{ - // UGH - Real nw_f = paper_l ()->note_width () * 0.8; - - Direction d = LEFT; - do - { - Item* t = spanned_drul_[d] - ? spanned_drul_[d] : spanned_drul_[(Direction)-d]; - if (d == LEFT) - dx_f_drul_[d] += t->extent (X_AXIS).length (); - else - dx_f_drul_[d] -= d * nw_f / 2; - } - while (flip(&d) != LEFT); -} - - -void -Hyphen_spanner::set_textitem (Direction d, Item* textitem_l) -{ - set_bounds (d, textitem_l); - add_dependency (textitem_l); -} - diff --git a/lily/include/audio-element.hh b/lily/include/audio-element.hh index dc46b926c6..16955f4027 100644 --- a/lily/include/audio-element.hh +++ b/lily/include/audio-element.hh @@ -12,12 +12,16 @@ #include "virtual-methods.hh" -struct Audio_element { - void print ()const; - - virtual ~Audio_element(); +class Audio_element +{ +public: + Audio_element (); + virtual ~Audio_element (); + + void print () const; protected: virtual void do_print () const; }; + #endif // AUDIO_ELEMENT_HH diff --git a/lily/include/audio-item.hh b/lily/include/audio-item.hh index b6b6d33c00..5c4f8ebce6 100644 --- a/lily/include/audio-item.hh +++ b/lily/include/audio-item.hh @@ -10,26 +10,24 @@ #include "lily-proto.hh" #include "string.hh" #include "audio-element.hh" +#include "key-def.hh" +#include "musical-pitch.hh" +#include "moment.hh" +#include "drul-array.hh" /** Any piece of audio information. - We need virtual constructors, + We need virtual conclassors, let's try decentralised factory for specific audio implemenations. */ -struct Audio_item : public Audio_element { - Audio_item (Request* req_l); - - /// Create a midi-item from myself. - virtual Midi_item* midi_item_p() = 0; +class Audio_item : public Audio_element +{ +public: + Audio_item (); Audio_column* audio_column_l_; - /* - THIS SUX. This ties the output system to the input system. Bad move. - */ - Request* req_l_; - protected: virtual void do_print () const; @@ -38,50 +36,69 @@ private: Audio_item& operator=( Audio_item const&); }; -struct Audio_key : public Audio_item { - Audio_key (Request* req_l); - - virtual Midi_item* midi_item_p(); +class Audio_key : public Audio_item +{ +public: + Audio_key (Key_def const& key); + + Key_def key_; }; -struct Audio_instrument : public Audio_item { +class Audio_instrument : public Audio_item +{ +public: Audio_instrument (String instrument_str); - virtual Midi_item* midi_item_p(); + String str_; - }; -struct Audio_note : public Audio_item { - - Audio_note (Request* req_l, int transposing_i = 0); - virtual Midi_item* midi_item_p(); +class Audio_note : public Audio_item +{ +public: + Audio_note (Musical_pitch p, Moment m, int transposing_i = 0); + + Musical_pitch pitch_; + Moment length_mom_; int transposing_i_; }; -struct Audio_text : Audio_item { +class Audio_text : public Audio_item +{ +public: enum Type { TEXT = 1, COPYRIGHT, TRACK_NAME, INSTRUMENT_NAME, LYRIC, MARKER, CUE_POINT }; Audio_text (Audio_text::Type type, String text_str); - virtual Midi_item* midi_item_p(); Type type_; String text_str_; }; -struct Audio_tempo : Audio_item { +class Audio_tempo : public Audio_item +{ +public: Audio_tempo (int per_minute_4_i); - virtual Midi_item* midi_item_p(); - + int per_minute_4_i_; }; -struct Audio_time_signature : Audio_item { - Audio_time_signature (Request* req_l); - virtual Midi_item* midi_item_p(); - +class Audio_tie : public Audio_item +{ +public: + Audio_tie (); + void set_note (Direction, Audio_note*); + Drul_array note_l_drul_; +}; + +class Audio_time_signature : public Audio_item +{ +public: + Audio_time_signature (int beats, int one_beat); + + int beats_i_; + int one_beat_i_; }; #endif // AUDIO_ITEM_HH diff --git a/lily/include/auto-beam-engraver.hh b/lily/include/auto-beam-engraver.hh index 18b5ffceb0..ce8655dd24 100644 --- a/lily/include/auto-beam-engraver.hh +++ b/lily/include/auto-beam-engraver.hh @@ -25,7 +25,7 @@ protected: virtual void acknowledge_element (Score_element_info); virtual void do_process_requests (); virtual void process_acknowledged (); - + virtual void do_creation_processing (); private: void begin_beam (); void consider_end_and_begin (); @@ -38,12 +38,18 @@ private: Moment shortest_mom_; Beam *finished_beam_p_; Array* stem_l_arr_p_; + Moment last_add_mom_; Moment extend_mom_; + + + Moment beam_start_moment_; + Moment beam_start_location_; + Timing_translator * timer_l_; // We act as if beam were created, and start a grouping anyway. - Rhythmic_grouping*grouping_p_; - Rhythmic_grouping*finished_grouping_p_; + Beaming_info_list*grouping_p_; + Beaming_info_list*finished_grouping_p_; }; #endif /* AUTO_BEAM_ENGRAVER_HH */ diff --git a/lily/include/beam-engraver.hh b/lily/include/beam-engraver.hh index 292977680f..b0001c89df 100644 --- a/lily/include/beam-engraver.hh +++ b/lily/include/beam-engraver.hh @@ -19,8 +19,15 @@ class Beam_engraver : public Engraver { Beam *finished_beam_p_; Beam *beam_p_; Span_req * prev_start_req_; - Rhythmic_grouping*grouping_p_; - Rhythmic_grouping*finished_grouping_p_; + + Beaming_info_list * beam_info_p_; + Beaming_info_list * finished_beam_info_p_; + + /// location within measure where beam started. + Moment beam_start_location_; + + /// moment (global time) where beam started. + Moment beam_start_mom_; void typeset_beam (); protected: diff --git a/lily/include/beam.hh b/lily/include/beam.hh index e8458196eb..39f9b3b99b 100644 --- a/lily/include/beam.hh +++ b/lily/include/beam.hh @@ -59,6 +59,7 @@ public: Stem_info get_stem_info (Stem*); void set_grouping (Rhythmic_grouping def, Rhythmic_grouping current); + void set_beaming (Beaming_info_list *); void set_stemlens (); VIRTUAL_COPY_CONS(Score_element); @@ -72,14 +73,20 @@ protected: virtual void do_pre_processing (); virtual void do_post_processing (); virtual void do_substitute_element_pointer (Score_element*, Score_element*); + virtual void do_add_processing (); virtual void do_print() const; - virtual void quantise_left_y (bool extend_b); - virtual Molecule stem_beams (Stem *here, Stem *next, Stem *prev) const; - virtual void calculate_slope (); - virtual Real check_stemlengths_f (bool set_b); - virtual void solve_slope (); - virtual void quantise_dy (); virtual Molecule*do_brew_molecule_p () const; + + Molecule stem_beams (Stem *here, Stem *next, Stem *prev) const; + +private: + void calculate_slope (); + Real check_stemlengths_f (bool set_b); + void solve_slope (); + + void quantise_left_y (bool extend_b); + void quantise_dy (); + }; #endif // BEAM_HH diff --git a/lily/include/command-request.hh b/lily/include/command-request.hh index 805f100031..47507b8c3c 100644 --- a/lily/include/command-request.hh +++ b/lily/include/command-request.hh @@ -14,6 +14,7 @@ #include "array.hh" #include "duration.hh" #include "musical-pitch.hh" +#include "key-def.hh" class Break_req : public Request { public: @@ -101,15 +102,6 @@ public: VIRTUAL_COPY_CONS(Music); }; -class Measure_grouping_req : public Timing_req { -public: - Array beat_i_arr_; - Array elt_length_arr_; -protected: - virtual void do_print () const; - bool do_equal_b (Request *) const; - VIRTUAL_COPY_CONS(Music); -}; /** draw a (repeat)-bar. This something different than #Barcheck_req#, the latter should only happen at the start of a measure. */ @@ -133,26 +125,15 @@ class Breathing_sign_req : public Request { Routines for sharps and flats are separated, so that caller may identify non-conventional keys. */ -class Key_change_req : public Request { +class Key_change_req : public Request +{ public: - Array pitch_arr_; - int modality_i_; - bool ordinary_key_b_; - - Key_change_req(); - - /// squash the octaves to 1 - void squash_octaves(); - /// return number of flats in key - int flats_i(); - - /// return number of sharps in key - int sharps_i(); - bool minor_b() const; + Key_change_req (); + Key_def key_; protected: VIRTUAL_COPY_CONS(Music); - void transpose (Musical_pitch d); + // void transpose (Musical_pitch d); virtual void do_print () const; }; diff --git a/lily/include/hyphen-engraver.hh b/lily/include/hyphen-engraver.hh deleted file mode 100644 index 6ab2eb59bc..0000000000 --- a/lily/include/hyphen-engraver.hh +++ /dev/null @@ -1,53 +0,0 @@ -/* - hyphen-engraver.hh -- declare Hyphen_engraver - - source file of the GNU LilyPond music typesetter - - (c) 1999 Glen Prideaux -*/ - -#ifndef HYPHEN_ENGRAVER_HH -#define HYPHEN_ENGRAVER_HH - -#include "engraver.hh" -#include "drul-array.hh" -#include "hyphen-spanner.hh" -#include "pqueue.hh" -#include "extender-engraver.hh" - - -/** - Generate an centred hyphen. Should make a Hyphen_spanner that typesets - a nice centred hyphen of varying length depending on the gap between syllables. - - We remember all Text_items that come across, and store their - termination times. When we get a request, we create the spanner, and - attach the left point to the finished lyrics, and the right point to - any lyrics we receive by then. -*/ -class Hyphen_engraver : public Engraver -{ - PQueue past_lyrics_pq_; - Array now_lyrics_; - Array stopped_lyrics_; - - Hyphen_req* req_l_; - Hyphen_spanner* hyphen_spanner_p_; - - -public: - Hyphen_engraver (); - VIRTUAL_COPY_CONS (Translator); - -protected: - virtual void acknowledge_element (Score_element_info); - virtual void do_removal_processing(); - virtual void do_process_requests(); - virtual bool do_try_music (Music*); - virtual void do_pre_move_processing(); - virtual void do_post_move_processing (); -private: - -}; - -#endif // HYPHEN_ENGRAVER_HH diff --git a/lily/include/hyphen-spanner.hh b/lily/include/hyphen-spanner.hh deleted file mode 100644 index e1316252c9..0000000000 --- a/lily/include/hyphen-spanner.hh +++ /dev/null @@ -1,40 +0,0 @@ -/* - hyphen-spanner.hh -- part of GNU LilyPond - - (c) 1999 Glen Prideaux -*/ - -#ifndef HYPHEN_SPANNER_HH -#define HYPHEN_SPANNER_HH - -#include "directional-spanner.hh" - -/** - centred hyphen - - A centred hyphen is a simple line between lyrics used to - divide syllables. - - The length of the hyphen line should stretch based on the - size of the gap between syllables. - */ -class Hyphen_spanner : public Directional_spanner -{ -public: -Hyphen_spanner (); - Offset center () const; - void set_textitem (Direction, Item*); - -protected: - virtual Molecule* do_brew_molecule_p () const; - Interval do_height () const; - - void do_post_processing (); - - VIRTUAL_COPY_CONS (Score_element); - - Drul_array dx_f_drul_; -}; - -#endif // HYPHEN_SPANNER_HH - diff --git a/lily/include/key-performer.hh b/lily/include/key-performer.hh index 127dafb231..896db23ba4 100644 --- a/lily/include/key-performer.hh +++ b/lily/include/key-performer.hh @@ -12,7 +12,8 @@ #include "lily-proto.hh" #include "performer.hh" -class Key_performer : public Performer { +class Key_performer : public Performer +{ public: VIRTUAL_COPY_CONS(Translator); @@ -22,10 +23,12 @@ public: protected: void do_print() const; virtual bool do_try_music (Music* req_l); - virtual void do_process_requests(); + virtual void do_process_requests (); + virtual void do_pre_move_processing (); private: Key_change_req* key_req_l_; + Audio_key* audio_p_; }; #endif // KEY_PERFOMER_HH diff --git a/lily/include/lily-proto.hh b/lily/include/lily-proto.hh index 94f9be43dc..e78946882c 100644 --- a/lily/include/lily-proto.hh +++ b/lily/include/lily-proto.hh @@ -25,10 +25,13 @@ struct Audio_element; struct Audio_element_info; struct Audio_column; struct Audio_item; +struct Audio_instrument; struct Audio_key; +struct Audio_text; struct Audio_time_signature; struct Audio_note; struct Audio_note_off; +struct Audio_tie; struct Audio_staff; struct Audio_tempo; struct Auto_beam_engraver; @@ -46,6 +49,8 @@ struct Barcheck_req; struct Beam; struct Beam_engraver; struct Beam_req; +struct Beaming_info; +struct Beaming_info_list; struct Blank_req; struct Bow; struct Box; @@ -57,7 +62,6 @@ struct Change_iterator; struct Change_translator; struct Chord; struct Chord_name_engraver; -struct CHyphen_req; struct Clef_change_req; struct Clef_item; struct Clef_engraver; @@ -169,7 +173,7 @@ struct Note_req; struct Note_head; struct Note_head_engraver; struct Notename_table; -struct New_repeated_music; +struct Repeated_music; struct Unfolded_repeat_iterator; struct Folded_repeat_iterator; struct Offset; @@ -260,6 +264,8 @@ struct Tonic_req; struct Translator; struct Translator_group; struct Timing_req; +struct Timing_translator; +struct Timing_engraver; struct Vertical_brace; struct Vertical_spanner; diff --git a/lily/include/ly-symbols.hh b/lily/include/ly-symbols.hh index 444da6f181..4383fc8eea 100644 --- a/lily/include/ly-symbols.hh +++ b/lily/include/ly-symbols.hh @@ -18,6 +18,7 @@ DECLARE_LY_SYMBOL(alt_symbol); DECLARE_LY_SYMBOL(at_line_start); +DECLARE_LY_SYMBOL(bar_size); DECLARE_LY_SYMBOL(beam); DECLARE_LY_SYMBOL(beam_thickness); DECLARE_LY_SYMBOL(beam_dir); @@ -35,9 +36,6 @@ DECLARE_LY_SYMBOL(extra_space); DECLARE_LY_SYMBOL(dir_forced); DECLARE_LY_SYMBOL(dir_list); DECLARE_LY_SYMBOL(extender_height); -DECLARE_LY_SYMBOL(hyphen_thickness); -DECLARE_LY_SYMBOL(hyphen_height); -DECLARE_LY_SYMBOL(hyphen_minimum_length); DECLARE_LY_SYMBOL(filledbox); DECLARE_LY_SYMBOL(fontsize); DECLARE_LY_SYMBOL(grace); diff --git a/lily/include/ly-symbols.hh.orig b/lily/include/ly-symbols.hh.orig deleted file mode 100644 index 07890e4c10..0000000000 --- a/lily/include/ly-symbols.hh.orig +++ /dev/null @@ -1,76 +0,0 @@ -/* - ly-symbols.hh -- declare SCM symbols. - - source file of the GNU LilyPond music typesetter - - (c) 1999 Han-Wen Nienhuys - - */ - -#ifndef LY_SYMBOLS_HH -#define LY_SYMBOLS_HH - -#include "lily-guile.hh" - -#ifndef DECLARE_LY_SYMBOL -#define DECLARE_LY_SYMBOL(a) extern SCM a ## _scm_sym -#endif - -DECLARE_LY_SYMBOL(alt_symbol); -DECLARE_LY_SYMBOL(at_line_start); -DECLARE_LY_SYMBOL(beam); -DECLARE_LY_SYMBOL(beam_thickness); -DECLARE_LY_SYMBOL(beam_dir); -DECLARE_LY_SYMBOL(beam_gap); -DECLARE_LY_SYMBOL(bracket); -DECLARE_LY_SYMBOL(break_helper_only); -DECLARE_LY_SYMBOL(break_priority); -DECLARE_LY_SYMBOL(breakable); -DECLARE_LY_SYMBOL(char); -DECLARE_LY_SYMBOL(change); -DECLARE_LY_SYMBOL(damping); -DECLARE_LY_SYMBOL(dashed); -DECLARE_LY_SYMBOL(extremal); -DECLARE_LY_SYMBOL(extra_space); -DECLARE_LY_SYMBOL(dir_forced); -DECLARE_LY_SYMBOL(dir_list); -DECLARE_LY_SYMBOL(extender_height); -DECLARE_LY_SYMBOL(filledbox); -DECLARE_LY_SYMBOL(fontsize); -DECLARE_LY_SYMBOL(grace); -DECLARE_LY_SYMBOL(header); -DECLARE_LY_SYMBOL(horizontal_shift); -DECLARE_LY_SYMBOL(interbeam); -DECLARE_LY_SYMBOL(interbeam4); -DECLARE_LY_SYMBOL(interline); -DECLARE_LY_SYMBOL(length); -DECLARE_LY_SYMBOL(linewidth); -DECLARE_LY_SYMBOL(minimum_space); -DECLARE_LY_SYMBOL(molecule); -DECLARE_LY_SYMBOL(notewidth); -DECLARE_LY_SYMBOL(non_default); -DECLARE_LY_SYMBOL(octave_dir); -DECLARE_LY_SYMBOL(origin); -DECLARE_LY_SYMBOL(output); -DECLARE_LY_SYMBOL(padding); -DECLARE_LY_SYMBOL(pianobrace); -DECLARE_LY_SYMBOL(placebox); -DECLARE_LY_SYMBOL(rulesym); -DECLARE_LY_SYMBOL(rulethickness); -DECLARE_LY_SYMBOL(script_priority); -DECLARE_LY_SYMBOL(staffheight); -DECLARE_LY_SYMBOL(style); -DECLARE_LY_SYMBOL(text); -DECLARE_LY_SYMBOL(transparent); -DECLARE_LY_SYMBOL(tuplet); -DECLARE_LY_SYMBOL(tuplet_thick); -DECLARE_LY_SYMBOL(tuplet_visibility); -DECLARE_LY_SYMBOL(visibility_lambda); -DECLARE_LY_SYMBOL(volta); -DECLARE_LY_SYMBOL(void); -DECLARE_LY_SYMBOL(volta_thick); - - - -#endif /* LY_SYMBOLS_HH */ - diff --git a/lily/include/lyric-performer.hh b/lily/include/lyric-performer.hh index c2e03d0727..d5198fafac 100644 --- a/lily/include/lyric-performer.hh +++ b/lily/include/lyric-performer.hh @@ -17,15 +17,17 @@ class Lyric_performer : public Performer { public: VIRTUAL_COPY_CONS(Translator); - + Lyric_performer (); protected: void do_print() const; virtual bool do_try_music (Music* req_l); virtual void do_process_requests(); + virtual void do_pre_move_processing (); private: Link_array lreq_arr_; + Audio_text* audio_p_; }; #endif // LYRIC_PERFOMER_HH diff --git a/lily/include/midi-item.hh b/lily/include/midi-item.hh index eb3b9f5276..6a64b0b93d 100644 --- a/lily/include/midi-item.hh +++ b/lily/include/midi-item.hh @@ -18,39 +18,41 @@ Maybe use base classes for RIFF files? */ -struct Midi_item { - Midi_item (Audio_item* audio_item_l); +class Midi_item +{ +public: + Midi_item (); virtual ~Midi_item (); + + /// factory + static Midi_item* midi_p (Audio_item* a); + static String i2varint_str (int i); + virtual String str () const = 0; - Audio_item* audio_item_l_; int channel_i_; - -private: - Midi_item (Midi_item const&); - Midi_item& operator = ( Midi_item const&); }; /** timed MIDI event */ -struct Midi_event +class Midi_event { - Midi_event (Moment delta_mom, Midi_item* mitem_l); - ~Midi_event (); +public: + Midi_event (Moment delta_mom, Midi_item* midi_l); + Moment delta_mom_; - Midi_item* mitem_p_; + Midi_item* midi_p_; String str () const; }; /** variable sized MIDI data */ -struct Midi_chunk : Midi_item { - - Midi_chunk (); - +class Midi_chunk : public Midi_item +{ +public: void set (String header_str, String data_str, String footer_str); virtual String str () const; virtual String data_str () const; @@ -61,51 +63,70 @@ private: String header_str_; }; -struct Midi_duration : public Midi_item { +class Midi_duration : public Midi_item +{ +public: Midi_duration (Real seconds_f); virtual String str () const; Real seconds_f_; }; -struct Midi_header : Midi_chunk { +class Midi_header : public Midi_chunk +{ +public: Midi_header (int format_i, int tracks_i, int clocks_per_4_i); }; /** Change instrument event */ -struct Midi_instrument : public Midi_item { - Midi_instrument (int channel_i, String instrument_str); +class Midi_instrument : public Midi_item +{ +public: + Midi_instrument (Audio_instrument*); virtual String str () const; - String instrument_str_; + + Audio_instrument* audio_l_; }; -struct Midi_key : public Midi_item { - Midi_key (Audio_item* audio_item_l); +class Midi_key : public Midi_item +{ +public: + Midi_key (Audio_key*); virtual String str () const; + + Audio_key* audio_l_; }; -struct Midi_time_signature : Midi_item { - Midi_time_signature (Audio_item* audio_item_l); +class Midi_time_signature : public Midi_item +{ +public: + Midi_time_signature (Audio_time_signature*); virtual String str () const; + + Audio_time_signature* audio_l_; int clocks_per_1_i_; }; /** Turn a note on. */ -struct Midi_note : public Midi_item { - Midi_note (Audio_item* audio_item_l); +class Midi_note : public Midi_item +{ +public: + Midi_note (Audio_note*); Moment length_mom () const; int pitch_i () const; virtual String str () const; + Audio_note* audio_l_; + static int const c0_pitch_i_c_ = 60; Byte dynamic_byte_; }; @@ -113,53 +134,53 @@ struct Midi_note : public Midi_item { /** Turn a note off */ -struct Midi_note_off : public Midi_item { +class Midi_note_off : public Midi_item +{ +public: Midi_note_off (Midi_note*); int pitch_i () const; virtual String str () const; + Midi_note* on_l_; Byte aftertouch_byte_; }; -struct Midi_text : Midi_item { - - +class Midi_text : public Midi_item +{ +public: enum Type { TEXT = 1, COPYRIGHT, TRACK_NAME, INSTRUMENT_NAME, LYRIC, MARKER, CUE_POINT }; - Midi_text (Midi_text::Type type, String text_str); - Midi_text (Audio_item* audio_item_l); + + Midi_text (Audio_text*); virtual String str () const; - Type type_; - String text_str_; + Audio_text* audio_l_; }; -struct Midi_tempo : Midi_item { - Midi_tempo (int per_minute_4_i); - Midi_tempo (Audio_item* audio_item_l); +class Midi_tempo : public Midi_item +{ +public: + Midi_tempo (Audio_tempo*); virtual String str () const; - int per_minute_4_i_; + Audio_tempo* audio_l_; }; -struct Midi_track : Midi_chunk { +class Midi_track : public Midi_chunk +{ +public: int number_i_; Cons_list event_p_list_; Midi_track (); - ~Midi_track (); - void add (Moment delta_time_mom, Midi_item* mitem_l); + void add (Moment delta_time_mom, Midi_item* midi_l); virtual String data_str () const; - -private: - // copy trap - Midi_track (Midi_track const&); }; #endif // MIDI_ITEM_HH diff --git a/lily/include/midi-stream.hh b/lily/include/midi-stream.hh index 08643bb8d1..f367d62a2a 100644 --- a/lily/include/midi-stream.hh +++ b/lily/include/midi-stream.hh @@ -16,7 +16,7 @@ struct Midi_stream { ~Midi_stream(); Midi_stream& operator <<( String str); - Midi_stream& operator <<( Midi_item const& mitem_c_r); + Midi_stream& operator <<( Midi_item const& midi_c_r); Midi_stream& operator <<( int i); void open(); diff --git a/lily/include/musical-request.hh b/lily/include/musical-request.hh index 88d5f6fbce..2c220138a9 100644 --- a/lily/include/musical-request.hh +++ b/lily/include/musical-request.hh @@ -145,10 +145,4 @@ public: VIRTUAL_COPY_CONS(Music); }; -/// a centred hyphen -class Hyphen_req : public Request { -public: - VIRTUAL_COPY_CONS(Music); -}; - #endif // MUSICALREQUESTS_HH diff --git a/lily/include/musical-request.hh.orig b/lily/include/musical-request.hh.orig deleted file mode 100644 index 2c220138a9..0000000000 --- a/lily/include/musical-request.hh.orig +++ /dev/null @@ -1,148 +0,0 @@ -/* - musical-request.hh -- declare Musical requests - - source file of the GNU LilyPond music typesetter - - (c) 1997--1999 Han-Wen Nienhuys -*/ - - -#ifndef MUSICALREQUESTS_HH -#define MUSICALREQUESTS_HH - -#include "lily-proto.hh" -#include "request.hh" -#include "duration.hh" -#include "musical-pitch.hh" - - -/** a request with a duration. - This request is used only used as a base class. - */ -class Rhythmic_req : public virtual Request { -public: - Duration duration_; - virtual void do_print () const; - - bool do_equal_b (Request*) const; - void compress (Moment); - virtual Moment length_mom () const; - static int compare (Rhythmic_req const&,Rhythmic_req const&); - VIRTUAL_COPY_CONS(Music); -}; - -class Skip_req : public Rhythmic_req { -public: - VIRTUAL_COPY_CONS(Music); -}; - - -struct Tremolo_req : public Request { - VIRTUAL_COPY_CONS (Music); - Tremolo_req (); - int type_i_; - virtual void do_print () const; -}; - - -/** a syllable or lyric is a string with rhythm. - */ -class Lyric_req : public Rhythmic_req { -public: - virtual void do_print () const; - String text_str_; - VIRTUAL_COPY_CONS(Music); -}; - - -class Articulation_req : public Script_req -{ -public: - String articulation_str_; -protected: - virtual bool do_equal_b (Request*) const; - virtual void do_print () const; - VIRTUAL_COPY_CONS(Music); -}; - -class Text_script_req : public Script_req { -public: - String text_str_; - - // should be generic property of some kind.. - String style_str_; -protected: - VIRTUAL_COPY_CONS(Music); - virtual bool do_equal_b (Request*)const; - virtual void do_print () const; -}; - - -/// request which has some kind of pitch -struct Melodic_req :virtual Request -{ - Musical_pitch pitch_; - - static int compare (Melodic_req const&,Melodic_req const&); - -protected: - /// transpose. #delta# is relative to central c. - virtual void transpose (Musical_pitch delta); - virtual bool do_equal_b (Request*) const; - virtual void do_print () const; - VIRTUAL_COPY_CONS(Music); -}; - -/// specify tonic of a chord -struct Tonic_req : public Melodic_req -{ - VIRTUAL_COPY_CONS(Music); -}; - -/// Put a note of specified type, height, and with accidental on the staff. -class Note_req : public Rhythmic_req, virtual public Melodic_req { -public: - - /// force/supress printing of accidental. - bool forceacc_b_; - /// Cautionary, i.e. parenthesized accidental. - bool cautionary_b_; - Note_req(); -protected: - virtual void do_print () const; - bool do_equal_b (Request*) const; - VIRTUAL_COPY_CONS(Music); -}; - -/** -Put a rest on the staff. Why a request? It might be a good idea to not typeset the rest, if the paper is too crowded. -*/ -class Rest_req : public Rhythmic_req { -public: - VIRTUAL_COPY_CONS(Music); -}; - -/** - Part: typeset a measure with the number of measures rest - Score: typeset all individual measures as full rests - */ -class Multi_measure_rest_req : public Rhythmic_req { -public: - VIRTUAL_COPY_CONS(Music); -}; - -/** - Typeset a repetition sign in each bar. - */ -class Repetitions_req : public Rhythmic_req { -public: - VIRTUAL_COPY_CONS(Music); -}; - -/// an extender line -class Extender_req : public Request { -public: - VIRTUAL_COPY_CONS(Music); -}; - -#endif // MUSICALREQUESTS_HH diff --git a/lily/include/new-beaming.hh b/lily/include/new-beaming.hh new file mode 100644 index 0000000000..c4c0778b42 --- /dev/null +++ b/lily/include/new-beaming.hh @@ -0,0 +1,39 @@ +/* + new-beaming.hh -- declare New_beaming.hh + + source file of the GNU LilyPond music typesetter + + (c) 1999 Han-Wen Nienhuys + + */ + +#ifndef NEW_BEAMING_HH +#define NEW_BEAMING_HH + +#include "parray.hh" +#include "drul-array.hh" +#include "moment.hh" + +struct Beaming_info +{ + Moment start_mom_; + Drul_array beams_i_drul_; + + Beaming_info (Moment, int); + int count (Direction d); + Beaming_info (); +}; + +struct Beaming_info_list +{ + Array infos_; + + int beam_extend_count (Direction) const; + int min_denominator_index () const; + void beamify (); + void add_stem (Moment d, int beams); +}; + + +#endif /* NEW_BEAMING_HH */ + diff --git a/lily/include/new-repeated-music.hh b/lily/include/new-repeated-music.hh index 8185180203..5cf2ff3166 100644 --- a/lily/include/new-repeated-music.hh +++ b/lily/include/new-repeated-music.hh @@ -1,5 +1,5 @@ /* - new-repeated-music.hh -- declare New_repeated_music + new-repeated-music.hh -- declare Repeated_music source file of the GNU LilyPond music typesetter @@ -7,8 +7,8 @@ */ -#ifndef NEW_REPEATED_MUSIC_HH -#define NEW_REPEATED_MUSIC_HH +#ifndef RepEATED_MUSIC_HH +#define RepEATED_MUSIC_HH #include "music.hh" @@ -47,7 +47,7 @@ the first alternative is assumed to be repeated. */ -class New_repeated_music : public Music +class Repeated_music : public Music { public: bool fold_b_; @@ -75,12 +75,12 @@ public: virtual void compress (Moment factor); VIRTUAL_COPY_CONS(Music); - New_repeated_music (Music*, int , Music_sequence*); - New_repeated_music (New_repeated_music const&); - ~New_repeated_music (); + Repeated_music (Music*, int , Music_sequence*); + Repeated_music (Repeated_music const&); + ~Repeated_music (); protected: virtual void do_print() const; }; -#endif /* NEW_REPEATED_MUSIC_HH */ +#endif /* RepEATED_MUSIC_HH */ diff --git a/lily/include/note-performer.hh b/lily/include/note-performer.hh index 837804367b..bfd49375c1 100644 --- a/lily/include/note-performer.hh +++ b/lily/include/note-performer.hh @@ -21,12 +21,14 @@ public: Note_performer(); protected: - virtual void do_process_requests(); + virtual void do_process_requests (); virtual bool do_try_music (Music *req_l) ; - virtual void do_print() const; + virtual void do_print () const; + virtual void do_pre_move_processing (); private: - Array note_req_l_; + Array note_req_l_arr_; + Array note_p_arr_; }; #endif // NOTE_PERFORMER_HH diff --git a/lily/include/paper-outputter.hh b/lily/include/paper-outputter.hh index 8eeae2cf30..f5c103d0a7 100644 --- a/lily/include/paper-outputter.hh +++ b/lily/include/paper-outputter.hh @@ -24,9 +24,6 @@ */ class Paper_outputter { -#ifdef __powerpc__ - Protected_scm port_; -#endif public: Paper_outputter (Paper_stream *); ~Paper_outputter (); diff --git a/lily/include/performer.hh b/lily/include/performer.hh index 03fea2f259..ce5b71ad51 100644 --- a/lily/include/performer.hh +++ b/lily/include/performer.hh @@ -19,17 +19,19 @@ Convert a music definition into a audio representation. A baseclass */ -class Performer : public virtual Translator{ +class Performer : public virtual Translator +{ public: VIRTUAL_COPY_CONS(Translator); friend class Performer_group_performer; Performer_group_performer* daddy_perf_l() const; + protected: virtual void announce_element (Audio_element_info); virtual void acknowledge_element (Audio_element_info); virtual void process_acknowledged (); virtual int get_tempo_i() const; - virtual void play (Audio_element * elem_p ); + virtual void play_element (Audio_element * elem_p ); }; diff --git a/lily/include/repeat-engraver.hh b/lily/include/repeat-engraver.hh index c5bcd04f81..2a4067e02e 100644 --- a/lily/include/repeat-engraver.hh +++ b/lily/include/repeat-engraver.hh @@ -10,6 +10,23 @@ #define REPEAT_ENGRAVER_HH #include "engraver.hh" +#include "cons.hh" + +struct Bar_create_event +{ + Moment when_; + bool bar_b_; + bool last_b_; + String type_; + Bar_create_event(); + Bar_create_event (Moment w, String s); + Bar_create_event (Moment w, int i, int j); +}; + +int compare (Bar_create_event const & c1, Bar_create_event const &c2) +{ + return (c1.when_ - c2.when_).sign(); +} /** Generate repeat-bars |: :| for repeated-music @@ -17,26 +34,28 @@ class Repeat_engraver : public Engraver { public: - VIRTUAL_COPY_CONS(Translator); - + Repeat_engraver (); protected: virtual void acknowledge_element (Score_element_info i); virtual void do_removal_processing (); virtual bool do_try_music (Music *req_l); virtual void do_process_requests(); virtual void do_pre_move_processing(); + virtual void do_post_move_processing (); + void queue_events (); private: - Link_array repeated_music_arr_; - Link_array alternative_music_arr_; - - Array bar_b_arr_; - Link_array volta_p_arr_; - Array stop_mom_arr_; - Array alternative_start_mom_arr_; - Array alternative_stop_mom_arr_; - Array alternative_str_arr_; + Repeated_music *repeated_music_l_; + bool done_this_one_b_; + + /* + Royal_brackla_create_queue is only two Whiskies away. :-) + */ + Cons *create_barmoments_queue_; + + Volta_spanner * volta_span_p_; + Volta_spanner* end_volta_span_p_; }; #endif // REPEAT_ENGRAVER_HH diff --git a/lily/include/rhythmic-grouping.hh b/lily/include/rhythmic-grouping.hh deleted file mode 100644 index e737227c92..0000000000 --- a/lily/include/rhythmic-grouping.hh +++ /dev/null @@ -1,60 +0,0 @@ -/* - rhythmic-grouping.hh -- part of GNU LilyPond - - (c) 1996--1999 Han-Wen Nienhuys -*/ - -#ifndef RHYTHMIC_GROUPING_HH -#define RHYTHMIC_GROUPING_HH - -#include "minterval.hh" -#include "parray.hh" - -/** data structure which represents rhythmic units this is a tree. It groupes notes according to rules - - TODO Documentation. Unhairing - */ -struct Rhythmic_grouping { - Link_array children; - MInterval *interval_; - - - Array intervals(); - MInterval interval() const; - Moment length_mom () const; - void intersect (MInterval); - - void operator=(Rhythmic_grouping const&); - Rhythmic_grouping (Rhythmic_grouping const&); - Rhythmic_grouping (MInterval, int n=1); - Rhythmic_grouping(); - Rhythmic_grouping (Link_array); - ~Rhythmic_grouping(); - - void add_child (Moment start, Moment len); - bool child_fit_b (Moment start); - void split (Rhythmic_grouping r); - void split (Array); - void split (int n); - - void print() const; - void OK() const; - - Array generate_beams (Array, int&); - - /** multiply self to span #i#. - In implementation, this isn't really const, but conceptually it is. - */ - void extend (MInterval i) const; - void translate (Moment); -private: - void init(); - void junk(); - void copy (Rhythmic_grouping const&); -}; - - -Rhythmic_grouping parse_grouping (Array beat_i_arr, Array elt_length_arr); - - -#endif // RHYTHMIC_GROUPING_HH diff --git a/lily/include/score-engraver.hh b/lily/include/score-engraver.hh index 731f489921..e98e002681 100644 --- a/lily/include/score-engraver.hh +++ b/lily/include/score-engraver.hh @@ -35,7 +35,7 @@ public: VIRTUAL_COPY_CONS(Translator); Paper_score * pscore_p_; - + void forbid_breaks (); Score_engraver(); virtual Music_output *get_output_p (); protected: diff --git a/lily/include/score-performer.hh b/lily/include/score-performer.hh index 62abffaed8..289f694828 100644 --- a/lily/include/score-performer.hh +++ b/lily/include/score-performer.hh @@ -30,9 +30,11 @@ protected: virtual void process(); virtual void start(); virtual void do_add_processing (); + virtual void announce_element (Audio_element_info); virtual int get_tempo_i() const; - virtual void play (Audio_element* p); + virtual void play_element (Audio_element* p); virtual Music_output *get_output_p (); + private: void header (Midi_stream&); diff --git a/lily/include/staff-info.hh b/lily/include/staff-info.hh index 72ec7831da..3eaa1a4e48 100644 --- a/lily/include/staff-info.hh +++ b/lily/include/staff-info.hh @@ -18,7 +18,6 @@ */ struct Staff_info { Time_description const *time_C_; - Rhythmic_grouping const *rhythmic_C_; Score_column *musical_l_; Score_column *command_l_; diff --git a/lily/include/staff-performer.hh b/lily/include/staff-performer.hh index d9b2471c3e..1eb3cda727 100644 --- a/lily/include/staff-performer.hh +++ b/lily/include/staff-performer.hh @@ -11,7 +11,7 @@ #include "performer-group-performer.hh" /** Perform a staff. Individual notes should have their instrument - (staff-wide) set, so we override play() + (staff-wide) set, so we override play_element() */ class Staff_performer : public Performer_group_performer @@ -27,13 +27,18 @@ public: String instrument_str_; protected: - virtual void play (Audio_element* p); + virtual void play_element (Audio_element* p); virtual void do_removal_processing (); virtual void do_creation_processing (); virtual void do_process_requests (); + virtual void do_pre_move_processing (); private: Audio_staff* audio_staff_p_; + Audio_instrument* instrument_p_; + Audio_text* instrument_name_p_; + Audio_text* name_p_; + Audio_tempo* tempo_p_; }; #endif // STAFF_PERFORMER_HH diff --git a/lily/include/swallow-perf.hh b/lily/include/swallow-perf.hh index 9d3ea590c0..38b84befe3 100644 --- a/lily/include/swallow-perf.hh +++ b/lily/include/swallow-perf.hh @@ -12,7 +12,8 @@ #include "performer.hh" -class Swallow_performer : public Performer { +class Swallow_performer : public Performer +{ public: VIRTUAL_COPY_CONS(Translator); diff --git a/lily/include/time-description.hh b/lily/include/time-description.hh index e32f4fcaa8..29c9ddcbd5 100644 --- a/lily/include/time-description.hh +++ b/lily/include/time-description.hh @@ -15,15 +15,15 @@ struct Time_description { Moment when_; - /// found an error so far? - bool error_b_ ; - /// if true, no bars needed, no reduction of whole_in_measure bool cadenza_b_; /// current measure info Moment whole_per_measure_; + /* + ugh: naming! junk whole_ prefixes. + */ /// where am i Moment whole_in_measure_; diff --git a/lily/include/time-signature-engraver.hh b/lily/include/time-signature-engraver.hh index 8d5a78bf63..9567489243 100644 --- a/lily/include/time-signature-engraver.hh +++ b/lily/include/time-signature-engraver.hh @@ -11,7 +11,6 @@ #define TIME_SIG_ENGRAVER_HH #include "engraver.hh" #include "time-description.hh" -#include "rhythmic-grouping.hh" /** generate time_signatures. diff --git a/lily/include/time-signature-performer.hh b/lily/include/time-signature-performer.hh index b86e9b4a6a..e03514706d 100644 --- a/lily/include/time-signature-performer.hh +++ b/lily/include/time-signature-performer.hh @@ -6,13 +6,14 @@ (c) 1997--1999 Jan Nieuwenhuizen */ -#ifndef METER_PERFOMER_HH -#define METER_PERFOMER_HH +#ifndef TIME_SIGNATURE_PERFORMER_HH +#define TIME_SIGNATURE_PERFORMER_HH #include "lily-proto.hh" #include "performer.hh" -class Time_signature_performer : public Performer { +class Time_signature_performer : public Performer +{ public: VIRTUAL_COPY_CONS(Translator); @@ -23,9 +24,11 @@ protected: void do_print() const; virtual bool do_try_music (Music* req_l); virtual void do_process_requests(); + virtual void do_pre_move_processing (); private: Time_signature_change_req* time_signature_req_l_; + Audio_time_signature* audio_p_; }; -#endif // METER_PERFOMER_HH +#endif // TIME_SIGNATURE_PERFORMER_HH diff --git a/lily/include/timing-engraver.hh b/lily/include/timing-engraver.hh index 1fc1524b53..00d55c5a46 100644 --- a/lily/include/timing-engraver.hh +++ b/lily/include/timing-engraver.hh @@ -11,6 +11,7 @@ #define TIMING_GRAV_HH #include "timing-translator.hh" +#include "engraver.hh" /** Do time bookkeeping diff --git a/lily/include/timing-translator.hh b/lily/include/timing-translator.hh index 5f67f7b984..ad2517ee22 100644 --- a/lily/include/timing-translator.hh +++ b/lily/include/timing-translator.hh @@ -12,7 +12,6 @@ #include "translator.hh" #include "time-description.hh" -#include "rhythmic-grouping.hh" #include "parray.hh" class Timing_translator : public virtual Translator @@ -20,10 +19,9 @@ class Timing_translator : public virtual Translator public: VIRTUAL_COPY_CONS(Translator); Time_signature_change_req * time_signature_req_l () const; - Timing_translator (); Time_description time_; - Rhythmic_grouping default_grouping_; + Link_array timing_req_l_arr_; protected: virtual void do_print () const; diff --git a/lily/include/volta-spanner.hh b/lily/include/volta-spanner.hh index a1debb439b..636acf03bb 100644 --- a/lily/include/volta-spanner.hh +++ b/lily/include/volta-spanner.hh @@ -19,10 +19,10 @@ public: Volta_spanner (); void add_column (Note_column*); - void add_column (Bar*); + void add_bar (Bar*); String number_str_; - Link_array column_arr_; + Link_array bar_arr_; Link_array note_column_arr_; bool last_b_; diff --git a/lily/item.cc b/lily/item.cc index f74418df8d..40da38cb8c 100644 --- a/lily/item.cc +++ b/lily/item.cc @@ -53,9 +53,9 @@ Item::line_l() const void Item::copy_breakable_items() { - if (broken_to_drul_[LEFT] || broken_to_drul_[RIGHT] - || ! breakable_b ()) - return; + if (broken_to_drul_[LEFT] || broken_to_drul_[RIGHT] + || !breakable_b ()) + return ; Drul_array new_copies; Direction i=LEFT; @@ -114,7 +114,8 @@ Item::do_breakable_col_processing() { if (breakable_b ()) do_break (); - + else + try_visibility_lambda (); } Item* Item::find_prebroken_piece (Line_of_score*l) const diff --git a/lily/key-engraver.cc b/lily/key-engraver.cc index 0fc8ad8946..50b137ab89 100644 --- a/lily/key-engraver.cc +++ b/lily/key-engraver.cc @@ -134,27 +134,11 @@ Key_engraver::read_req (Key_change_req const * r) accidental_idx_arr_.clear (); - if (r->ordinary_key_b_) + if (r->key_.ordinary_key_b_) { - int p; - if (r->pitch_arr_.size () < 1) - { - r->warning (_ ("No key name: assuming `C'")); - p = 0; - } - else - { - p = r->pitch_arr_[0].semitone_pitch (); - p += r->modality_i_; - } - /* Solve the equation 7*no_of_acc mod 12 = p, -6 <= no_of_acc <= 5 */ - int no_of_acc = (7*p) % 12; - no_of_acc = (no_of_acc + 18) % 12 -6; - - /* Correct from flats to sharps or vice versa */ - if (no_of_acc * r->pitch_arr_[0].accidental_i_ < 0) - no_of_acc += 12 * sign (r->pitch_arr_[0].accidental_i_); + int no_of_acc = r->key_.ordinary_accidentals_i (); + // Hmm, can't these be handled/constructed by Key_change_req? if (no_of_acc < 0) { int accidental = 6 ; // First accidental: bes @@ -192,9 +176,9 @@ Key_engraver::read_req (Key_change_req const * r) } else // Special key { - for (int i = 0; i < r->pitch_arr_.size (); i ++) + for (int i = 0; i < r->key_.pitch_arr_.size (); i ++) { - Musical_pitch m_l =r->pitch_arr_[i]; + Musical_pitch m_l =r->key_.pitch_arr_[i]; if (key_.multi_octave_b_) key_.set (m_l); else diff --git a/lily/key-performer.cc b/lily/key-performer.cc index ce9be75422..14d73dbbb9 100644 --- a/lily/key-performer.cc +++ b/lily/key-performer.cc @@ -13,32 +13,47 @@ -ADD_THIS_TRANSLATOR(Key_performer); +ADD_THIS_TRANSLATOR (Key_performer); -Key_performer::Key_performer() +Key_performer::Key_performer () { key_req_l_ = 0; + audio_p_ = 0; } -Key_performer::~Key_performer() +Key_performer::~Key_performer () { } void -Key_performer::do_print() const +Key_performer::do_print () const { #ifndef NPRINT if (key_req_l_) - key_req_l_->print(); + key_req_l_->print (); #endif } void -Key_performer::do_process_requests() +Key_performer::do_process_requests () { if (key_req_l_) - play (new Audio_key (key_req_l_)); - key_req_l_ = 0; + { + audio_p_ = new Audio_key (key_req_l_->key_); + Audio_element_info info (audio_p_, key_req_l_); + announce_element (info); + key_req_l_ = 0; + } +} + +void +Key_performer::do_pre_move_processing () +{ + if (audio_p_) + { + play_element (audio_p_); + audio_p_ = 0; + } } bool diff --git a/lily/lexer.ll b/lily/lexer.ll index 8c340af25c..e9a0c10371 100644 --- a/lily/lexer.ll +++ b/lily/lexer.ll @@ -93,7 +93,7 @@ NOTECOMMAND \\{A}+ LYRICS ({AA}|{TEX})[^0-9 \t\n\f]* ESCAPED [nt\\'"] EXTENDER __ -HYPHEN -- + %% @@ -267,8 +267,6 @@ HYPHEN -- String s (YYText ()); if (s == "__") return yylval.i = EXTENDER; - if (s == "--") - return yylval.i = HYPHEN; int i = 0; while ((i=s.index_i ("_")) != -1) // change word binding "_" to " " *(s.ch_l () + i) = ' '; diff --git a/lily/lyric-performer.cc b/lily/lyric-performer.cc index 7ae0484379..be719e1c03 100644 --- a/lily/lyric-performer.cc +++ b/lily/lyric-performer.cc @@ -10,25 +10,42 @@ #include "musical-request.hh" #include "audio-item.hh" +ADD_THIS_TRANSLATOR (Lyric_performer); - - -ADD_THIS_TRANSLATOR(Lyric_performer); +Lyric_performer::Lyric_performer () +{ + audio_p_ = 0; +} void -Lyric_performer::do_print() const +Lyric_performer::do_print () const { #ifndef NPRINT - if (lreq_arr_.size()) - lreq_arr_[0]->print(); + if (lreq_arr_.size ()) + lreq_arr_[0]->print (); #endif } void -Lyric_performer::do_process_requests() +Lyric_performer::do_process_requests () { - if (lreq_arr_.size() && lreq_arr_[0]->text_str_.length_i()) - play (new Audio_text (Audio_text::LYRIC, lreq_arr_[0]->text_str_)); + if (lreq_arr_.size () && lreq_arr_[0]->text_str_.length_i ()) + { + audio_p_ = new Audio_text (Audio_text::LYRIC, lreq_arr_[0]->text_str_); + Audio_element_info info (audio_p_, lreq_arr_[0]); + announce_element (info); + } + lreq_arr_.clear(); +} + +void +Lyric_performer::do_pre_move_processing () +{ + if (audio_p_) + { + play_element (audio_p_); + audio_p_ = 0; + } lreq_arr_.clear(); } diff --git a/lily/midi-item.cc b/lily/midi-item.cc index b358e18433..b52ca3cf16 100644 --- a/lily/midi-item.cc +++ b/lily/midi-item.cc @@ -11,17 +11,33 @@ #include "misc.hh" #include "string.hh" #include "string-convert.hh" -#include "command-request.hh" -#include "musical-request.hh" #include "midi-item.hh" #include "midi-stream.hh" #include "audio-item.hh" +#include "duration.hh" #include "killing-cons.tcc" -Midi_chunk::Midi_chunk () - : Midi_item (0) +Midi_item* +Midi_item::midi_p (Audio_item* a) { + if (Audio_key* i = dynamic_cast (a)) + return new Midi_key (i); + else if (Audio_instrument* i = dynamic_cast (a)) + return i->str_.length_i () ? new Midi_instrument (i) : 0; + else if (Audio_note* i = dynamic_cast (a)) + return new Midi_note (i); + else if (Audio_tempo* i = dynamic_cast (a)) + return new Midi_tempo (i); + else if (Audio_time_signature* i = dynamic_cast (a)) + return new Midi_time_signature (i); + else if (Audio_text* i = dynamic_cast (a)) + return i->text_str_.length_i () ? new Midi_text (i) : 0; + else + assert (0); + + // isn't C++ grand? + return 0; } void @@ -43,12 +59,7 @@ Midi_chunk::str () const { String str = header_str_; String dat = data_str (); -#if 1 String length_str = String_convert::i2hex_str (dat.length_i () -#else - // huh, huh?? - String length_str = String_convert::i2hex_str (data_str_.length_i () -#endif + footer_str_.length_i (), 8, '0'); length_str = String_convert::hex2bin_str (length_str); str += length_str; @@ -58,7 +69,6 @@ Midi_chunk::str () const } Midi_duration::Midi_duration (Real seconds_f) - : Midi_item (0) { seconds_f_ = seconds_f; } @@ -69,16 +79,10 @@ Midi_duration::str () const return String (""; } -Midi_event::Midi_event (Moment delta_mom, Midi_item* mitem_p) +Midi_event::Midi_event (Moment delta_mom, Midi_item* midi_p) { delta_mom_ = delta_mom; - mitem_p_ = mitem_p; -} - -Midi_event::~Midi_event () -{ -// uhuh -// delete mitem_p_; + midi_p_ = midi_p; } String @@ -86,14 +90,13 @@ Midi_event::str () const { int delta_i = delta_mom_ * Moment (Duration::division_1_i_s); String delta_str = Midi_item::i2varint_str (delta_i); - String mitem_str = mitem_p_->str (); - assert (mitem_str.length_i ()); - return delta_str + mitem_str; + String midi_str = midi_p_->str (); + assert (midi_str.length_i ()); + return delta_str + midi_str; } Midi_header::Midi_header (int format_i, int tracks_i, int clocks_per_4_i) - : Midi_chunk () { String str; @@ -277,16 +280,10 @@ char const* const instrument_name_sz_a_[ ] = { 0 }; -Midi_instrument::Midi_instrument (int channel_i, String instrument_str) - : Midi_item (0) -{ - instrument_str_ = instrument_str; - instrument_str_.to_lower (); - channel_i_ = channel_i; -} - -Midi_item::~Midi_item () +Midi_instrument::Midi_instrument (Audio_instrument* a) { + audio_l_ = a; + audio_l_->str_.to_lower (); } String @@ -295,7 +292,7 @@ Midi_instrument::str () const Byte program_byte = 0; bool found = false; for (int i = 0; !found && instrument_name_sz_a_[i]; i++) - if (instrument_str_ == String (instrument_name_sz_a_[ i ])) + if (audio_l_->str_ == String (instrument_name_sz_a_[ i ])) { program_byte = (Byte)i; found = true; @@ -303,7 +300,7 @@ Midi_instrument::str () const if (!found) { - warning (_f("No such instrument: `%s'", instrument_str_.ch_C ())); + warning (_f("No such instrument: `%s'", audio_l_->str_.ch_C ())); } String str = to_str ((char) (0xc0 + channel_i_)); @@ -311,12 +308,15 @@ Midi_instrument::str () const return str; } -Midi_item::Midi_item (Audio_item* audio_item_l) +Midi_item::Midi_item () { - audio_item_l_ = audio_item_l; channel_i_ = 0; } +Midi_item::~Midi_item () +{ +} + String Midi_item::i2varint_str (int i) { @@ -340,17 +340,16 @@ Midi_item::i2varint_str (int i) return str; } -Midi_key::Midi_key (Audio_item* audio_item_l) - : Midi_item (audio_item_l) +Midi_key::Midi_key (Audio_key*a) { + audio_l_ = a; } String Midi_key::str () const { - Key_change_req* k = dynamic_cast (audio_item_l_->req_l_); - int sharps_i = k->sharps_i (); - int flats_i = k->flats_i (); + int sharps_i = audio_l_->key_.sharps_i (); + int flats_i = audio_l_->key_.flats_i (); // midi cannot handle non-conventional keys if (flats_i && sharps_i) @@ -363,23 +362,21 @@ Midi_key::str () const String str = "ff5902"; str += String_convert::i2hex_str (accidentals_i, 2, '0'); - int minor_i = k->minor_b (); - str += String_convert::i2hex_str (minor_i, 2, '0'); + str += String_convert::i2hex_str ((int)audio_l_->key_.minor_b (), 2, '0'); return String_convert::hex2bin_str (str); } -Midi_time_signature::Midi_time_signature (Audio_item* audio_item_l) - : Midi_item (audio_item_l) +Midi_time_signature::Midi_time_signature (Audio_time_signature* a) { + audio_l_ = a; clocks_per_1_i_ = 18; } String Midi_time_signature::str () const { - Time_signature_change_req* m = dynamic_cast (audio_item_l_->req_l_); - int num_i = m->beats_i_; - int den_i = m->one_beat_i_; + int num_i = audio_l_->beats_i_; + int den_i = audio_l_->one_beat_i_; String str = "ff5804"; str += String_convert::i2hex_str (num_i, 2, '0'); @@ -389,30 +386,30 @@ Midi_time_signature::str () const return String_convert::hex2bin_str (str); } -Midi_note::Midi_note (Audio_item* audio_item_l) - : Midi_item (audio_item_l) +Midi_note::Midi_note (Audio_note* a) { + audio_l_ = a; dynamic_byte_ = 0x7f; - assert (dynamic_cast (audio_item_l)); } Moment Midi_note::length_mom () const { - Moment m = dynamic_cast (audio_item_l_->req_l_)->length_mom (); + Moment m = audio_l_->length_mom_; +#if 0 if (m < Moment (1, 1000)) { warning (_ ("silly duration")); m = 1; } +#endif return m; } int Midi_note::pitch_i () const { - int p = dynamic_cast (audio_item_l_->req_l_)->pitch_.semitone_pitch () - + dynamic_cast(audio_item_l_)->transposing_i_; + int p = audio_l_->pitch_.semitone_pitch () + audio_l_->transposing_i_; if (p == INT_MAX) { warning (_ ("silly pitch")); @@ -433,19 +430,25 @@ Midi_note::str () const return str; } -Midi_note_off::Midi_note_off (Midi_note* midi_note_l) - : Midi_item (midi_note_l->audio_item_l_) +Midi_note_off::Midi_note_off (Midi_note* n) { + on_l_ = n; + channel_i_ = n->channel_i_; + + // Anybody who hears any difference, or knows how this works? + // 0x64 is supposed to be neutral, but let's try - aftertouch_byte_ = 0x64; - channel_i_ = midi_note_l->channel_i_; + //aftertouch_byte_ = 0x64; + + static int i = 0; + aftertouch_byte_ = i; + i += 0x10; } int Midi_note_off::pitch_i () const { - return dynamic_cast (audio_item_l_->req_l_)->pitch_.semitone_pitch () - + dynamic_cast(audio_item_l_)->transposing_i_; + return on_l_->pitch_i (); } String @@ -459,48 +462,41 @@ Midi_note_off::str () const return str; } -Midi_tempo::Midi_tempo (Audio_item* audio_item_l) - : Midi_item (audio_item_l) -{ - per_minute_4_i_ = dynamic_cast(audio_item_l_)->per_minute_4_i_; -} - -Midi_tempo::Midi_tempo (int per_minute_4_i) - : Midi_item (0) +Midi_tempo::Midi_tempo (Audio_tempo* a) { - per_minute_4_i_ = per_minute_4_i; + audio_l_ = a; } String Midi_tempo::str () const { - int useconds_per_4_i = 60 * (int)1e6 / per_minute_4_i_; + int useconds_per_4_i = 60 * (int)1e6 / audio_l_->per_minute_4_i_; String str = "ff5103"; str += String_convert::i2hex_str (useconds_per_4_i, 6, '0'); return String_convert::hex2bin_str (str); } -Midi_text::Midi_text (Audio_item* audio_item_l) - : Midi_item (audio_item_l) +Midi_text::Midi_text (Audio_text* a) { - text_str_ = dynamic_cast(audio_item_l_)->text_str_; - type_ = (Type) dynamic_cast(audio_item_l_)->type_; + audio_l_ = a; } +#if 0 Midi_text::Midi_text (Midi_text::Type type, String text_str) - : Midi_item (0) + : Audio_text () { text_str_ = text_str; type_ = type; } +#endif String Midi_text::str () const { - String str = "ff" + String_convert::i2hex_str (type_, 2, '0'); + String str = "ff" + String_convert::i2hex_str (audio_l_->type_, 2, '0'); str = String_convert::hex2bin_str (str); - str += i2varint_str (text_str_.length_i ()); - str += text_str_; + str += i2varint_str (audio_l_->text_str_.length_i ()); + str += audio_l_->text_str_; return str; } @@ -544,11 +540,11 @@ Midi_track::Midi_track () } void -Midi_track::add (Moment delta_time_mom, Midi_item* mitem_p) +Midi_track::add (Moment delta_time_mom, Midi_item* midi_p) { assert (delta_time_mom >= Moment (0)); - Midi_event * e = new Midi_event (delta_time_mom, mitem_p); + Midi_event * e = new Midi_event (delta_time_mom, midi_p); event_p_list_.append (new Killing_cons (e, 0)); } @@ -566,7 +562,3 @@ Midi_track::data_str () const } return str; } - -Midi_track::~Midi_track () -{ -} diff --git a/lily/midi-stream.cc b/lily/midi-stream.cc index f51110daed..ba8f161a95 100644 --- a/lily/midi-stream.cc +++ b/lily/midi-stream.cc @@ -40,10 +40,10 @@ Midi_stream::operator << (String str) } Midi_stream& -Midi_stream::operator << (Midi_item const& mitem_c_r) +Midi_stream::operator << (Midi_item const& midi_c_r) { -// *this <silent_b ("Midistrings")) { str = String_convert::bin2hex_str (str) + "\n"; diff --git a/lily/midi-walker.cc b/lily/midi-walker.cc index 2caa202576..c0afd12f15 100644 --- a/lily/midi-walker.cc +++ b/lily/midi-walker.cc @@ -106,27 +106,32 @@ Midi_walker::output_event (Moment now_mom, Midi_item* l) void Midi_walker::process() { - Audio_item* ptr = (*item_l_arr_l_)[index_]; - do_stop_notes (ptr->audio_column_l_->at_mom ()); + Audio_item* audio_p = (*item_l_arr_l_)[index_]; + do_stop_notes (audio_p->audio_column_l_->at_mom ()); /* THIS IS A MEMORY LEAK. FIXME. */ - Midi_item* p = ptr->midi_item_p (); - if (!p) - return; - p->channel_i_ = track_l_->number_i_; - - if (Midi_note *mi = dynamic_cast(p)) - do_start_note (mi); - else - output_event (ptr->audio_column_l_->at_mom (), p); + //Midi_item* p = ptr->midi_item_p (); + if (Midi_item* midi_p = Midi_item::midi_p (audio_p)) + { + midi_p->channel_i_ = track_l_->number_i_; + if (Midi_note* note_p = dynamic_cast(midi_p)) + { + if (note_p->length_mom ()) + do_start_note (note_p); + } + else + output_event (audio_p->audio_column_l_->at_mom (), midi_p); + } } + bool Midi_walker::ok () const { return index_ size (); } + void Midi_walker::operator ++(int) { diff --git a/lily/music-iterator.cc b/lily/music-iterator.cc index 1590f4fc49..e975d300a9 100644 --- a/lily/music-iterator.cc +++ b/lily/music-iterator.cc @@ -130,7 +130,7 @@ Music_iterator::static_get_iterator_p (Music const *m) p = new Grace_iterator; else if (dynamic_cast (m)) p = new Music_wrapper_iterator; - else if (New_repeated_music const * n = dynamic_cast (m)) + else if (Repeated_music const * n = dynamic_cast (m)) { if (n->fold_b_) p = new Folded_repeat_iterator; diff --git a/lily/music-list.cc b/lily/music-list.cc index c3cf8fab26..36087d65c4 100644 --- a/lily/music-list.cc +++ b/lily/music-list.cc @@ -20,7 +20,6 @@ Simultaneous_music::length_mom () const } - void Music_sequence::compress (Moment m) { diff --git a/lily/my-lily-lexer.cc b/lily/my-lily-lexer.cc index 8fd2081c20..d0521d2240 100644 --- a/lily/my-lily-lexer.cc +++ b/lily/my-lily-lexer.cc @@ -36,7 +36,6 @@ static Keyword_ent the_key_tab[]={ {"context", CONTEXT}, {"duration", DURATION}, {"font", FONT}, - {"grouping", GROUPING}, {"grace", GRACE}, {"header", HEADER}, {"in", IN_T}, diff --git a/lily/new-beaming.cc b/lily/new-beaming.cc new file mode 100644 index 0000000000..07337b25c9 --- /dev/null +++ b/lily/new-beaming.cc @@ -0,0 +1,97 @@ +/* + new-beaming.cc -- implement Beaming_info, Beaming_info_list + + source file of the GNU LilyPond music typesetter + + (c) 1999 Han-Wen Nienhuys + + */ + +#include "new-beaming.hh" + +Beaming_info::Beaming_info( ) +{ + start_mom_ = 0; + beams_i_drul_[LEFT] = 0; + beams_i_drul_[RIGHT] = 0; +} + +Beaming_info::Beaming_info(Moment m, int i) +{ + start_mom_ = m; + beams_i_drul_[LEFT] = i; + beams_i_drul_[RIGHT] = i; +} + +const int infinity_i = 1000; // guh. + +int +Beaming_info_list::min_denominator_index () const +{ + int minden = infinity_i; + int minidx = -1; + + for (int i=1; i < infos_.size ( ); i++) + { + if (infos_[i].start_mom_.den_i () < minden) + { + minidx = i; + minden = infos_[i].start_mom_.den_i (); + } + } + + return minidx; +} + +int +Beaming_info_list::beam_extend_count (Direction d) const +{ + if (infos_.size () == 1) + return infos_[0].beams_i_drul_[d]; + + Beaming_info thisbeam = infos_.boundary (d, 0); + Beaming_info next = infos_.boundary (d, 1); + + return thisbeam.beams_i_drul_[-d] splits; + int m = min_denominator_index (); + splits[LEFT].infos_ = infos_.slice (0,m); + splits[RIGHT].infos_ = infos_.slice (m, infos_.size ()); + + Direction d = LEFT; + + do + { + splits[d].beamify (); + } + while (flip (&d) != LEFT); + + int middle_beams = splits[RIGHT].beam_extend_count (LEFT) 0) - for(int i=0;iprint (); + if (note_req_l_arr_.size()>0) + for(int i=0;iprint (); #endif } void Note_performer::do_process_requests () { - if (note_req_l_.size()>0) + if (note_req_l_arr_.size ()) { int transposing_i = 0; //urg @@ -39,18 +39,34 @@ Note_performer::do_process_requests () if (!prop.empty_b () && prop.isnum_b ()) transposing_i = prop; - while(note_req_l_.size()>0) - play (new Audio_note (note_req_l_.pop(), transposing_i)); - + while(note_req_l_arr_.size ()) + { + Note_req* n = note_req_l_arr_.pop (); + Audio_note* p = new Audio_note (n->pitch_, n->length_mom (), transposing_i); + Audio_element_info info (p, n); + announce_element (info); + note_p_arr_.push (p); + } } } -bool +void +Note_performer::do_pre_move_processing () +{ + for (int i=0; i < note_p_arr_.size (); i++) + { + play_element (note_p_arr_[i]); + } + note_p_arr_.clear (); + note_req_l_arr_.clear (); +} + +bool Note_performer::do_try_music (Music* req_l) { if (Note_req *nr = dynamic_cast (req_l)) { - note_req_l_.push(nr); + note_req_l_arr_.push (nr); return true; } return false; diff --git a/lily/p-score.cc b/lily/p-score.cc index c48cbddce0..261d3795f2 100644 --- a/lily/p-score.cc +++ b/lily/p-score.cc @@ -176,9 +176,10 @@ Paper_score::process () } if (experimental_features_global_b) - *mlog << elem_p_arr_.size () + span_p_arr_.size () << " elements. "; + *mlog << elem_p_arr_.size () + span_p_arr_.size () << _ (" elements. "); - *mlog << "\nLine ... "; + *mlog << "\n"; + *mlog << _ ("Line ... "); line_l_->break_processing (); for (int i=0; i < lines.size (); i++) { @@ -187,7 +188,7 @@ Paper_score::process () Line_of_score *line_l = lines[i]; line_l->post_processing (); - *mlog << i << flush; + *mlog << i << flush; line_l->output_all (i + 1 == lines.size()); if (experimental_features_global_b) *mlog << '(' << elem_p_arr_.size () + span_p_arr_.size () << ')'; diff --git a/lily/paper-outputter.cc b/lily/paper-outputter.cc index bc926f42d3..6d82f74380 100644 --- a/lily/paper-outputter.cc +++ b/lily/paper-outputter.cc @@ -31,25 +31,6 @@ Paper_outputter::Paper_outputter (Paper_stream *s) outstream_l_ = s; output_header (); -#ifdef __powerpc__ - if (output_global_ch == String ("scm")) - { - int fd = 1; - ofstream * of = dynamic_cast (outstream_l_->os); - if (of) - fd = of->rdbuf()->fd(); - FILE *file = fdopen (fd, "a"); - port_ = scm_standard_stream_to_port (file, "a", ""); - scm_display (gh_str02scm ( - "(primitive-load-path 'lily.scm)\n" - "(eval (tex-scm 'all-definitions))\n" - ";(eval (ps-scm 'all-definitions))\n" - "(display (map (lambda (x) (string-append (eval x) \"%\\n\")) '(\n" - ), port_); - - scm_fflush (port_); - } -#else if (output_global_ch == String ("scm")) *outstream_l_->os << "" "(primitive-load-path 'lily.scm)\n" @@ -57,7 +38,6 @@ Paper_outputter::Paper_outputter (Paper_stream *s) ";(eval (ps-scm 'all-definitions))\n" "(display (map (lambda (x) (string-append (eval x) \"\\n\")) '(\n" ; -#endif } Paper_outputter::~Paper_outputter () @@ -65,18 +45,10 @@ Paper_outputter::~Paper_outputter () SCM scm = gh_list (ly_symbol ("end-output"), SCM_UNDEFINED); output_scheme (scm); -#ifdef __powerpc__ - if (String (output_global_ch) == "scm") - { - scm_display (gh_str02scm (")))\n"), port_); - scm_fflush (port_); - } -#else if (String (output_global_ch) == "scm") { *outstream_l_->os << ")))"; } -#endif } void @@ -200,20 +172,11 @@ Paper_outputter::output_comment (String str) void Paper_outputter::output_scheme (SCM scm) { -#ifdef __powerpc__ - if (String (output_global_ch) == "scm") - { - scm_write (scm, port_); - scm_display (gh_str02scm ("\n"), port_); - scm_fflush (port_); - } -#else if (String (output_global_ch) == "scm") { SCM result = scm_eval (scm_listify (ly_symbol ("scm->string"), ly_quote_scm (scm), SCM_UNDEFINED)); *outstream_l_->os << ly_scm2string (result) << endl; } -#endif else { SCM result = scm_eval (scm); diff --git a/lily/parser.yy b/lily/parser.yy index 5af4fb7ed8..cb4f0a942b 100644 --- a/lily/parser.yy +++ b/lily/parser.yy @@ -56,14 +56,14 @@ #include "grace-music.hh" // mmm -Mudela_version oldest_version ("1.0.20"); +Mudela_version oldest_version ("1.1.52"); Mudela_version version ( MAJOR_VERSION "." MINOR_VERSION "." PATCH_LEVEL ); void print_mudela_versions (ostream &os) { - os << "Mudela versions: oldest " << oldest_version.str () << " current " << version.str () < @@ -143,7 +143,6 @@ yylex (YYSTYPE *s, void * v_l) %token CADENZA %token CHORDMODIFIERS %token CHORDS -%token HYPHEN %token CLEF %token CM_T %token CONSISTS @@ -151,7 +150,6 @@ yylex (YYSTYPE *s, void * v_l) %token DURATION %token EXTENDER %token FONT -%token GROUPING %token GRACE %token HEADER %token IN_T @@ -231,7 +229,7 @@ yylex (YYSTYPE *s, void * v_l) %type identifier_init %type steno_duration notemode_duration %type entered_notemode_duration explicit_duration -%type intastint_list int_list +%type int_list %type pre_requests post_requests %type gen_text_def %type explicit_musical_pitch steno_musical_pitch musical_pitch absolute_musical_pitch @@ -254,7 +252,6 @@ yylex (YYSTYPE *s, void * v_l) %type post_request %type command_req verbose_command_req %type extender_req -%type hyphen_req %type string %type score_block score_body %type shape_array @@ -545,16 +542,6 @@ output_def: } ; -intastint_list: - /* */ { $$ =new Array; } - | intastint_list int '*' int { - $$->push ($2); $$->push ($4); - } - | intastint_list int { - $$->push ($2); $$->push (1); - } - ; - /* PAPER @@ -720,6 +707,7 @@ Alternative_music: } | ALTERNATIVE Music_sequence { $$ = $2; + $2->set_spot (THIS->here_input ()); } ; @@ -730,12 +718,16 @@ Repeated_music: REPEAT STRING unsigned Music Alternative_music { Music_sequence* m = dynamic_cast ($5); + if (m && $3 < m->length_i ()) + $5->warning ("More alternatives than repeats. Junking excess alternatives."); - New_repeated_music * r = new New_repeated_music ($4, $3 >? 1, m); + Repeated_music * r = new Repeated_music ($4, $3 >? 1, m); $$ = r; r->fold_b_ = (*$2 == "fold"); r->semi_fold_b_ = (*$2 == "semi"); delete $2; + r->set_spot (THIS->here_input ()); + } ; @@ -912,9 +904,6 @@ abbrev_command_req: extender_req { $$ = $1; } - | hyphen_req { - $$ = $1; - } | '|' { $$ = new Barcheck_req; } @@ -985,31 +974,20 @@ verbose_command_req: } | KEY NOTENAME_PITCH optional_modality { Key_change_req *key_p= new Key_change_req; - key_p->pitch_arr_.push(*$2); - key_p->ordinary_key_b_ = true; - key_p->modality_i_ = $3; + key_p->key_.pitch_arr_.push (*$2); + key_p->key_.ordinary_key_b_ = true; + key_p->key_.modality_i_ = $3; $$ = key_p; delete $2; } | KEYSIGNATURE pitch_list { Key_change_req *key_p= new Key_change_req; - key_p->pitch_arr_ = *$2; - key_p->ordinary_key_b_ = false; + key_p->key_.pitch_arr_ = *$2; + key_p->key_.ordinary_key_b_ = false; $$ = key_p; delete $2; } - | GROUPING intastint_list { - Measure_grouping_req * mr_p = new Measure_grouping_req; - for (int i=0; i < $2->size();) - { - mr_p->elt_length_arr_.push (Moment (1, $2->elem(i++))); - mr_p->beat_i_arr_.push ($2->elem(i++)); - } - - $$ = mr_p; - delete $2; - } ; post_requests: @@ -1180,14 +1158,6 @@ extender_req: } ; -hyphen_req: - HYPHEN { - if (!THIS->lexer_p_->lyric_state_b ()) - THIS->parser_error (_ ("have to be in Lyric mode for lyrics")); - $$ = new Hyphen_req; - } - ; - close_request: close_request_parens { $$ = $1; diff --git a/lily/parser.yy.orig b/lily/parser.yy.orig deleted file mode 100644 index 78815d1cd2..0000000000 --- a/lily/parser.yy.orig +++ /dev/null @@ -1,1594 +0,0 @@ -%{ // -*-Fundamental-*- - -/* - parser.yy -- Bison/C++ parser for mudela - - source file of the GNU LilyPond music typesetter - - (c) 1997 Han-Wen Nienhuys - Jan Nieuwenhuizen -*/ - -/* - Ambiguities: - - * \alternative - - * use of '-' in various places - -*/ - - -#include -#include "lily-guile.hh" -#include "notename-table.hh" -#include "scalar.hh" -#include "translation-property.hh" -#include "lookup.hh" -#include "misc.hh" -#include "my-lily-lexer.hh" -#include "paper-def.hh" -#include "midi-def.hh" -#include "main.hh" -#include "file-path.hh" -#include "keyword.hh" -#include "debug.hh" -#include "parseconstruct.hh" -#include "dimensions.hh" -#include "identifier.hh" -#include "command-request.hh" -#include "musical-request.hh" -#include "my-lily-parser.hh" -#include "context-specced-music.hh" -#include "translator-group.hh" -#include "score.hh" -#include "music-list.hh" -#include "duration-convert.hh" -#include "change-translator.hh" -#include "file-results.hh" -#include "mudela-version.hh" -#include "scope.hh" -#include "relative-music.hh" -#include "transposed-music.hh" -#include "time-scaled-music.hh" -#include "new-repeated-music.hh" -#include "version.hh" -#include "grace-music.hh" - -// mmm -Mudela_version oldest_version ("1.0.20"); -Mudela_version version ( MAJOR_VERSION "." MINOR_VERSION "." PATCH_LEVEL ); - - -void -print_mudela_versions (ostream &os) -{ - os << "Mudela versions: oldest " << oldest_version.str () << " current " << version.str () < - -#ifndef NDEBUG -#define YYDEBUG 1 -#endif - -#define YYERROR_VERBOSE 1 - -#define YYPARSE_PARAM my_lily_parser_l -#define YYLEX_PARAM my_lily_parser_l -#define THIS ((My_lily_parser *) my_lily_parser_l) - -#define yyerror THIS->parser_error -#define ARRAY_SIZE(a,s) if (a.size () != s) THIS->parser_error (_f("expecting %d arguments", s)) - -%} - - -%union { - Array* intarr; - Array *pitch_arr; - Link_array *reqvec; - Array * strvec; - Array *intvec; - Notename_table *chordmodifiertab; - Duration *duration; - Identifier *id; - Music *music; - Music_list *music_list; - Score *score; - Scope *scope; - Interval *interval; - Musical_req* musreq; - Music_output_def * outputdef; - Musical_pitch * pitch; - Midi_def* midi; - Moment *moment; - Notename_table *notenametab; - Paper_def *paper; - Real real; - Request * request; - Scalar *scalar; - - String *string; - Tempo_req *tempo; - Translator* trans; - char c; - int i; - int ii[10]; -} -%{ - -int -yylex (YYSTYPE *s, void * v_l) -{ - My_lily_parser *pars_l = (My_lily_parser*) v_l; - My_lily_lexer * lex_l = pars_l->lexer_p_; - - lex_l->lexval_l = (void*) s; - return lex_l->yylex (); -} - - -%} - -%pure_parser - -/* tokens which are not keywords */ - -%token TEXTSCRIPT -%token ACCEPTS -%token ALTERNATIVE -%token BAR -%token BREATHE -%token CADENZA -%token CHORDMODIFIERS -%token CHORDS -%token CLEF -%token CM_T -%token CONSISTS -%token CONSISTSEND -%token DURATION -%token EXTENDER -%token FONT -%token GROUPING -%token GRACE -%token HEADER -%token IN_T -%token KEY -%token KEYSIGNATURE -%token LYRICS -%token MARK -%token MEASURES -%token MIDI -%token MM_T -%token MUSICAL_PITCH -%token NAME -%token NOTENAMES -%token NOTES -%token PAPER -%token PARTIAL -%token PENALTY -%token PROPERTY -%token PT_T -%token RELATIVE -%token REMOVE -%token REPEAT -%token REPETITIONS -%token SCM_T -%token SCMFILE -%token SCORE -%token SCRIPT -%token SHAPE -%token SKIP -%token SPANREQUEST -%token TEMPO -%token TIME_T -%token TIMES -%token TRANSLATOR -%token TRANSPOSE -%token TYPE -%token CONTEXT -%token VERSION - -/* escaped */ -%token E_EXCLAMATION E_SMALLER E_BIGGER E_CHAR - -%type dots exclamations questions -%token DIGIT -%token NOTENAME_PITCH -%token TONICNAME_PITCH -%token CHORDMODIFIER_PITCH -%token DURATION_IDENTIFIER -%token IDENTIFIER -%token NOTENAME_TABLE_IDENTIFIER -%token MUSIC_IDENTIFIER -%token REQUEST_IDENTIFIER -%token REAL_IDENTIFIER -%token STRING_IDENTIFIER -%token TRANS_IDENTIFIER -%token INT_IDENTIFIER -%token SCORE_IDENTIFIER -%token MIDI_IDENTIFIER -%token PAPER_IDENTIFIER -%token REAL -%token DURATION RESTNAME -%token STRING -%token UNSIGNED - - -%type output_def -%type mudela_header mudela_header_body -%type open_request_parens close_request_parens open_request close_request -%type request_with_dir request_that_take_dir verbose_request -%type sub_quotes sup_quotes -%type simple_element request_chord command_element Simple_music Composite_music -%type Alternative_music Repeated_music -%type abbrev_type -%type int unsigned -%type script_dir -%type optional_modality -%type identifier_init -%type steno_duration notemode_duration -%type entered_notemode_duration explicit_duration -%type intastint_list int_list -%type pre_requests post_requests -%type gen_text_def -%type explicit_musical_pitch steno_musical_pitch musical_pitch absolute_musical_pitch -%type steno_tonic_pitch - -%type pitch_list -%type chord notemode_chord -%type chord_additions chord_subtractions chord_notes -%type chord_addsub chord_note chord_inversion notemode_chord_inversion -%type midi_block midi_body -%type duration_length - -%type scalar -%type Music relative_music Sequential_music Simultaneous_music Music_sequence -%type property_def translator_change -%type Music_list -%type paper_block paper_def_body -%type real_expression real real_with_dimension -%type abbrev_command_req -%type post_request -%type command_req verbose_command_req -%type extender_req -%type string -%type score_block score_body -%type shape_array - -%type script_abbreviation -%type translator_spec_block translator_spec_body -%type tempo_request -%type notenames_body notenames_block chordmodifiers_block - - - - -%left '-' '+' -%left '*' '/' -%left UNARY_MINUS - -%% - -mudela: /* empty */ - | mudela toplevel_expression {} - | mudela assignment { } - | mudela error - | mudela check_version { } - ; - -toplevel_expression: - notenames_block { - THIS->lexer_p_->set_notename_table ($1); - } - | chordmodifiers_block { - THIS->lexer_p_->set_chordmodifier_table ($1); - } - | mudela_header { - delete header_global_p; - header_global_p = $1; - } - | score_block { - score_global_array.push ($1); - } - | paper_block { - Identifier * id = new - Paper_def_identifier ($1, PAPER_IDENTIFIER); - THIS->lexer_p_->set_identifier ("$defaultpaper", id) - } - | midi_block { - Identifier * id = new - Midi_def_identifier ($1, MIDI_IDENTIFIER); - THIS->lexer_p_->set_identifier ("$defaultmidi", id) - } - | embedded_scm { - } - ; - -embedded_scm: - SCMFILE STRING semicolon { - read_lily_scm_file (*$2); - delete $2; - } - | SCM_T STRING semicolon { - gh_eval_str ($2->ch_l ()); - delete $2; - }; - -check_version: - VERSION STRING semicolon { - Mudela_version ver (*$2); - if (!((ver >= oldest_version) && (ver <= version))) { - if (THIS->ignore_version_b_) { - THIS->here_input ().error (_f ("incorrect mudela version: %s (%s, %s)", ver.str (), oldest_version.str (), version.str ())); - } else { - THIS->fatal_error_i_ = 1; - THIS->parser_error (_f ("incorrect mudela version: %s (%s, %s)", ver.str (), oldest_version.str (), version.str ())); - } - } - } - ; - - -chordmodifiers_block: - CHORDMODIFIERS '{' notenames_body '}' { $$ = $3; } - ; - - -notenames_block: - NOTENAMES '{' notenames_body '}' { $$ = $3; } - ; - - - -notenames_body: - /**/ { - $$ = new Notename_table; - } - | NOTENAME_TABLE_IDENTIFIER { - $$ = $1-> access_content_Notename_table(true); - } - | notenames_body STRING '=' explicit_musical_pitch { - (*$$)[*$2] = *$4; - - delete $4; - delete $2; - } - ; - -mudela_header_body: - { - $$ = new Scope; - THIS->lexer_p_-> scope_l_arr_.push ($$); - } - | mudela_header_body assignment semicolon { - - } - ; - -mudela_header: - HEADER '{' mudela_header_body '}' { - $$ = $3; - THIS->lexer_p_-> scope_l_arr_.pop (); - } - ; - - -/* - DECLARATIONS -*/ -assignment: - STRING { - THIS->remember_spot (); - } - /* cont */ '=' identifier_init { - THIS->lexer_p_->set_identifier (*$1, $4); - $4->init_b_ = THIS->init_parse_b_; - $4->set_spot (THIS->pop_spot ()); - } - ; - - - -identifier_init: - score_block { - $$ = new Score_identifier ($1, SCORE_IDENTIFIER); - - } - | chordmodifiers_block { - $$ = new Notename_table_identifier ($1, NOTENAME_TABLE_IDENTIFIER); - } - | notenames_block { - $$ = new Notename_table_identifier ($1, NOTENAME_TABLE_IDENTIFIER); - } - | paper_block { - $$ = new Paper_def_identifier ($1, PAPER_IDENTIFIER); - } - | midi_block { - $$ = new Midi_def_identifier ($1, MIDI_IDENTIFIER); - - } - | translator_spec_block { - $$ = new Translator_identifier ($1, TRANS_IDENTIFIER); - } - | Music { - $$ = new Music_identifier ($1, MUSIC_IDENTIFIER); - } - - | post_request { - $$ = new Request_identifier ($1, REQUEST_IDENTIFIER); - } - | explicit_duration { - $$ = new Duration_identifier ($1, DURATION_IDENTIFIER); - } - | real { - $$ = new Real_identifier (new Real ($1), REAL_IDENTIFIER); - } - | string { - $$ = new String_identifier ($1, STRING_IDENTIFIER); - } - | int { - $$ = new int_identifier (new int ($1), INT_IDENTIFIER); - } - ; - -translator_spec_block: - TRANSLATOR '{' translator_spec_body '}' - { - $$ = $3; - } - ; - -translator_spec_body: - TRANS_IDENTIFIER { - $$ = $1->access_content_Translator (true); - $$-> set_spot (THIS->here_input ()); - } - | TYPE STRING semicolon { - Translator* t = get_translator_l (*$2); - Translator_group * tg = dynamic_cast (t); - - if (!tg) - THIS->parser_error (_("Need a translator group for a context")); - - t = t->clone (); - t->set_spot (THIS->here_input ()); - $$ = t; - delete $2; - } - | translator_spec_body STRING '=' identifier_init semicolon { - Identifier* id = $4; - String_identifier *s = dynamic_cast (id); - Real_identifier *r= dynamic_cast(id); - int_identifier *i = dynamic_cast (id); - - String str; - if (s) str = *s->access_content_String (false); - if (i) str = to_str (*i->access_content_int (false)); - if (r) str = to_str (*r->access_content_Real (false)); - if (!s && !i && !r) - THIS->parser_error (_("Wrong type for property value")); - - delete $4; - /* ugh*/ - Translator_group * tr = dynamic_cast($$); - tr->set_property (*$2, str); - } - | translator_spec_body NAME STRING semicolon { - $$->type_str_ = *$3; - delete $3; - } - | translator_spec_body CONSISTS STRING semicolon { - dynamic_cast ($$)-> set_element (*$3, true); - delete $3; - } - | translator_spec_body CONSISTSEND STRING semicolon { - dynamic_cast ($$)-> set_element (*$3, true); - delete $3; - } - | translator_spec_body ACCEPTS STRING semicolon { - dynamic_cast ($$)-> set_acceptor (*$3, true); - delete $3; - } - | translator_spec_body REMOVE STRING semicolon { - dynamic_cast ($$)-> set_element (*$3, false); - delete $3; - } - ; - -/* - SCORE -*/ -score_block: - SCORE { THIS->remember_spot (); - } - /*cont*/ '{' score_body '}' { - $$ = $4; - $$->set_spot (THIS->pop_spot ()); - if (!$$->def_p_arr_.size ()) - $$->add_output (THIS->default_paper_p ()); - - } - ; - -score_body: { - $$ = new Score; - } - | SCORE_IDENTIFIER { - $$ = $1->access_content_Score (true); - } - | score_body mudela_header { - $$->header_p_ = $2; - } - | score_body Music { - if ($$->music_p_) - $2->warning (_ ("More than one music block")); - $$->music_p_ = $2; - } - | score_body output_def { - $$->add_output ($2); - } - | score_body error { - - } - ; - -output_def: - paper_block { - $$ = $1; - } - | midi_block { - $$= $1; - } - ; - -intastint_list: - /* */ { $$ =new Array; } - | intastint_list int '*' int { - $$->push ($2); $$->push ($4); - } - | intastint_list int { - $$->push ($2); $$->push (1); - } - ; - - -/* - PAPER -*/ -paper_block: - PAPER '{' paper_def_body '}' { - $$ = $3; - THIS-> lexer_p_->scope_l_arr_.pop (); - } - ; - - -optional_dot: - /* empty */ - | '.' - ; - -paper_def_body: - /* empty */ { - Paper_def *p = THIS->default_paper_p (); - THIS-> lexer_p_-> scope_l_arr_.push (p->scope_p_); - $$ = p; - } - | PAPER_IDENTIFIER { - Paper_def *p = $1->access_content_Paper_def (true); - THIS->lexer_p_->scope_l_arr_.push (p->scope_p_); - $$ = p; - } - | paper_def_body int '=' FONT STRING { // ugh, what a syntax - Lookup * l = new Lookup; - l->font_name_ = *$5; - delete $5; - $$->set_lookup ($2, l); - } - | paper_def_body assignment semicolon { - - } - | paper_def_body translator_spec_block { - $$->assign_translator ($2); - } - | paper_def_body SHAPE '=' shape_array semicolon { - $$->shape_int_a_ = *$4; - delete $4; - } - | paper_def_body error { - - } - ; - - -real: - real_expression { $$ = $1; } - ; - - -real_with_dimension: - REAL CM_T { - $$ = $1 CM; - } - | REAL PT_T { - $$ = $1 PT; - } - | REAL IN_T { - $$ = $1 INCH; - } - | REAL MM_T { - $$ = $1 MM; - } - ; - -real_expression: - REAL { - $$ = $1; - } - | real_with_dimension - | REAL_IDENTIFIER { - $$= *$1->access_content_Real (false); - } - | '-' real_expression %prec UNARY_MINUS { - $$ = -$2; - } - | real_expression '*' real_expression { - $$ = $1 * $3; - } - | real_expression '/' real_expression { - $$ = $1 / $3; - } - | real_expression '+' real_expression { - $$ = $1 + $3; - } - | real_expression '-' real_expression { - $$ = $1 - $3; - } - | '(' real_expression ')' { - $$ = $2; - } - ; - - -shape_array: - /* empty */ { - $$ = new Array; - } - | shape_array real real { - $$->push(Interval($2, $2 + $3)); - }; - -/* - MIDI -*/ -midi_block: - MIDI - - '{' midi_body '}' { $$ = $3; } - ; - -midi_body: /* empty */ { - $$ = THIS->default_midi_p (); - } - | MIDI_IDENTIFIER { - $$ = $1-> access_content_Midi_def (true); - } - | midi_body translator_spec_block { - $$-> assign_translator ($2); - } - | midi_body tempo_request semicolon { - $$->set_tempo ($2->dur_.length_mom (), $2->metronome_i_); - delete $2; - } - | midi_body error { - - } - ; - -tempo_request: - TEMPO steno_duration '=' unsigned { - $$ = new Tempo_req; - $$->dur_ = *$2; - delete $2; - $$-> metronome_i_ = $4; - } - ; - -Music_list: /* empty */ { - $$ = new Music_list; - } - | Music_list Music { - $$->add_music ($2); - } - | Music_list error { - } - ; - - -Music: - Simple_music - | Composite_music - ; - -Alternative_music: - /* empty */ { - $$ = 0; - } - | ALTERNATIVE Music_sequence { - $$ = $2; - } - ; - - - - -Repeated_music: - REPEAT STRING unsigned Music Alternative_music - { - Music_sequence* m = dynamic_cast ($5); - - New_repeated_music * r = new New_repeated_music ($4, $3 >? 1, m); - $$ = r; - r->fold_b_ = (*$2 == "fold"); - r->semi_fold_b_ = (*$2 == "semi"); - delete $2; - } - ; - -Music_sequence: '{' Music_list '}' { - $$ = new Music_sequence ($2); - } - ; - -Sequential_music: '{' Music_list '}' { - $$ = new Sequential_music ($2); - } - ; - -Simultaneous_music: '<' Music_list '>' { - $$ = new Simultaneous_music ($2); - } - ; - -Simple_music: - request_chord { $$ = $1; } - | MUSIC_IDENTIFIER { $$ = $1->access_content_Music (true); } - | property_def - | translator_change - | Simple_music '*' unsigned '/' unsigned { - /* urg */ - $$ = new Time_scaled_music ($3, $5, $1); - } - | Simple_music '*' unsigned { - $$ = new Time_scaled_music ($3, 1, $1); - } - ; - - -Composite_music: - CONTEXT STRING Music { - Context_specced_music *csm = new Context_specced_music ($3); - - csm->translator_type_str_ = *$2; - csm->translator_id_str_ = ""; - delete $2; - - $$ = csm; - } - | GRACE Music { - $$ = new Grace_music ($2); - } - | CONTEXT STRING '=' STRING Music { - Context_specced_music *csm = new Context_specced_music ($5); - - csm->translator_type_str_ = *$2; - csm->translator_id_str_ = *$4; - delete $2; - delete $4; - - $$ = csm; - } - | TIMES { - THIS->remember_spot (); - } - /* CONTINUED */ - unsigned '/' unsigned Music - - { - $$ = new Time_scaled_music ($3, $5, $6); - $$->set_spot (THIS->pop_spot ()); - } - | Repeated_music { $$ = $1; } - | Simultaneous_music { $$ = $1; } - | Sequential_music { $$ = $1; } - | TRANSPOSE musical_pitch Music { - $$ = new Transposed_music ($3, *$2); - delete $2; - } - | TRANSPOSE steno_tonic_pitch Music { - $$ = new Transposed_music ($3, *$2); - delete $2; - } - | NOTES - { THIS->lexer_p_->push_note_state (); } - Music - { $$ = $3; - THIS->lexer_p_->pop_state (); - } - | CHORDS - { THIS->lexer_p_->push_chord_state (); } - Music - { - $$ = $3; - THIS->lexer_p_->pop_state (); - } - | LYRICS - { THIS->lexer_p_->push_lyric_state (); } - Music - { - $$ = $3; - THIS->lexer_p_->pop_state (); - } - | relative_music { $$ = $1; } - ; - -relative_music: - RELATIVE absolute_musical_pitch Music { - $$ = new Relative_octave_music ($3, *$2); - delete $2; - } - ; - -translator_change: - TRANSLATOR STRING '=' STRING { - Change_translator * t = new Change_translator; - t-> change_to_type_str_ = *$2; - t-> change_to_id_str_ = *$4; - - $$ = t; - $$->set_spot (THIS->here_input ()); - delete $2; - delete $4; - } - ; - -property_def: - PROPERTY STRING '.' STRING '=' scalar { - Translation_property *t = new Translation_property; - - t-> var_str_ = *$4; - t-> value_ = *$6; - - Context_specced_music *csm = new Context_specced_music (t); - $$ = csm; - $$->set_spot (THIS->here_input ()); - - csm-> translator_type_str_ = *$2; - - delete $2; - delete $4; - delete $6; - } - ; - -scalar: - string { $$ = new Scalar (*$1); delete $1; } - | int { $$ = new Scalar ($1); } - ; - - -request_chord: - pre_requests simple_element post_requests { - Music_sequence *l = dynamic_cast($2); - for (int i=0; i < $1->size(); i++) - l->add_music ($1->elem(i)); - for (int i=0; i < $3->size(); i++) - l->add_music ($3->elem(i)); - $$ = $2; - - } - | command_element - ; - -command_element: - command_req { - $$ = new Request_chord; - $$-> set_spot (THIS->here_input ()); - $1-> set_spot (THIS->here_input ()); - ((Simultaneous_music*)$$) ->add_music ($1);//ugh - } - ; - -command_req: - abbrev_command_req - | verbose_command_req semicolon { $$ = $1; } - ; - -abbrev_command_req: - extender_req { - $$ = $1; - } - | '|' { - $$ = new Barcheck_req; - } - | '~' { - $$ = new Tie_req; - } - | '[' { - Span_req*b= new Span_req; - b->span_dir_ = START; - b->span_type_str_ = "beam"; - $$ =b; - } - | ']' { - Span_req*b= new Span_req; - b->span_dir_ = STOP; - b->span_type_str_ = "beam"; - $$ = b; - } - | BREATHE { - $$ = new Breathing_sign_req; - } - ; - - -verbose_command_req: - BAR STRING { - $$ = new Bar_req (*$2); - delete $2; - } - | MARK STRING { - $$ = new Mark_req (*$2); - delete $2; - } - | MARK unsigned { - $$ = new Mark_req (to_str ($2)); - } - | TIME_T unsigned '/' unsigned { - Time_signature_change_req *m = new Time_signature_change_req; - m->beats_i_ = $2; - m->one_beat_i_=$4; - $$ = m; - } - | PENALTY int { - Break_req * b = new Break_req; - b->penalty_i_ = $2; - b-> set_spot (THIS->here_input ()); - $$ = b; - } - | SKIP duration_length { - Skip_req * skip_p = new Skip_req; - skip_p->duration_ = *$2; - delete $2; - $$ = skip_p; - } - | tempo_request { - $$ = $1; - } - | CADENZA unsigned { - $$ = new Cadenza_req ($2); - } - | PARTIAL duration_length { - $$ = new Partial_measure_req ($2->length_mom ()); - delete $2; - } - | CLEF STRING { - $$ = new Clef_change_req (*$2); - delete $2; - } - | KEY NOTENAME_PITCH optional_modality { - Key_change_req *key_p= new Key_change_req; - key_p->pitch_arr_.push(*$2); - key_p->ordinary_key_b_ = true; - key_p->modality_i_ = $3; - $$ = key_p; - delete $2; - } - | KEYSIGNATURE pitch_list { - Key_change_req *key_p= new Key_change_req; - key_p->pitch_arr_ = *$2; - key_p->ordinary_key_b_ = false; - $$ = key_p; - delete $2; - } - | GROUPING intastint_list { - Measure_grouping_req * mr_p = new Measure_grouping_req; - for (int i=0; i < $2->size();) - { - mr_p->elt_length_arr_.push (Moment (1, $2->elem(i++))); - mr_p->beat_i_arr_.push ($2->elem(i++)); - } - - - $$ = mr_p; - delete $2; - } - ; - -post_requests: - { - $$ = new Link_array; - } - | post_requests post_request { - $2->set_spot (THIS->here_input ()); - $$->push ($2); - } - ; - -post_request: - verbose_request - | request_with_dir - | close_request - ; - - -request_that_take_dir: - gen_text_def - | verbose_request - | script_abbreviation { - Identifier*i = THIS->lexer_p_->lookup_identifier ("dash-" + *$1); - Articulation_req *a = new Articulation_req; - a->articulation_str_ = *i->access_content_String (false); - delete $1; - $$ = a; - } - ; - -request_with_dir: - script_dir request_that_take_dir { - if (Script_req * gs = dynamic_cast ($2)) - gs->dir_ = Direction ($1); - else if ($1) - $2->warning ("Can't specify direction for this request"); - $$ = $2; - } - ; - -verbose_request: - REQUEST_IDENTIFIER { - $$ = (Request*)$1->access_content_Request (true); - $$->set_spot (THIS->here_input ()); - } - | TEXTSCRIPT STRING STRING { - Text_script_req *ts_p = new Text_script_req; - ts_p-> text_str_ = *$2; - ts_p-> style_str_ = *$3; - ts_p->set_spot (THIS->here_input ()); - delete $3; - delete $2; - $$ = ts_p; - } - | SPANREQUEST int STRING { - Span_req * sp_p = new Span_req; - sp_p-> span_dir_ = Direction($2); - sp_p->span_type_str_ = *$3; - sp_p->set_spot (THIS->here_input ()); - $$ = sp_p; - } - | abbrev_type { - Tremolo_req* a = new Tremolo_req; - a->set_spot (THIS->here_input ()); - a->type_i_ = $1; - $$ = a; - } - | SCRIPT STRING { - Articulation_req * a = new Articulation_req; - a->articulation_str_ = *$2; - a->set_spot (THIS->here_input ()); - $$ = a; - delete $2; - } - ; - -optional_modality: - /* empty */ { - $$ = 0; - } - | int { - $$ = $1; - } - ; - -sup_quotes: - '\'' { - $$ = 1; - } - | sup_quotes '\'' { - $$ ++; - } - ; - -sub_quotes: - ',' { - $$ = 1; - } - | sub_quotes ',' { - $$ ++ ; - } - ; - -steno_musical_pitch: - NOTENAME_PITCH { - $$ = $1; - } - | NOTENAME_PITCH sup_quotes { - $$ = $1; - $$->octave_i_ += $2; - } - | NOTENAME_PITCH sub_quotes { - $$ = $1; - $$->octave_i_ += - $2; - } - ; - -steno_tonic_pitch: - TONICNAME_PITCH { - $$ = $1; - } - | TONICNAME_PITCH sup_quotes { - $$ = $1; - $$->octave_i_ += $2; - } - | TONICNAME_PITCH sub_quotes { - $$ = $1; - $$->octave_i_ += - $2; - } - ; - -explicit_musical_pitch: - MUSICAL_PITCH '{' int_list '}' {/* ugh */ - Array &a = *$3; - ARRAY_SIZE(a,3); - $$ = new Musical_pitch; - $$->octave_i_ = a[0]; - $$->notename_i_ = a[1]; - $$->accidental_i_ = a[2]; - delete &a; - } - ; - -musical_pitch: - steno_musical_pitch - | explicit_musical_pitch - ; - -explicit_duration: - DURATION '{' int_list '}' { - $$ = new Duration; - Array &a = *$3; - ARRAY_SIZE(a,2); - - $$-> durlog_i_ = a[0]; - $$-> dots_i_ = a[1]; - - delete &a; - } - ; - -extender_req: - EXTENDER { - if (!THIS->lexer_p_->lyric_state_b ()) - THIS->parser_error (_ ("have to be in Lyric mode for lyrics")); - $$ = new Extender_req; - } - ; - -close_request: - close_request_parens { - $$ = $1; - dynamic_cast ($$)->span_dir_ = START; - } - -close_request_parens: - '(' { - Span_req* s= new Span_req; - $$ = s; - s->span_type_str_ = "slur"; - } - | E_SMALLER { - Span_req*s =new Span_req; - $$ = s; - s->span_type_str_ = "crescendo"; - } - | E_BIGGER { - Span_req*s =new Span_req; - $$ = s; - s->span_type_str_ = "decrescendo"; - } - ; - - -open_request: - open_request_parens { - $$ = $1; - dynamic_cast ($$)->span_dir_ = STOP; - } - ; - -open_request_parens: - E_EXCLAMATION { - Span_req *s = new Span_req; - s->span_type_str_ = "crescendo"; - $$ = s; - } - | ')' { - Span_req* s= new Span_req; - $$ = s; - s->span_type_str_ = "slur"; - } - ; - -gen_text_def: - string { - Text_script_req *t = new Text_script_req; - $$ = t; - t->text_str_ = *$1; - delete $1; - $$->set_spot (THIS->here_input ()); - } - | DIGIT { - Text_script_req* t = new Text_script_req; - $$ = t; - t->text_str_ = to_str ($1); - t->style_str_ = "finger"; - $$->set_spot (THIS->here_input ()); - } - ; - -script_abbreviation: - '^' { - $$ = new String ("hat"); - } - | '+' { - $$ = new String ("plus"); - } - | '-' { - $$ = new String ("dash"); - } - | '|' { - $$ = new String ("bar"); - } - | '>' { - $$ = new String ("larger"); - } - | '.' { - $$ = new String ("dot"); - } - ; - - -script_dir: - '_' { $$ = DOWN; } - | '^' { $$ = UP; } - | '-' { $$ = CENTER; } - ; - -pre_requests: - { - $$ = new Link_array; - } - | pre_requests open_request { - $$->push ($2); - } - ; - -absolute_musical_pitch: - steno_musical_pitch { - $$ = $1; - } - ; - -duration_length: - steno_duration { - $$ = $1; - } - | duration_length '*' unsigned { - $$->plet_.iso_i_ *= $3; - } - | duration_length '/' unsigned { - $$->plet_.type_i_ *= $3; - } - ; - -entered_notemode_duration: - dots { - $$ = new Duration (THIS->default_duration_); - if ($1) - $$->dots_i_ = $1; - } - | steno_duration { - THIS->set_last_duration ($1); - } - ; - -notemode_duration: - entered_notemode_duration { - $$ = $1; - } - ; - -steno_duration: - unsigned { - $$ = new Duration; - if (!Duration::duration_type_b ($1)) - THIS->parser_error (_f ("not a duration: %d", $1)); - else { - $$->durlog_i_ = Duration_convert::i2_type ($1); - } - } - | DURATION_IDENTIFIER { - $$ = $1->access_content_Duration (true); - } - | steno_duration '.' { - $$->dots_i_ ++; - } - ; - - -abbrev_type: - ':' { - $$ =0; - } - | ':' unsigned { - if (!Duration::duration_type_b ($2)) - THIS->parser_error (_f ("not a duration: %d", $2)); - else if ($2 < 8) - THIS->parser_error (_ ("can't abbreviate")); - $$ = $2; - } - ; - - -simple_element: - musical_pitch exclamations questions notemode_duration { - if (!THIS->lexer_p_->note_state_b ()) - THIS->parser_error (_ ("have to be in Note mode for notes")); - - - Note_req *n = new Note_req; - - n->pitch_ = *$1; - delete $1; - n->duration_ = *$4; - delete $4; - n->cautionary_b_ = $3 % 2; - n->forceacc_b_ = $2 % 2 || n->cautionary_b_; - - Simultaneous_music*v = new Request_chord; - v->set_spot (THIS->here_input ()); - n->set_spot (THIS->here_input ()); - - v->add_music (n); - - $$ = v; - } - | RESTNAME notemode_duration { - $$ = THIS->get_rest_element (*$1, $2); - delete $1; // delete notename - } - | MEASURES notemode_duration { - Multi_measure_rest_req* m = new Multi_measure_rest_req; - m->duration_ = *$2; - delete $2; - - Simultaneous_music*velt_p = new Request_chord; - velt_p->set_spot (THIS->here_input ()); - velt_p->add_music (m); - $$ = velt_p; - } - | REPETITIONS notemode_duration { - Repetitions_req* r = new Repetitions_req; - r->duration_ = *$2; - delete $2; - - Simultaneous_music*velt_p = new Request_chord; - velt_p->set_spot (THIS->here_input ()); - velt_p->add_music (r); - $$ = velt_p; - } - | STRING notemode_duration { - if (!THIS->lexer_p_->lyric_state_b ()) - THIS->parser_error (_ ("have to be in Lyric mode for lyrics")); - $$ = THIS->get_word_element (*$1, $2); - delete $1; - } - | chord { - if (!THIS->lexer_p_->chord_state_b ()) - THIS->parser_error (_ ("have to be in Chord mode for chords")); - $$ = $1; - } - | '@' notemode_chord '@' { - if (!THIS->lexer_p_->note_state_b ()) - THIS->parser_error (_ ("have to be in Note mode for @chords")); - $$ = $2; - } - ; - -chord: - steno_tonic_pitch notemode_duration chord_additions chord_subtractions chord_inversion { - $$ = THIS->get_chord (*$1, $3, $4, $5, *$2); - }; - -notemode_chord: - steno_musical_pitch notemode_duration chord_additions chord_subtractions notemode_chord_inversion { - $$ = THIS->get_chord (*$1, $3, $4, $5, *$2); - }; - - -chord_additions: - { - $$ = new Array; - } - | '-' chord_notes { - $$ = $2; - } - ; - -chord_notes: - { - $$ = new Array; - } - | chord_notes chord_addsub { - $$ = $1; - $$->push (*$2); - } - ; - -chord_subtractions: - { - $$ = new Array; - } - | '^' chord_notes { - $$ = $2; - } - ; - - -/* - forevery : X : optional_X sucks. Devise a solution. -*/ - - -chord_addsub: - chord_note optional_dot - | CHORDMODIFIER_PITCH optional_dot - ; - -chord_inversion: - { - $$ = 0; - } - | '/' steno_tonic_pitch { - $$ = $2 - } - ; - -notemode_chord_inversion: - { - $$ = 0; - } - | '/' steno_musical_pitch { - $$ = $2 - } - ; - -chord_note: - unsigned { - $$ = new Musical_pitch; - $$->notename_i_ = ($1 - 1) % 7; - $$->octave_i_ = $1 > 7 ? 1 : 0; - $$->accidental_i_ = 0; - } - | unsigned '+' { - $$ = new Musical_pitch; - $$->notename_i_ = ($1 - 1) % 7; - $$->octave_i_ = $1 > 7 ? 1 : 0; - $$->accidental_i_ = 1; - } - | unsigned '-' { - $$ = new Musical_pitch; - $$->notename_i_ = ($1 - 1) % 7; - $$->octave_i_ = $1 > 7 ? 1 : 0; - $$->accidental_i_ = -1; - } - ; - -/* - UTILITIES - */ -pitch_list: { - $$ = new Array; - } - | pitch_list musical_pitch { - $$->push (*$2); - delete $2; - } - ; - - -int_list: - /**/ { - $$ = new Array - } - | int_list int { - $$->push ($2); - } - ; - -unsigned: - UNSIGNED { - $$ = $1; - } - | DIGIT { - $$ = $1; - }; - -int: - unsigned { - $$ = $1; - } - | '-' unsigned { - $$ = -$2; - } - | INT_IDENTIFIER { - $$ = *$1->access_content_int (false); - } - ; - - -string: - STRING { - $$ = $1; - } - | STRING_IDENTIFIER { - $$ = $1->access_content_String (true); - } - | string '+' string { - *$$ += *$3; - delete $3; - } - ; - - - - -dots: - { $$ = 0; } - | dots '.' { $$ ++; } - ; - - - -exclamations: - { $$ = 0; } - | exclamations '!' { $$ ++; } - ; - -questions: - { $$ = 0; } - | questions '?' { $$ ++; } - ; - - -semicolon: - ';' - ; -%% - -void -My_lily_parser::set_yydebug (bool b) -{ -#ifdef YYDEBUG - yydebug = b; -#endif -} -void -My_lily_parser::do_yyparse () -{ - yyparse ((void*)this); -} - - - diff --git a/lily/performance.cc b/lily/performance.cc index f25b63eea1..b97df6b69c 100644 --- a/lily/performance.cc +++ b/lily/performance.cc @@ -15,6 +15,7 @@ #include "midi-item.hh" #include "midi-stream.hh" #include "audio-column.hh" +#include "audio-item.hh" #include "audio-staff.hh" #include "performance.hh" #include "score.hh" @@ -45,11 +46,16 @@ Performance::output (Midi_stream& midi_stream) midi_stream << Midi_header (1, tracks_i, clocks_per_4_i); output_header_track (midi_stream); + *mlog << "\n"; + *mlog << _ ("Track ... "); int channel = 1; for (int i =0; i < audio_staff_l_arr_.size (); i++) { + *mlog << '[' << flush; Audio_staff *s = audio_staff_l_arr_[i]; + *mlog << i << flush; + /* Aargh, let's hear it for the MIDI standard. MIDI players tend to ignore instrument settings on @@ -58,6 +64,7 @@ Performance::output (Midi_stream& midi_stream) if (channel == 9) channel++; s->output (midi_stream, channel++); + *mlog << ']' << flush; } } @@ -74,7 +81,12 @@ Performance::output_header_track (Midi_stream& midi_stream) str += gnu_lilypond_version_str(); str += "\n"; - Midi_text creator (Midi_text::TEXT, str); + /* + This seems silly, but in fact the audio elements should + be generated elsewhere: not midi-specific. + */ + Audio_text creator_a (Audio_text::TEXT, str); + Midi_text creator (&creator_a); midi_track.add (Moment (0), &creator); str = _("Automatically generated"); @@ -87,19 +99,24 @@ Performance::output_header_track (Midi_stream& midi_stream) str += ctime (&t); str = str.left_str (str.length_i() - 1); } - Midi_text generate (Midi_text::TEXT, str); + Audio_text generate_a (Audio_text::TEXT, str); + Midi_text generate (&generate_a); midi_track.add (Moment (0), &generate); str = _f ("from musical definition: %s", origin_str_); - Midi_text from (Midi_text::TEXT, str); + Audio_text from_a (Audio_text::TEXT, str); + Midi_text from (&from_a); midi_track.add (Moment (0), &from); - Midi_text track_name (Midi_text::TRACK_NAME, "Track " - + String_convert::i2dec_str (0, 0, '0')); + Audio_text track_name_a (Audio_text::TRACK_NAME, "Track " + + String_convert::i2dec_str (0, 0, '0')); + Midi_text track_name (&track_name_a); + midi_track.add (Moment (0), &track_name); - Midi_tempo tempo (midi_l_->get_tempo_i (Moment (1, 4))); + Audio_tempo tempo_a (midi_l_->get_tempo_i (Moment (1, 4))); + Midi_tempo tempo (&tempo_a); midi_track.add (Moment (0), &tempo); midi_stream << midi_track; diff --git a/lily/performer-group-performer.cc b/lily/performer-group-performer.cc index c44d68ad7d..b0278c661d 100644 --- a/lily/performer-group-performer.cc +++ b/lily/performer-group-performer.cc @@ -49,7 +49,10 @@ Performer_group_performer::do_announces() for (int i=0; i < nongroups.size(); i++) { // Is this good enough? Performer * eng = dynamic_cast (nongroups[i]); - if (eng && eng!= info.origin_trans_l_arr_[0]) + // urg, huh? core dump? + //if (eng && eng!= info.origin_trans_l_arr_[0]) + if (eng && info.origin_trans_l_arr_.size () + && eng!= info.origin_trans_l_arr_[0]) eng->acknowledge_element (info); } } diff --git a/lily/performer.cc b/lily/performer.cc index 62ac44481e..f0cd2585e2 100644 --- a/lily/performer.cc +++ b/lily/performer.cc @@ -12,9 +12,9 @@ #include "debug.hh" void -Performer::play (Audio_element* p) +Performer::play_element (Audio_element* p) { - daddy_perf_l ()->play (p); + daddy_perf_l ()->play_element (p); } int diff --git a/lily/repeat-engraver.cc b/lily/repeat-engraver.cc index 650b5b3dd4..5864e06527 100644 --- a/lily/repeat-engraver.cc +++ b/lily/repeat-engraver.cc @@ -24,175 +24,255 @@ ADD_THIS_TRANSLATOR (Repeat_engraver); /* - Urg. Hairy. Needs redesign? + Needs redesign? + + - Logic needs to be moved out of do_try_music(), + + - don't try to do multiple repeated music. Lets assume repeats don't nest. + */ bool Repeat_engraver::do_try_music (Music* m) { - if (New_repeated_music* r = dynamic_cast (m)) + if (Repeated_music* r = dynamic_cast (m)) { - if (!r->semi_fold_b_) - return true; + if (repeated_music_l_) + { + m->warning ("Already have repeated music."); + return false; + } + + if (r->semi_fold_b_) + { + repeated_music_l_ = r; + return true; + } + } + return false; +} + +/** + Walk through repeat music, and generate events for appropriate times. +*/ +void +Repeat_engraver::queue_events () +{ + Music_sequence* alt = repeated_music_l_->alternatives_p_; + Moment walk_mom = now_mom () + repeated_music_l_->repeat_body_p_->length_mom (); + + + Cons_list becel; + becel.append (new Bar_create_event (now_mom (), "|:")); - Music_sequence* alt = r->alternatives_p_; - Moment repeat_length_mom = r->repeat_body_p_->length_mom (); - Moment stop_mom = now_mom () + repeat_length_mom; - Moment alt_mom = now_mom () + repeat_length_mom; + if (!alt) + { + becel.append (new Bar_create_event (walk_mom, ":|")); + becel.append (new Bar_create_event (walk_mom, "stop")); + } + else + { + int last_number = 0; + int volta_number = repeated_music_l_->repeats_i_ - alt->length_i () + 1; /* - if there's a repeat block, we'll need a stop-repeat :| - */ - if (repeat_length_mom) + all repeat alternatives, and generate events with + appropriate timestamps. The volta spanner event (a number string) + happens at the begin of the alt. The :| bar event at the ending. + */ + for (Cons *i = alt->music_p_list_p_->head_; i; i = i->next_) { + /* - if there are alternatives, the :| comes before last alternative - (only for semi-unfolded, but otherwise we're not here anyway?) - */ - if (alt) + some idiot might typeset a repeat not starting on a + barline. Make sure there is one. + + (todo: should try to avoid line breaks?) + */ + if (last_number == 0) { - for (Cons *i (alt->music_p_list_p_->head_); i && i->next_; i = i->next_) - { - stop_mom += i->car_->length_mom (); - if (r->fold_b_) - break; - } - } - repeated_music_arr_.push (r); - stop_mom_arr_.push (stop_mom); + becel.append (new Bar_create_event (walk_mom, "")); + } + + + Bar_create_event * c = new Bar_create_event (walk_mom, last_number+ 1, + volta_number); + + if (!i->next_) + c->last_b_ = true; + + becel.append (c); + last_number = volta_number; + volta_number ++; + + // should think about voltaSpannerDuration + walk_mom += i->car_->length_mom(); + + if (i->next_) + becel.append (new Bar_create_event (walk_mom, ":|")); + else + becel.append (new Bar_create_event (walk_mom, "stop")); } + } + create_barmoments_queue_ = becel.head_ ; + becel.head_ = 0; +} - /* - Counting nested repeats, it seems safest to forbid - two pieces of alternative music to start at the same time. - */ - for (int i = 0; i < alternative_start_mom_arr_.size (); i++) - if (alternative_start_mom_arr_[i] == alt_mom) - return false; +void +Repeat_engraver::do_process_requests () +{ + if (repeated_music_l_ && !done_this_one_b_) + { + queue_events (); + done_this_one_b_ = true; + } + + + Cons * head = create_barmoments_queue_; + if (!head) + return; - /* - Coda kludge: see input/test/coda-kludge.ly - */ - Moment span_mom; - Scalar prop = get_property ("voltaSpannerDuration", 0); - if (prop.length_i ()) - span_mom = prop.to_rat (); - - if (!alt) - return true; - - int alt_i = r->repeats_i_ + 1 - cons_list_size_i (alt->music_p_list_p_->head_ ) >? 1; - for (Cons *i = alt->music_p_list_p_->head_; i ; i = i->next_) - { - alternative_music_arr_.push (i->car_); - alternative_start_mom_arr_.push (alt_mom); - if (span_mom) - alternative_stop_mom_arr_.push (alt_mom + span_mom); + Bar_engraver* bar_engraver_l = dynamic_cast + (daddy_grav_l ()->get_simple_translator ("Bar_engraver")); + + /* + Do all the events that need to be done now. + */ + bool stop = false; + while (head && now_mom () == head->car_->when_) + { + create_barmoments_queue_ = create_barmoments_queue_->next_; + head->next_ =0; + if (bar_engraver_l) + { + String t = head->car_->type_; + if (head->car_->bar_b_) + { + if (t == "stop" || t == ":|") + { + end_volta_span_p_ = volta_span_p_; + volta_span_p_ =0; + } + + if (t != "stop") + bar_engraver_l->request_bar (t); + } else - alternative_stop_mom_arr_.push (alt_mom + i->car_->length_mom ()); - String str; - if ((alt_i != 1) && (alt_i != r->repeats_i_) && (i == alt->music_p_list_p_->head_)) - str = "1.-"; - str += to_str (alt_i) + "."; - alt_i++; - alternative_str_arr_.push (str); - if (!dynamic_cast (alt)) - alt_mom += i->car_->length_mom (); + { + assert (!volta_span_p_); + volta_span_p_ = new Volta_spanner; + announce_element (Score_element_info (volta_span_p_,0)); + volta_span_p_->number_str_ = t; + volta_span_p_->last_b_ = head->car_->last_b_; + // voltaSpannerDuration stuff here. + // other property stuff here. + } + + } + else + { + warning ("No bar engraver found. Ignoring repeats."); } - return true; + + delete head->car_; + delete head; + + head = create_barmoments_queue_; } - return false; -} + + assert (!head || head->car_->when_ > now_mom ()); +} + void Repeat_engraver::acknowledge_element (Score_element_info i) { - Moment now = now_mom (); if (Note_column *c = dynamic_cast (i.elem_l_)) { - for (int i = 0; i < volta_p_arr_.size (); i++) - if (volta_p_arr_[i] && (now >= alternative_start_mom_arr_[i])) - volta_p_arr_[i]->add_column (c); + if (volta_span_p_) + volta_span_p_->add_column (c); + if (end_volta_span_p_) + end_volta_span_p_->add_column (c); } if (Bar *c = dynamic_cast (i.elem_l_)) { - for (int i = 0; i < volta_p_arr_.size (); i++) - if (volta_p_arr_[i] && (now >= alternative_start_mom_arr_[i])) - volta_p_arr_[i]->add_column (c); + if (volta_span_p_) + volta_span_p_->add_bar (c); + if (end_volta_span_p_) + end_volta_span_p_ ->add_bar(c); } } + void Repeat_engraver::do_removal_processing () { - for (int i = 0; i < volta_p_arr_.size (); i++) - if (volta_p_arr_[i]) - typeset_element (volta_p_arr_[i]); -} - -void -Repeat_engraver::do_process_requests () -{ - Moment now = now_mom (); - Bar_engraver* bar_engraver_l = dynamic_cast - (daddy_grav_l ()->get_simple_translator ("Bar_engraver")); - for (int i = bar_b_arr_.size (); i < repeated_music_arr_.size (); i++) + if (volta_span_p_) { - if (bar_engraver_l) - bar_engraver_l->request_bar ("|:"); - bar_b_arr_.push (true); + typeset_element(volta_span_p_); } - for (int i = 0; i < bar_b_arr_.size (); i++) + if (end_volta_span_p_) { - if (!bar_b_arr_[i] && (now >= stop_mom_arr_[i])) - { - if (bar_engraver_l) - bar_engraver_l->request_bar (":|"); - } - } - for (int i = volta_p_arr_.size (); i < alternative_music_arr_.size (); i++) - { - Volta_spanner* v = new Volta_spanner; - Scalar prop = get_property ("voltaVisibility", 0); - if (!prop.to_bool ()) - v->set_elt_property (transparent_scm_sym, SCM_BOOL_T); - prop = get_property ("voltaSpannerDuration", 0); - if ((i == alternative_music_arr_.size () - 1) || prop.length_i ()) - v->last_b_ = true; - - v->number_str_ = alternative_str_arr_[i]; - volta_p_arr_.push (v); - announce_element (Score_element_info (v, alternative_music_arr_[i])); + typeset_element (end_volta_span_p_); } + // todo: the paranoid may also delete create_barmoments_queue_ +} + +void +Repeat_engraver::do_post_move_processing () +{ + for (Cons *p = create_barmoments_queue_; + p && p->car_->when_ == now_mom (); p = p->next_) + if (p->car_->type_ == "stop") + { + repeated_music_l_ = 0; + done_this_one_b_ = false; + } } void Repeat_engraver::do_pre_move_processing () { - Moment now = now_mom (); - for (int i = bar_b_arr_.size (); i--; ) + if (end_volta_span_p_) { - if (bar_b_arr_[i]) - bar_b_arr_[i] = false; - if (now >= stop_mom_arr_[i]) - { - bar_b_arr_.del (i); - stop_mom_arr_.del (i); - repeated_music_arr_.del (i); - } - } - for (int i = volta_p_arr_.size (); i--; ) - { - if (volta_p_arr_[i] && (now >= alternative_stop_mom_arr_[i]) - && (volta_p_arr_[i]->column_arr_.size () >= 1)) - { - typeset_element (volta_p_arr_[i]); - volta_p_arr_[i] = 0; - volta_p_arr_.del (i); - alternative_music_arr_[i] = 0; - alternative_music_arr_.del (i); - alternative_start_mom_arr_.del (i); - alternative_stop_mom_arr_.del (i); - alternative_str_arr_.del (i); - } + typeset_element (end_volta_span_p_ ); + end_volta_span_p_ =0; } + +} + + +Repeat_engraver::Repeat_engraver() +{ + repeated_music_l_ =0; + end_volta_span_p_ =0; + volta_span_p_ =0; + done_this_one_b_ = false; + create_barmoments_queue_ =0; +} + +/* ************** */ +Bar_create_event::Bar_create_event() +{ + last_b_ =false; + bar_b_ = true; +} + +Bar_create_event::Bar_create_event (Moment w, String s) +{ + last_b_ =false; + when_ = w; + type_ = s; + bar_b_ = true; +} + +Bar_create_event::Bar_create_event (Moment w, int i, int j) +{ + last_b_ =false; + when_ = w ; + bar_b_ = false; + + if (i!=j) + type_ = to_str (i) + ".-" ; + + type_ += to_str(j) + "."; } diff --git a/lily/repeated-music-iterator.cc b/lily/repeated-music-iterator.cc index 23fb55f790..03854fd5e0 100644 --- a/lily/repeated-music-iterator.cc +++ b/lily/repeated-music-iterator.cc @@ -45,7 +45,7 @@ Folded_repeat_iterator::next_moment () const void Folded_repeat_iterator::construct_children () { - New_repeated_music const * mus = dynamic_cast (music_l_); + Repeated_music const * mus = dynamic_cast (music_l_); main_iter_p_ = get_iterator_p (mus->repeat_body_p_); if (!main_iter_p_->ok()) { @@ -64,7 +64,7 @@ Folded_repeat_iterator::do_process_and_next (Moment m) music_l_->warning ( _("No one to print a volta bracket")); } - New_repeated_music const * mus = dynamic_cast (music_l_); + Repeated_music const * mus = dynamic_cast (music_l_); if (main_iter_p_) { @@ -92,7 +92,7 @@ Folded_repeat_iterator::do_process_and_next (Moment m) void Folded_repeat_iterator::leave_body () { - New_repeated_music const * mus = dynamic_cast (music_l_); + Repeated_music const * mus = dynamic_cast (music_l_); delete main_iter_p_; main_iter_p_ = 0; main_length_mom_ += mus->repeat_body_p_->length_mom (); @@ -101,7 +101,7 @@ Folded_repeat_iterator::leave_body () void Folded_repeat_iterator::enter_alternative () { - New_repeated_music const * mus = dynamic_cast (music_l_); + Repeated_music const * mus = dynamic_cast (music_l_); if (mus->alternatives_p_) { Simultaneous_music_iterator * s = new Simultaneous_music_iterator; diff --git a/lily/repeated-music.cc b/lily/repeated-music.cc index 19a700504c..d00a932107 100644 --- a/lily/repeated-music.cc +++ b/lily/repeated-music.cc @@ -1,5 +1,5 @@ /* - new-repeated-music.cc -- implement New_repeated_music + new-repeated-music.cc -- implement Repeated_music source file of the GNU LilyPond music typesetter @@ -12,16 +12,18 @@ #include "musical-pitch.hh" #include "debug.hh" -New_repeated_music::New_repeated_music(Music *beg, int times, Music_sequence * alts) +Repeated_music::Repeated_music(Music *beg, int times, Music_sequence * alts) { repeat_body_p_ = beg; fold_b_ = false; repeats_i_ = times; alternatives_p_ = alts; semi_fold_b_ = true; + if (alts) + alts->music_p_list_p_->truncate (times); } -New_repeated_music::New_repeated_music (New_repeated_music const &s) +Repeated_music::Repeated_music (Repeated_music const &s) : Music (s) { repeats_i_ = s.repeats_i_; @@ -33,14 +35,14 @@ New_repeated_music::New_repeated_music (New_repeated_music const &s) ? dynamic_cast (s.alternatives_p_->clone ()):0; } -New_repeated_music::~New_repeated_music () +Repeated_music::~Repeated_music () { delete repeat_body_p_; delete alternatives_p_; } void -New_repeated_music::do_print () const +Repeated_music::do_print () const { #ifndef NPRINT DOUT << "Fold = " << fold_b_ << " reps: " << repeats_i_; @@ -54,7 +56,7 @@ New_repeated_music::do_print () const } Musical_pitch -New_repeated_music::to_relative_octave (Musical_pitch p) +Repeated_music::to_relative_octave (Musical_pitch p) { if (repeat_body_p_) p = repeat_body_p_->to_relative_octave (p); @@ -66,7 +68,7 @@ New_repeated_music::to_relative_octave (Musical_pitch p) void -New_repeated_music::transpose (Musical_pitch p) +Repeated_music::transpose (Musical_pitch p) { if (repeat_body_p_) repeat_body_p_->transpose (p); @@ -76,7 +78,7 @@ New_repeated_music::transpose (Musical_pitch p) } void -New_repeated_music::compress (Moment p) +Repeated_music::compress (Moment p) { if (repeat_body_p_) repeat_body_p_->compress (p); @@ -86,7 +88,7 @@ New_repeated_music::compress (Moment p) } Moment -New_repeated_music::alternatives_length_mom () const +Repeated_music::alternatives_length_mom () const { if (!alternatives_p_ ) return 0; @@ -108,7 +110,7 @@ New_repeated_music::alternatives_length_mom () const } Moment -New_repeated_music::length_mom () const +Repeated_music::length_mom () const { Moment m =0; if (fold_b_) diff --git a/lily/rhythmic-grouping.cc b/lily/rhythmic-grouping.cc deleted file mode 100644 index 487d03a5b9..0000000000 --- a/lily/rhythmic-grouping.cc +++ /dev/null @@ -1,382 +0,0 @@ -/* - rhythmic-grouping.cc -- implement Rhythmic_grouping - - source file of the GNU LilyPond music typesetter - - (c) 1997--1999 Han-Wen Nienhuys -*/ - -#include "debug.hh" -#include "rhythmic-grouping.hh" -#include "interval.hh" - -void -Rhythmic_grouping::init() -{ - interval_ = 0; - children.clear(); -} - -void -Rhythmic_grouping::OK() const -{ -#ifndef NDEBUG - assert (bool (children.size()) != bool (interval_)); - - for (int i= 0; i < children.size(); i++) - { - children[i]->OK(); - if (i>0) - assert (children[i-1]->interval()[RIGHT] == - children[i]->interval()[LEFT]); - } -#endif -} - -Moment -Rhythmic_grouping::length_mom () const -{ - return interval().length (); -} - -MInterval -Rhythmic_grouping::interval() const -{ - if (interval_) - return *interval_; - else - return - MInterval (children[0]->interval()[LEFT], - children.top()->interval ()[RIGHT]); -} - -void -Rhythmic_grouping::split (Rhythmic_grouping r) -{ - if (interval_) - return ; - - r.intersect (interval()); - split (r.intervals()); - - for (int i= 0; i < children.size(); i++) - { - if (!children[i]->interval_) - { - Rhythmic_grouping here (r); - children[i]->split (here); - } - } -} - - -Array -Rhythmic_grouping::intervals() -{ - Array r; - if (interval_ || children.size() == 1) - { - MInterval i (interval()); - MInterval r1(i), r2(i); - r1[RIGHT] = r2[LEFT] = i.center(); - r.push (r1); r.push (r2); - } - else - { - for (int i=0; i < children.size(); i++) - r.push (children[i]->interval()); - } - return r; -} - -void -Rhythmic_grouping::intersect (MInterval t) -{ - if (interval_) - { - interval_->intersect (t); - return; - } - - for (int i=0; i < children.size(); i++) - { - MInterval inter = intersection (t, children[i]->interval()); - if (inter.empty_b() || inter.length () <= Moment (0)) - { - delete children[i]; - children[i] =0; - } - else - { - children[i]->intersect (t); - } - } - for (int i=0; i < children.size();) - { - if (!children[i]) - children.del (i); - else - i++; - } - -} - -/** - Put our children in branches of #this#. - The min and max time intervals coincide with elements of #splitpoints# - - I really should be documenting what is happening here, but I find - that difficult, since I don't really understand what's going on here. - - */ -void -Rhythmic_grouping::split (Array splitpoints) -{ - //check on splitpoints.. - int j = 0, i = 0, starti = 0, startj = 0; - - Link_array ch; - while (1) - { - if (i >= children.size() || j >= splitpoints.size ()) - break; - - assert ( - children[starti]->interval()[LEFT]== splitpoints[startj][LEFT]); - if (children[i]->interval()[RIGHT] < splitpoints[j][RIGHT]) - { - i ++; - } - else if (children[i]->interval()[RIGHT] > splitpoints[j][RIGHT]) - { - j ++; - } - else - { - - if (i == starti) - { - ch.push (children[i]); - } - else - { - Link_array slice = children.slice (starti, i+1); - Rhythmic_grouping *newchild=new Rhythmic_grouping (slice); - - ch.push (newchild); - } - i ++; - j++; - starti = i; - startj = j; - - - } - } - if (ch.size() != 1) - children = ch; -} - - -Rhythmic_grouping::Rhythmic_grouping (MInterval t, int n) -{ - init(); - if (n == 1 || !n) - { - interval_ = new MInterval (t); - return; - } - Moment dt = t.length ()/Moment (n); - MInterval basic = MInterval (t[LEFT], t[LEFT]+dt); - for (int i= 0; i < n; i++) - children.push (new Rhythmic_grouping (dt*Moment (i) + basic)); -} - - -Rhythmic_grouping::Rhythmic_grouping (Link_array r) - :children (r) -{ - interval_ =0; -} - -Rhythmic_grouping::~Rhythmic_grouping() -{ - junk(); -} - -void -Rhythmic_grouping::copy (Rhythmic_grouping const&s) -{ - interval_ = (s.interval_)? new MInterval (*s.interval_) : 0; - for (int i=0; i < s.children.size(); i++) - children.push (new Rhythmic_grouping (*s.children[i])); -} - -void -Rhythmic_grouping::operator=(Rhythmic_grouping const &s) -{ - junk(); - copy (s); -} - -Rhythmic_grouping::Rhythmic_grouping (Rhythmic_grouping const&s) -{ - init(); - copy (s); -} - -void -Rhythmic_grouping::junk() -{ - delete interval_; - junk_pointer_array (children); - init(); -} - -void -Rhythmic_grouping::print() const -{ -#ifndef NPRINT - DOUT << "{ \n"; - if (interval_) - DOUT <<" Interval "<< interval_->str(); - for (int i=0; i < children.size(); i++) - { - children[i]->print(); - } - DOUT << "}\n"; -#endif -} - -bool -Rhythmic_grouping::child_fit_b (Moment start) -{ - if (children.size()) - return (children.top()->interval ()[RIGHT]== start); - - return true; -} - -void -Rhythmic_grouping::add_child (Moment start, Moment len) -{ - Moment stop = start+len; - assert (child_fit_b (start)); - children.push (new Rhythmic_grouping (MInterval (start, stop))); -} - -Rhythmic_grouping::Rhythmic_grouping() -{ - interval_ =0; -} - -int -min_elt (Array v) -{ - int i = 1000; // ugh - for (int j = 0 ; j < v.size(); j++) - i = i -Rhythmic_grouping::generate_beams (Array flags, int &flagidx) -{ - assert (!interval_) ; - - Array< Array > children_beams; - for (int i=0; i < children.size(); i++) - { - Array child_beams; - if (children[i]->interval_) - { - int f = flags[flagidx++]; - child_beams.push (f); - } - else - { - child_beams = children[i]-> - generate_beams (flags, flagidx); - } - children_beams.push (child_beams); - } - Array beams; - int lastm, m, nextm; - for (int i=0; i < children_beams.size(); i++) - { - bool add_left = (i >0); - bool add_right = (i < children_beams.size() -1); - - if (!i) - m = min_elt (children_beams[i]); - if (add_right) - nextm = min_elt (children_beams[i+1]); - - if (children_beams[i].size() == 1) - { - if (add_right) - beams.push (m); - if (add_left) - beams.push (m); - } - else - { - if (add_left) - beams.push (lastm translate (m); -} - -void -Rhythmic_grouping::extend (MInterval m) const -{ - assert (m[LEFT] >= interval()[LEFT]); - while (m[RIGHT] >interval()[RIGHT]) - { - Link_array a (children); - for (int i=0; i < a.size(); i++) - { - a[i] =new Rhythmic_grouping (*children[i]); - a[i]->translate (children.top()->interval ()[RIGHT]); - } - ((Rhythmic_grouping*)this)->children.concat (a); - } - assert (m[RIGHT] <= interval()[RIGHT]); - OK(); -} - -Rhythmic_grouping -parse_grouping (Array beat_i_arr, Array elt_length_arr) -{ - Moment here =0; - assert (beat_i_arr.size() == elt_length_arr.size ()); - - Link_array children; - for (int i=0; i < beat_i_arr.size(); i++) - { - Moment last = here; - here += elt_length_arr[i] * Moment (beat_i_arr[i]); - children.push ( - new Rhythmic_grouping (MInterval (last, here), - beat_i_arr[i])); - } - return Rhythmic_grouping (children); -} - diff --git a/lily/score-engraver.cc b/lily/score-engraver.cc index 3d73c012c4..70d2943c74 100644 --- a/lily/score-engraver.cc +++ b/lily/score-engraver.cc @@ -237,6 +237,9 @@ Score_engraver::do_try_music (Music*r) if (!gotcha) { + /* + UGH! THIS IS NOT SYMMETRIC. CLEAN ME UP! + */ if (Break_req* b = dynamic_cast (r)) { gotcha = true; @@ -247,9 +250,13 @@ Score_engraver::do_try_music (Music*r) } } return gotcha; - } +void +Score_engraver::forbid_breaks () +{ + break_penalty_i_ = Break_req::DISALLOW; +} ADD_THIS_TRANSLATOR(Score_engraver); diff --git a/lily/score-performer.cc b/lily/score-performer.cc index c0357ec6e7..b69dcbe5b7 100644 --- a/lily/score-performer.cc +++ b/lily/score-performer.cc @@ -20,21 +20,21 @@ #include "audio-staff.hh" -ADD_THIS_TRANSLATOR(Score_performer); +ADD_THIS_TRANSLATOR (Score_performer); -Score_performer::Score_performer() +Score_performer::Score_performer () { - performance_p_ =0; + performance_p_ = 0; } -Score_performer::~Score_performer() +Score_performer::~Score_performer () { } void -Score_performer::play (Audio_element * p) +Score_performer::play_element (Audio_element * p) { if (Audio_item * i=dynamic_cast (p)) { @@ -43,12 +43,27 @@ Score_performer::play (Audio_element * p) performance_p_->add_element (p); } +void +Score_performer::announce_element (Audio_element_info info) +{ + announce_info_arr_.push (info); + info.origin_trans_l_arr_.push (this); + + /* + huh? + copied from score-engraver, but + this way staff gets in list twice + if (Audio_item* i = dynamic_cast (info.elem_l_)) + performance_p_->add_element (i); + */ +} + void Score_performer::prepare (Moment m) { Global_translator::prepare (m); audio_column_l_ = new Audio_column (m); - play (audio_column_l_); + play_element (audio_column_l_); post_move_processing (); } diff --git a/lily/specialty-engraver.cc b/lily/specialty-engraver.cc index 163dfe9a72..5f87859db6 100644 --- a/lily/specialty-engraver.cc +++ b/lily/specialty-engraver.cc @@ -1,3 +1,5 @@ +#if 0 +// not finished yet. /* specialty-engraver.cc -- implement Specialty_engraver @@ -21,7 +23,7 @@ protected: void -Specialty_engraver::acknowledge_element (Score_element_info i) +Specialty_engraver::acknowledge_element (Score_element_info ) { /* We could do groovy stuff, by inserting our own custom (FUNC,FONT) @@ -30,3 +32,4 @@ Specialty_engraver::acknowledge_element (Score_element_info i) But not yet. This would be cleaner if we had SCM as properties. */ } +#endif diff --git a/lily/staff-bar.cc b/lily/staff-bar.cc index 44be80a76a..df97770e25 100644 --- a/lily/staff-bar.cc +++ b/lily/staff-bar.cc @@ -12,5 +12,9 @@ Real Staff_bar::get_bar_size () const { - return 4 * staff_line_leading_f (); + SCM size_sym = get_elt_property (bar_size_scm_sym); + if (size_sym != SCM_BOOL_F) + return gh_scm2double (SCM_CDR(size_sym)); + else + return (lines_i () -1) * staff_line_leading_f (); } diff --git a/lily/staff-info.cc b/lily/staff-info.cc index 5d214d080f..a527bc3c18 100644 --- a/lily/staff-info.cc +++ b/lily/staff-info.cc @@ -14,7 +14,6 @@ Staff_info::Staff_info() { time_C_ = 0; - rhythmic_C_ =0; command_l_ =0; musical_l_ =0; } diff --git a/lily/staff-performer.cc b/lily/staff-performer.cc index 6628fbeca0..927285702b 100644 --- a/lily/staff-performer.cc +++ b/lily/staff-performer.cc @@ -19,36 +19,28 @@ ADD_THIS_TRANSLATOR (Staff_performer); Staff_performer::Staff_performer () { audio_staff_p_ = 0; + instrument_p_ = 0; + instrument_name_p_ = 0; + name_p_ = 0; + tempo_p_ = 0; } Staff_performer::~Staff_performer () { - delete audio_staff_p_; } void Staff_performer::do_creation_processing () { audio_staff_p_ = new Audio_staff; + announce_element (Audio_element_info (audio_staff_p_, 0)); - play (new Audio_text (Audio_text::TRACK_NAME, id_str_)); + name_p_ = new Audio_text (Audio_text::TRACK_NAME, id_str_); + announce_element (Audio_element_info (name_p_, 0)); -#if 1 - String str = new_instrument_str (); - if (str.length_i ()) - // instrument description - play (new Audio_text (Audio_text::INSTRUMENT_NAME, str)); -#endif - - // tempo - play (new Audio_tempo (get_tempo_i ())); + tempo_p_ = new Audio_tempo (get_tempo_i ()); + announce_element (Audio_element_info (tempo_p_, 0)); -#if 1 - if (str.length_i ()) - // instrument - play (new Audio_instrument (str)); -#endif - Performer_group_performer::do_creation_processing (); } @@ -58,18 +50,45 @@ Staff_performer::do_process_requests () String str = new_instrument_str (); if (str.length_i ()) { - play (new Audio_text (Audio_text::INSTRUMENT_NAME, str)); - play (new Audio_instrument (str)); + instrument_name_p_ = new Audio_text (Audio_text::INSTRUMENT_NAME, str); + announce_element (Audio_element_info (instrument_name_p_, 0)); + instrument_p_ = new Audio_instrument (str); + announce_element (Audio_element_info (instrument_p_, 0)); } Performer_group_performer::do_process_requests (); } +void +Staff_performer::do_pre_move_processing () +{ + if (name_p_) + { + play_element (name_p_); + name_p_ = 0; + } + if (tempo_p_) + { + play_element (tempo_p_); + tempo_p_ = 0; + } + if (instrument_name_p_) + { + play_element (instrument_name_p_); + instrument_name_p_ = 0; + } + if (instrument_p_) + { + play_element (instrument_p_); + instrument_p_ = 0; + } + Performer_group_performer::do_pre_move_processing (); +} void Staff_performer::do_removal_processing () { Performer_group_performer::do_removal_processing (); - Performer::play (audio_staff_p_); + Performer::play_element (audio_staff_p_); audio_staff_p_ = 0; } @@ -95,12 +114,12 @@ Staff_performer::new_instrument_str () } void -Staff_performer::play (Audio_element* p) +Staff_performer::play_element (Audio_element* p) { if (Audio_item *ai = dynamic_cast (p)) { audio_staff_p_->add_audio_item (ai); } - Performer::play (p); + Performer::play_element (p); } diff --git a/lily/staff-switching-translator.cc b/lily/staff-switching-translator.cc index ae56d110d3..1d1809ed84 100644 --- a/lily/staff-switching-translator.cc +++ b/lily/staff-switching-translator.cc @@ -16,6 +16,8 @@ class Staff_switching_translator : public Engraver { Interpretation_context_handle my_voice_; Drul_array staff_handle_drul_; + + int switch_pitch_i_ ; protected: virtual bool do_try_music (Music* m); virtual void do_creation_processing (); @@ -28,6 +30,7 @@ public: Staff_switching_translator::Staff_switching_translator () { + switch_pitch_i_ =0; } void @@ -35,9 +38,18 @@ Staff_switching_translator::do_creation_processing () { Translator_group * daddy =daddy_grav_l (); // staff switching context + + Scalar pit = get_property ("switchPitch", 0); + if (pit.isnum_b ()) + switch_pitch_i_ = int (pit); Scalar s = get_property("staffContextName", 0); - staff_handle_drul_[UP].set_translator (daddy->daddy_trans_l_ -> find_create_translator_l (s, "upper")); - staff_handle_drul_[DOWN].set_translator (daddy->daddy_trans_l_-> find_create_translator_l (s, "lower")); + Scalar up = get_property ("upStaffName",0); + Scalar down = get_property ("downStaffName",0); + if (!up.length_i()) up = "upper"; + if (!down.length_i()) up = "lower"; + + staff_handle_drul_[UP].set_translator (daddy->daddy_trans_l_ -> find_create_translator_l (s, up)); + staff_handle_drul_[DOWN].set_translator (daddy->daddy_trans_l_-> find_create_translator_l (s, down)); staff_handle_drul_[DOWN].report_to_l ()->set_property ("defaultClef", "bass"); @@ -58,7 +70,7 @@ Staff_switching_translator::do_try_music (Music*m) { if (Note_req*nr = dynamic_cast (m)) { - Direction staff = (nr->pitch_.semitone_pitch () >= 0) + Direction staff = (nr->pitch_.semitone_pitch () >= switch_pitch_i_) ? UP : DOWN; diff --git a/lily/time-description.cc b/lily/time-description.cc index 347dbce0a8..6fecdb99d8 100644 --- a/lily/time-description.cc +++ b/lily/time-description.cc @@ -57,7 +57,6 @@ Time_description::set_cadenza (bool b) Time_description::Time_description() { - error_b_ = false; whole_per_measure_ = 1; whole_in_measure_ =0; one_beat_ = Moment (1,4); diff --git a/lily/time-signature-performer.cc b/lily/time-signature-performer.cc index fdd75bea77..95eeacabc0 100644 --- a/lily/time-signature-performer.cc +++ b/lily/time-signature-performer.cc @@ -10,33 +10,47 @@ #include "command-request.hh" #include "audio-item.hh" +ADD_THIS_TRANSLATOR (Time_signature_performer); -ADD_THIS_TRANSLATOR(Time_signature_performer); - -Time_signature_performer::Time_signature_performer() +Time_signature_performer::Time_signature_performer () { time_signature_req_l_ = 0; + audio_p_ = 0; } -Time_signature_performer::~Time_signature_performer() +Time_signature_performer::~Time_signature_performer () { } void -Time_signature_performer::do_print() const +Time_signature_performer::do_print () const { #ifndef NPRINT if (time_signature_req_l_) - time_signature_req_l_->print(); + time_signature_req_l_->print (); #endif } void -Time_signature_performer::do_process_requests() +Time_signature_performer::do_process_requests () { if (time_signature_req_l_) - play (new Audio_time_signature (time_signature_req_l_)); - time_signature_req_l_ = 0; + { + audio_p_ = new Audio_time_signature (time_signature_req_l_->beats_i_, time_signature_req_l_->one_beat_i_); + Audio_element_info info (audio_p_, time_signature_req_l_); + announce_element (info); + time_signature_req_l_ = 0; + } +} + +void +Time_signature_performer::do_pre_move_processing () +{ + if (audio_p_) + { + play_element (audio_p_); + audio_p_ = 0; + } } bool diff --git a/lily/timing-engraver.cc b/lily/timing-engraver.cc index 510f24b40c..953e802f4b 100644 --- a/lily/timing-engraver.cc +++ b/lily/timing-engraver.cc @@ -5,18 +5,17 @@ (c) 1997--1999 Han-Wen Nienhuys */ + #include "score-engraver.hh" #include "timing-engraver.hh" #include "command-request.hh" #include "score-element-info.hh" #include "multi-measure-rest.hh" - void Timing_engraver::fill_staff_info (Staff_info &inf) { inf.time_C_ = &time_; - inf.rhythmic_C_ = &default_grouping_; } diff --git a/lily/timing-translator.cc b/lily/timing-translator.cc index 10bc8f196b..08cddf2790 100644 --- a/lily/timing-translator.cc +++ b/lily/timing-translator.cc @@ -12,11 +12,6 @@ #include "global-translator.hh" #include "multi-measure-rest.hh" -Timing_translator::Timing_translator () -{ - default_grouping_ = Rhythmic_grouping (MInterval (0, 1), 4); // ugh -} - bool Timing_translator::do_try_music (Music*r) { @@ -68,10 +63,6 @@ Timing_translator::do_process_requests() else { time_.set_time_signature (b_i, o_i); - - default_grouping_ = - Rhythmic_grouping (MInterval (0,Moment (b_i, o_i)), - b_i == 1 ? 2 : b_i); } } else if (Partial_measure_req *pm = dynamic_cast (tr_l)) @@ -93,20 +84,12 @@ Timing_translator::do_process_requests() time_.whole_in_measure_.str ())); time_.whole_in_measure_ = 0; // resync - time_.error_b_ = true; } } else if (Cadenza_req *cr = dynamic_cast (tr_l)) { time_.set_cadenza (cr->on_b_); } - else if (Measure_grouping_req *mg=dynamic_cast (tr_l)) - { - default_grouping_ = - parse_grouping (mg->beat_i_arr_, - mg->elt_length_arr_); - - } } Translator_group * tr=0; @@ -165,6 +148,5 @@ Timing_translator::do_print () const { #ifndef NPRINT time_.print (); - default_grouping_.print (); #endif } diff --git a/lily/unfolded-repeat-iterator.cc b/lily/unfolded-repeat-iterator.cc index 4b6d40d16e..3a9118cab3 100644 --- a/lily/unfolded-repeat-iterator.cc +++ b/lily/unfolded-repeat-iterator.cc @@ -40,7 +40,7 @@ the alternative just set. void Unfolded_repeat_iterator::next_element () { - New_repeated_music const* mus =dynamic_cast (music_l_); + Repeated_music const* mus =dynamic_cast (music_l_); delete current_iter_p_; current_iter_p_ =0; @@ -113,7 +113,7 @@ Unfolded_repeat_iterator::next_moment () const void Unfolded_repeat_iterator::construct_children () { - New_repeated_music const* mus =dynamic_cast (music_l_); + Repeated_music const* mus =dynamic_cast (music_l_); alternative_cons_l_ = (mus->alternatives_p_) ? mus->alternatives_p_->music_p_list_p_->head_ : 0; diff --git a/lily/volta-spanner.cc b/lily/volta-spanner.cc index 32c48b9687..2cf391856c 100644 --- a/lily/volta-spanner.cc +++ b/lily/volta-spanner.cc @@ -30,7 +30,7 @@ Volta_spanner::do_brew_molecule_p () const { Molecule* mol_p = new Molecule; - if (!column_arr_.size ()) + if (!bar_arr_.size ()) return mol_p; Real interline_f = paper_l ()->get_realvar (interline_scm_sym); @@ -43,8 +43,8 @@ Volta_spanner::do_brew_molecule_p () const Real h = volta.dim_.y ().length (); Molecule num (lookup_l ()->text ("volta", number_str_, paper_l ())); - Real dy = column_arr_.top ()->extent (Y_AXIS) [UP] > - column_arr_[0]->extent (Y_AXIS) [UP]; + Real dy = bar_arr_.top ()->extent (Y_AXIS) [UP] > + bar_arr_[0]->extent (Y_AXIS) [UP]; dy += 2 * h; for (int i = 0; i < note_column_arr_.size (); i++) @@ -65,10 +65,10 @@ Volta_spanner::do_brew_molecule_p () const void Volta_spanner::do_add_processing () { - if (column_arr_.size ()) + if (bar_arr_.size ()) { - set_bounds (LEFT, column_arr_[0]); - set_bounds (RIGHT, column_arr_.top ()); + set_bounds (LEFT, bar_arr_[0]); + set_bounds (RIGHT, bar_arr_.top ()); } } @@ -85,8 +85,8 @@ Volta_spanner::do_height () const void Volta_spanner::do_post_processing () { - if (column_arr_.size()) - translate_axis (column_arr_[0]->extent (Y_AXIS)[UP], Y_AXIS); + if (bar_arr_.size()) + translate_axis (bar_arr_[0]->extent (Y_AXIS)[UP], Y_AXIS); } void @@ -95,13 +95,13 @@ Volta_spanner::do_substitute_element_pointer (Score_element* o, Score_element* n if (Note_column* c = dynamic_cast (o)) note_column_arr_.substitute (c, dynamic_cast (n)); else if (Bar* c = dynamic_cast (o)) - column_arr_.substitute (c, dynamic_cast (n)); + bar_arr_.substitute (c, dynamic_cast (n)); } void -Volta_spanner::add_column (Bar* c) +Volta_spanner::add_bar (Bar* c) { - column_arr_.push (c); + bar_arr_.push (c); add_dependency (c); } diff --git a/ly/book-fragment.ly b/ly/book-fragment.ly index 514693c498..a57db26e50 100644 --- a/ly/book-fragment.ly +++ b/ly/book-fragment.ly @@ -1,6 +1,6 @@ % Toplevel initialisation file. -\version "1.0.21"; +\version "1.1.52"; \include "declarations.ly" diff --git a/ly/book-init.ly b/ly/book-init.ly index 3bba4f0837..1820f71541 100644 --- a/ly/book-init.ly +++ b/ly/book-init.ly @@ -1,6 +1,6 @@ % Toplevel initialisation file. -\version "1.0.21"; +\version "1.1.52"; \include "declarations.ly"; diff --git a/ly/center-fragment.ly b/ly/center-fragment.ly index a5bfb07806..4cc0ac1dc7 100644 --- a/ly/center-fragment.ly +++ b/ly/center-fragment.ly @@ -1,7 +1,7 @@ % Toplevel initialisation file. -\version "1.0.21"; +\version "1.1.52"; \include "declarations.ly" diff --git a/ly/center.ly b/ly/center.ly index b32c0338a4..1fec210840 100644 --- a/ly/center.ly +++ b/ly/center.ly @@ -1,6 +1,6 @@ % Toplevel initialisation file. -\version "1.0.21"; +\version "1.1.52"; \include "declarations.ly" diff --git a/ly/engraver.ly b/ly/engraver.ly index fb9064e88a..10adf06a55 100644 --- a/ly/engraver.ly +++ b/ly/engraver.ly @@ -63,6 +63,7 @@ StaffContext=\translator { RhythmicStaffContext=\translator{ \type "Engraver_group_engraver"; numberOfStaffLines = "1"; + barSize = \staffheight; \consists "Pitch_squash_engraver"; \consists "Separating_line_group_engraver"; \name RhythmicStaff; @@ -189,7 +190,6 @@ StaffGroupContext= \translator { \consists "Separating_line_group_engraver"; \consists "Lyric_engraver"; \consists "Extender_engraver"; - \consists "Hyphen_engraver"; } \translator { diff --git a/ly/fragment.ly b/ly/fragment.ly index 57e9bba99e..5c3ea3e33e 100644 --- a/ly/fragment.ly +++ b/ly/fragment.ly @@ -1,6 +1,6 @@ % Toplevel initialisation file. -\version "1.0.21"; +\version "1.1.52"; \include "declarations.ly" diff --git a/ly/init.fly b/ly/init.fly index 13ef9a393b..ab3e85547d 100644 --- a/ly/init.fly +++ b/ly/init.fly @@ -1,6 +1,6 @@ % Toplevel initialisation file. -\version "1.0.21"; +\version "1.1.52"; \include "declarations.ly" diff --git a/ly/init.ly b/ly/init.ly index 10f2c49593..05f97097c1 100644 --- a/ly/init.ly +++ b/ly/init.ly @@ -1,6 +1,6 @@ % Toplevel initialisation file. -\version "1.0.21"; +\version "1.1.52"; \include "declarations.ly"; diff --git a/ly/init.sly b/ly/init.sly index ccd35763e3..da942c0cfd 100644 --- a/ly/init.sly +++ b/ly/init.sly @@ -1,6 +1,6 @@ % Toplevel initialisation file. -\version "1.0.21"; +\version "1.1.52"; \include "declarations.ly" diff --git a/ly/paper16.ly b/ly/paper16.ly index cb2f9f3cf1..252795dd95 100644 --- a/ly/paper16.ly +++ b/ly/paper16.ly @@ -2,7 +2,7 @@ -\version "1.0.21"; +\version "1.1.52"; paper_sixteen = \paper { staffheight = 16.0\pt; diff --git a/ly/paper20.ly b/ly/paper20.ly index 86df45795e..25e85d7dc6 100644 --- a/ly/paper20.ly +++ b/ly/paper20.ly @@ -1,7 +1,7 @@ % paper20.ly -\version "1.0.21"; +\version "1.1.52"; paper_twenty = \paper { staffheight = 20.0\pt; diff --git a/ly/params.ly b/ly/params.ly index 8c40d19377..a41d3c2c1a 100644 --- a/ly/params.ly +++ b/ly/params.ly @@ -116,7 +116,6 @@ slur_rc_factor = 2.4; notewidth = (\quartwidth + \wholewidth) / 2.0; % ugh -barsize = \staffheight; rulethickness = \staffline; gourlay_energybound = 100000.; @@ -154,10 +153,6 @@ rulethickness = \staffline; extender_height = 0.8*\staffline; -hyphen_thickness = 0.05*\font_normal; -hyphen_height = 0.2*\font_normal; -hyphen_minimum_length = 0.25*\font_normal; - % Multi-measure rests mmrest_x_minimum = 2.0*\staffheight; diff --git a/ly/performer.ly b/ly/performer.ly index a4e4fca950..f9eafe68e2 100644 --- a/ly/performer.ly +++ b/ly/performer.ly @@ -3,42 +3,56 @@ % \translator { \type "Staff_performer"; + \name Staff; \accepts Voice; + \accepts VoiceOne; % ugh. \accepts VoiceTwo; \accepts VoiceThree; \accepts VoiceFour; - \name Staff; \consists "Key_performer"; \consists "Time_signature_performer"; } +%% urg, why (needs praeludium-*.ly) these? \translator { \type "Performer_group_performer"; \consists "Note_performer"; - \name VoiceFour; + \name VoiceFour; } \translator { \type "Performer_group_performer"; \consists "Note_performer"; -\name VoiceThree; + \name VoiceThree; } \translator { \type "Performer_group_performer"; \consists "Note_performer"; - \name VoiceOne; + \name VoiceOne; } + \translator { \type "Performer_group_performer"; + \name Voice; \consists "Note_performer"; -\name Voice; + \consists "Tie_performer"; +% \accepts Grace; } + +\translator { + \type "Grace_performer_group"; + \name "Grace"; + \consists "Note_performer"; + \consists "Tie_performer"; + weAreGraceContext = "1"; +} + \translator { \type "Performer_group_performer"; diff --git a/ly/property.ly b/ly/property.ly index 979e2e66f0..4ecbd24678 100644 --- a/ly/property.ly +++ b/ly/property.ly @@ -8,7 +8,7 @@ SEE THE REFERENCE MANUAL FOR EXPLANATIONS. %} -\version "1.0.20"; +\version "1.1.52"; %hmm, (these) abbrevs suck, imo % i guess they're meant as some form of doco diff --git a/make/out/lelievijver.lsm b/make/out/lelievijver.lsm index e4ebf1611f..2fad8d037d 100644 --- a/make/out/lelievijver.lsm +++ b/make/out/lelievijver.lsm @@ -1,15 +1,15 @@ Begin3 Titel: LilyPond -Versie: 1.1.52 -Inschrijf datum: 30JUN99 +Versie: 1.1.53 +Inschrijf datum: 05JUL99 Beschrijving: @FLAPTEKST@ Trefwoorden: muziek typezetten midi notatie Auteur: hanwen@stack.nl (Han-Wen Nienhuys) janneke@gnu.org (Jan Nieuwenhuizen) Onderhouden door: hanwen@cs.ruu.nl (Han-Wen Nienhuys) Voornaamste plek: sunsite.unc.edu /pub/Linux/apps - 770k lilypond-1.1.52.tar.gz + 770k lilypond-1.1.53.tar.gz Oorspronkelijke plek: ftp.cs.uu.nl /pub/GNU/LilyPond/development/ - 770k lilypond-1.1.52.tar.gz + 770k lilypond-1.1.53.tar.gz Copi-eer voorwaarden: GPL End diff --git a/make/out/lilypond.lsm b/make/out/lilypond.lsm index b3847761cf..1acdb6762f 100644 --- a/make/out/lilypond.lsm +++ b/make/out/lilypond.lsm @@ -1,7 +1,7 @@ Begin3 Title: LilyPond -Version: 1.1.52 -Entered-date: 30JUN99 +Version: 1.1.53 +Entered-date: 05JUL99 Description: LilyPond is the GNU Project music typesetter. This program can print beautiful sheet music from a music definition file. It can also play @@ -14,8 +14,8 @@ Author: hanwen@cs.ruu.nl (Han-Wen Nienhuys) janneke@gnu.org (Jan Nieuwenhuizen) Maintained-by: hanwen@stack.nl (Han-Wen Nienhuys) Primary-site: sunsite.unc.edu /pub/Linux/apps/sound/convert - 770k lilypond-1.1.52.tar.gz + 770k lilypond-1.1.53.tar.gz Original-site: ftp.cs.uu.nl /pub/GNU/LilyPond/development/ - 770k lilypond-1.1.52.tar.gz + 770k lilypond-1.1.53.tar.gz Copying-policy: GPL End diff --git a/make/out/lilypond.spec b/make/out/lilypond.spec index b14254a632..ea09000321 100644 --- a/make/out/lilypond.spec +++ b/make/out/lilypond.spec @@ -1,9 +1,9 @@ Name: lilypond -Version: 1.1.52 +Version: 1.1.53 Release: 1 Copyright: GPL Group: Applications/Publishing -Source0: ftp.cs.uu.nl:/pub/GNU/LilyPond/development/lilypond-1.1.52.tar.gz +Source0: ftp.cs.uu.nl:/pub/GNU/LilyPond/development/lilypond-1.1.53.tar.gz Summary: A program for printing sheet music. URL: http://www.cs.uu.nl/~hanwen/lilypond Packager: Han-Wen Nienhuys diff --git a/mf/feta-schrift.mf b/mf/feta-schrift.mf index 0ce139e2dd..835a13c831 100644 --- a/mf/feta-schrift.mf +++ b/mf/feta-schrift.mf @@ -665,7 +665,7 @@ fet_beginchar("Segno", "segno", "segno") draw (x2r,-pointheight); fet_endchar; -fet_beginchar("Wheel", "wheel", "wheel") +fet_beginchar("Coda", "coda", "coda") save thin, thick, wheelwidth, wheelheight; thin# = 1.2 stafflinethickness#; thick# = 3.5 stafflinethickness#; diff --git a/mi2mu/main.cc b/mi2mu/main.cc index 79e559bafc..26e0c66b8e 100644 --- a/mi2mu/main.cc +++ b/mi2mu/main.cc @@ -138,6 +138,7 @@ main (int argc_i, char* argv_sz_a[]) textdomain (name.ch_C ()) ; #endif + bool key_override_b = false; Mudela_key key (0, 0); Long_option_init long_option_init_a[] = @@ -183,7 +184,8 @@ main (int argc_i, char* argv_sz_a[]) int i = str.index_i (':'); i = (i >=0 ? i : str.length_i ()); key.accidentals_i_ = String_convert::dec2_i (str.left_str (i)); - key.minor_i_ = (int)(bool)String_convert::dec2_i (str.cut_str (i + 1,1)); + key.minor_i_ = (int)(bool)String_convert::dec2_i (str.cut_str (i + 1, str.length_i ())); + key_override_b = true; break; } case 'n': @@ -250,7 +252,8 @@ main (int argc_i, char* argv_sz_a[]) return 1; // if given on command line: override - score_p->mudela_key_l_ = &key; + if (key_override_b || !score_p->mudela_key_l_) + score_p->mudela_key_l_ = &key; mudela_score_l_g = score_p; score_p->process(); diff --git a/mi2mu/midi-track-parser.cc b/mi2mu/midi-track-parser.cc index 661d6a8bcb..49840ec77c 100644 --- a/mi2mu/midi-track-parser.cc +++ b/mi2mu/midi-track-parser.cc @@ -304,12 +304,14 @@ Midi_track_parser::parse_event (Mudela_column* col_l) else if ((byte == 0x59) && (next == 0x02)) { next_byte (); - int accidentals_i = (int)next_byte (); - int minor_i = (int)next_byte (); + int accidentals_i = (int)(signed char)next_byte (); + int minor_i = (int)(bool)next_byte (); Mudela_key* p = new Mudela_key (accidentals_i, minor_i); item_p = p; +#if 0 info_l_->score_l_->mudela_key_l_ = p; mudela_staff_p_->mudela_key_l_ = p; +#endif } // SSME [\0x7f][\x03] else if ((byte == 0x7f) && (next == 0x03)) diff --git a/mi2mu/mudela-item.cc b/mi2mu/mudela-item.cc index 12b1b1f3ec..58a1db586b 100644 --- a/mi2mu/mudela-item.cc +++ b/mi2mu/mudela-item.cc @@ -46,21 +46,31 @@ Mudela_key::Mudela_key (int accidentals_i, int minor_i) minor_i_ = minor_i; } +char const *accname[] = {"eses", "es", "", "is" , "isis"}; + String Mudela_key::str () { - int key_i = 0; - if (accidentals_i_ >= 0) - key_i = ((accidentals_i_ % 7)[ "cgdaebf" ] - 'a' - 2) % 7; - else - key_i = ((-accidentals_i_ % 7)[ "cfbeadg" ] - 'a' - 2) % 7; + int key_i = accidentals_i_ >= 0 + ? ((accidentals_i_ % 7) ["cgdaebf"] - 'a' - 2 -2 * minor_i_ + 7) % 7 + : ((-accidentals_i_ % 7) ["cfbeadg"] - 'a' - 2 -2 * minor_i_ + 7) % 7; - String keyname = (1) // !minor_i_) - ? to_str ((char) ((key_i + 2) % 7 + 'A')) - : to_str ((char) ((key_i + 2 - 2) % 7 + 'a')); - // heu, -2: should be - 1 1/2: A -> fis - - return String("\\key " + keyname + ";\n"); + String notename_str = !minor_i_ + ? to_str ((char) ((key_i + 2) % 7 + 'A')) + : to_str ((char) ((key_i + 2) % 7 + 'a')); + + // fis cis gis dis ais eis bis + static int sharps_i_a [7] = { 2, 4, 6, 1, 3, 5, 7 }; + // bes es as des ges ces fes + static int flats_i_a [7] = { 6, 4, 2, 7, 5, 3, 1 }; + int accidentals_i = accidentals_i_ >= 0 + ? sharps_i_a [key_i] <= accidentals_i_ ? 1 : 0 + : flats_i_a [key_i] <= -accidentals_i_ ? -1 : 0; + + if (accidentals_i) + notename_str += String (accname [accidentals_i + 2]); + + return "\\key " + notename_str + (minor_i_ ? "\\minor" : "") + ";\n"; } String @@ -71,27 +81,20 @@ Mudela_key::notename_str (int pitch_i) // major scale: do-do // minor scale: la-la (= + 5) - static int notename_i_a[ 12 ] = { 0, 0, 1, 1, 2, 3, 3, 4, 4, 5, 5, 6 }; - int notename_i = notename_i_a[ (minor_i_ * 5 + pitch_i) % 12 ]; + static int notename_i_a [12] = { 0, 0, 1, 1, 2, 3, 3, 4, 4, 5, 5, 6 }; + int notename_i = notename_i_a [pitch_i % 12]; - static int accidentals_i_a[ 12 ] = { 0, 1, 0, 1, 0, 0, 1, 0, 1, 0, 1, 0 }; - int accidental_i = accidentals_i_a[ (minor_i_ * 5 + pitch_i) % 12 ]; + static int accidentals_i_a [12] = { 0, 1, 0, 1, 0, 0, 1, 0, 1, 0, 1, 0 }; + int accidental_i = accidentals_i_a [(minor_i_ * 5 + pitch_i) % 12]; if (accidental_i && (accidentals_i_ < 0)) { - accidental_i = - accidental_i; + accidental_i *= -1; notename_i = (notename_i + 1) % 7; } String notename_str = to_str ((char)(((notename_i + 2) % 7) + 'a')); - while (accidental_i-- > 0) - notename_str += "is"; - accidental_i++; - while (accidental_i++ < 0) - if ((notename_str == "a") || (notename_str == "e")) - notename_str += "s"; - else - notename_str += "es"; - accidental_i--; + if (accidental_i) + notename_str += String (accname [accidental_i + 2]); /* By tradition, all scales now consist of a sequence of 7 notes each @@ -113,18 +116,36 @@ Mudela_key::notename_str (int pitch_i) John Sankey + Let's also do a-minor: a b c d e f gis a + + --jcn + */ - /* ok, bit ugly, but here we go */ + /* ok, bit ugly, but here we go -- jcn */ - if (minor_i_ && (accidentals_i_ == -1)) - if (notename_str == "des") - notename_str = "cis"; - - if (minor_i_ && (accidentals_i_ == -2)) - if (notename_str == "ges") + + if (minor_i_) + { + if ((accidentals_i_ == 0) && (notename_str == "as")) + notename_str = "gis"; + else if ((accidentals_i_ == -1) && (notename_str == "des")) + notename_str = "cis"; + else if ((accidentals_i_ == -2) && (notename_str == "ges")) notename_str = "fis"; - + else if ((accidentals_i_ == 5) && (notename_str == "g")) + notename_str = "fisis"; + else if ((accidentals_i_ == 6) && (notename_str == "d")) + notename_str = "cisis"; + else if ((accidentals_i_ == 7) && (notename_str == "a")) + notename_str = "gisis"; + + if ((accidentals_i_ <= -6) && (notename_str == "b")) + notename_str = "ces"; + if ((accidentals_i_ <= -7) && (notename_str == "e")) + notename_str = "fes"; + } + String de_octavate_str = to_str (',', (Mudela_note::c0_pitch_i_c_ + 11 - pitch_i) / 12); String octavate_str = to_str ('\'', (pitch_i - Mudela_note::c0_pitch_i_c_) / 12); return notename_str +de_octavate_str + octavate_str; diff --git a/mi2mu/mudela-voice.cc b/mi2mu/mudela-voice.cc index 1052b3149d..286d2176c9 100644 --- a/mi2mu/mudela-voice.cc +++ b/mi2mu/mudela-voice.cc @@ -10,6 +10,9 @@ #include "mudela-staff.hh" #include "mudela-stream.hh" #include "mudela-voice.hh" +#include "mudela-score.hh" + +extern Mudela_score* mudela_score_l_g; Mudela_voice::Mudela_voice (Mudela_staff* mudela_staff_l) { @@ -56,6 +59,8 @@ Mudela_voice::output (Mudela_stream& mudela_stream_r) } mudela_stream_r << *i->car_; + if (Mudela_key* k = dynamic_cast (i->car_)) + mudela_staff_l_->mudela_key_l_ = mudela_score_l_g->mudela_key_l_ = k; } if (mudela_item_l_list_.size_i () > FAIRLY_LONG_VOICE_i) diff --git a/mutopia/Coriolan/bassi-part.ly b/mutopia/Coriolan/bassi-part.ly index 0bca494223..9663a9b281 100644 --- a/mutopia/Coriolan/bassi-part.ly +++ b/mutopia/Coriolan/bassi-part.ly @@ -7,7 +7,7 @@ enteredby = "JCN"; copyright = "public domain"; } -\version "1.0.21"; +\version "1.1.52"; \include "global.ly" \include "violoncello.ly" diff --git a/mutopia/Coriolan/clarinetti-part.ly b/mutopia/Coriolan/clarinetti-part.ly index 923b3b57c6..b88420f9ba 100644 --- a/mutopia/Coriolan/clarinetti-part.ly +++ b/mutopia/Coriolan/clarinetti-part.ly @@ -7,7 +7,7 @@ enteredby = "JCN"; copyright = "public domain"; } -\version "1.0.21"; +\version "1.1.52"; \include "global.ly" \include "clarinetti.ly" diff --git a/mutopia/Coriolan/clarinetti.ly b/mutopia/Coriolan/clarinetti.ly index aa441a3ba3..12f9d51f14 100644 --- a/mutopia/Coriolan/clarinetti.ly +++ b/mutopia/Coriolan/clarinetti.ly @@ -9,7 +9,7 @@ copyright = "public domain"; } -\version "1.0.21"; +\version "1.1.52"; \include "clarinetto-1.ly" \include "clarinetto-2.ly" diff --git a/mutopia/Coriolan/clarinetto-1.ly b/mutopia/Coriolan/clarinetto-1.ly index dca9983180..fe65e1f79d 100644 --- a/mutopia/Coriolan/clarinetto-1.ly +++ b/mutopia/Coriolan/clarinetto-1.ly @@ -9,7 +9,7 @@ copyright = "public domain"; } -\version "1.0.21"; +\version "1.1.52"; clarinetto1 = \notes \relative c { R1 *2 | d''4-.\ff r r2 | R1 *3 | e4-. r r2 | R1 *3 | diff --git a/mutopia/Coriolan/clarinetto-2.ly b/mutopia/Coriolan/clarinetto-2.ly index 281418a8fd..140bfab551 100644 --- a/mutopia/Coriolan/clarinetto-2.ly +++ b/mutopia/Coriolan/clarinetto-2.ly @@ -9,7 +9,7 @@ copyright = "public domain"; } -\version "1.0.21"; +\version "1.1.52"; clarinetto2 = \notes \relative c { R1*2 bes''4-.\ff r r2 | R1*3 | cis4-. r r2 | R1 *3 | diff --git a/mutopia/Coriolan/contrabasso-part.ly b/mutopia/Coriolan/contrabasso-part.ly index 8f364a98cc..82287a8420 100644 --- a/mutopia/Coriolan/contrabasso-part.ly +++ b/mutopia/Coriolan/contrabasso-part.ly @@ -7,7 +7,7 @@ enteredby = "JCN"; copyright = "public domain"; } -\version "1.0.21"; +\version "1.1.52"; \include "global.ly" \include "contrabasso.ly" diff --git a/mutopia/Coriolan/contrabasso.ly b/mutopia/Coriolan/contrabasso.ly index 24ee6a2a3c..09a95d239c 100644 --- a/mutopia/Coriolan/contrabasso.ly +++ b/mutopia/Coriolan/contrabasso.ly @@ -7,7 +7,7 @@ enteredby = "JCN"; copyright = "public domain"; } -\version "1.0.21"; +\version "1.1.52"; contrabasso = \notes \relative c { % \translator Staff=violoncello diff --git a/mutopia/Coriolan/coriolan.ly b/mutopia/Coriolan/coriolan.ly index 70a369b32b..f1f569d53f 100644 --- a/mutopia/Coriolan/coriolan.ly +++ b/mutopia/Coriolan/coriolan.ly @@ -7,7 +7,7 @@ enteredby = "JCN"; copyright = "public domain"; } -\version "1.0.21"; +\version "1.1.52"; \include "global.ly" diff --git a/mutopia/Coriolan/corni-part.ly b/mutopia/Coriolan/corni-part.ly index 18356afdb4..4bb3ef670e 100644 --- a/mutopia/Coriolan/corni-part.ly +++ b/mutopia/Coriolan/corni-part.ly @@ -7,7 +7,7 @@ enteredby = "JCN"; copyright = "public domain"; } -\version "1.0.21"; +\version "1.1.52"; \include "global.ly" \include "corni.ly" diff --git a/mutopia/Coriolan/corni.ly b/mutopia/Coriolan/corni.ly index 3baa0bff1a..488ce53deb 100644 --- a/mutopia/Coriolan/corni.ly +++ b/mutopia/Coriolan/corni.ly @@ -9,7 +9,7 @@ copyright = "public domain"; } -\version "1.0.21"; +\version "1.1.52"; \include "corno-1.ly" \include "corno-2.ly" diff --git a/mutopia/Coriolan/corno-1.ly b/mutopia/Coriolan/corno-1.ly index c3ea92df03..f590f63031 100644 --- a/mutopia/Coriolan/corno-1.ly +++ b/mutopia/Coriolan/corno-1.ly @@ -7,7 +7,7 @@ enteredby = "JCN"; copyright = "public domain"; } -\version "1.0.21"; +\version "1.1.52"; corno1 = \notes \relative c { R1 *2 | f''4-.\ff r r2 | R1 *3 | f4-. r r2 | R1 *3 | diff --git a/mutopia/Coriolan/corno-2.ly b/mutopia/Coriolan/corno-2.ly index 2461ec83d4..771c75ac57 100644 --- a/mutopia/Coriolan/corno-2.ly +++ b/mutopia/Coriolan/corno-2.ly @@ -7,7 +7,7 @@ enteredby = "JCN"; copyright = "public domain"; } -\version "1.0.21"; +\version "1.1.52"; corno2 = \notes \relative c { R1 *2 | d''4-.\ff r r2 | R1 *3 | d4-. r r2 | R1 *3 | diff --git a/mutopia/Coriolan/fagotti-part.ly b/mutopia/Coriolan/fagotti-part.ly index 94fd4fd552..807d2c86f0 100644 --- a/mutopia/Coriolan/fagotti-part.ly +++ b/mutopia/Coriolan/fagotti-part.ly @@ -9,7 +9,7 @@ copyright = "public domain"; } -\version "1.0.21"; +\version "1.1.52"; \include "global.ly" \include "fagotti.ly" diff --git a/mutopia/Coriolan/fagotti.ly b/mutopia/Coriolan/fagotti.ly index 555c01ef9b..6b041a4c7b 100644 --- a/mutopia/Coriolan/fagotti.ly +++ b/mutopia/Coriolan/fagotti.ly @@ -9,7 +9,7 @@ copyright = "public domain"; } -\version "1.0.21"; +\version "1.1.52"; \include "fagotto-1.ly" \include "fagotto-2.ly" diff --git a/mutopia/Coriolan/fagotto-1.ly b/mutopia/Coriolan/fagotto-1.ly index fcdb906da0..3599a3b20e 100644 --- a/mutopia/Coriolan/fagotto-1.ly +++ b/mutopia/Coriolan/fagotto-1.ly @@ -9,7 +9,7 @@ copyright = "public domain"; } -\version "1.0.21"; +\version "1.1.52"; fagotto1 = \notes \relative c { R1 *2 | as'4-.\ff r r2 | R1 *3 | as4-. r r2 | R1 *3 | diff --git a/mutopia/Coriolan/fagotto-2.ly b/mutopia/Coriolan/fagotto-2.ly index 980337e003..1ee6a0f2c8 100644 --- a/mutopia/Coriolan/fagotto-2.ly +++ b/mutopia/Coriolan/fagotto-2.ly @@ -7,7 +7,7 @@ enteredby = "JCN"; copyright = "public domain"; } -\version "1.0.21"; +\version "1.1.52"; fagotto2 = \notes \relative c { R1 *2 | f4-.\ff r r2 | R1 *3 | f4-. r r2 | R1 *3 | diff --git a/mutopia/Coriolan/flauti-part.ly b/mutopia/Coriolan/flauti-part.ly index e10242a35b..ab246c4999 100644 --- a/mutopia/Coriolan/flauti-part.ly +++ b/mutopia/Coriolan/flauti-part.ly @@ -9,7 +9,7 @@ copyright = "public domain"; } -\version "1.0.21"; +\version "1.1.52"; \include "global.ly" \include "flauti.ly" diff --git a/mutopia/Coriolan/flauti.ly b/mutopia/Coriolan/flauti.ly index 335cfd3091..bb617f040b 100644 --- a/mutopia/Coriolan/flauti.ly +++ b/mutopia/Coriolan/flauti.ly @@ -9,7 +9,7 @@ copyright = "public domain"; } -\version "1.0.21"; +\version "1.1.52"; \include "flauto-1.ly" \include "flauto-2.ly" diff --git a/mutopia/Coriolan/flauto-1.ly b/mutopia/Coriolan/flauto-1.ly index 4ae7119a3b..cc58b2e8dc 100644 --- a/mutopia/Coriolan/flauto-1.ly +++ b/mutopia/Coriolan/flauto-1.ly @@ -7,7 +7,7 @@ enteredby = "JCN"; copyright = "public domain"; } -\version "1.0.21"; +\version "1.1.52"; flauto1 = \notes \relative c { R1 *2 | c'''4-.\ff r r2 | R1 *3 | d4-. r r2 | R1 *3 | diff --git a/mutopia/Coriolan/flauto-2.ly b/mutopia/Coriolan/flauto-2.ly index 067a3620df..5a0299cfdd 100644 --- a/mutopia/Coriolan/flauto-2.ly +++ b/mutopia/Coriolan/flauto-2.ly @@ -7,7 +7,7 @@ enteredby = "JCN"; copyright = "public domain"; } -\version "1.0.21"; +\version "1.1.52"; flauto2 = \notes \relative c { R1 *2 | as'''4-.\ff r r2 | R1 *3 | b4-. r r2 | R1 *3 | diff --git a/mutopia/Coriolan/global.ly b/mutopia/Coriolan/global.ly index 8eefc99001..1aa8083f41 100644 --- a/mutopia/Coriolan/global.ly +++ b/mutopia/Coriolan/global.ly @@ -9,7 +9,7 @@ copyright = "public domain"; } -\version "1.0.21"; +\version "1.1.52"; global = \notes { \time 4/4; diff --git a/mutopia/Coriolan/oboe-1.ly b/mutopia/Coriolan/oboe-1.ly index 4631ba29e4..1a76753e3b 100644 --- a/mutopia/Coriolan/oboe-1.ly +++ b/mutopia/Coriolan/oboe-1.ly @@ -7,7 +7,7 @@ enteredby = "JCN"; copyright = "public domain"; } -\version "1.0.21"; +\version "1.1.52"; oboe1 = \notes \relative c'' { R1 *2 | as'4-.\ff r r2 | R1 *3 | as4-. r r2 | R1 *3 | diff --git a/mutopia/Coriolan/oboe-2.ly b/mutopia/Coriolan/oboe-2.ly index 8a138bde03..3f63f8e683 100644 --- a/mutopia/Coriolan/oboe-2.ly +++ b/mutopia/Coriolan/oboe-2.ly @@ -9,7 +9,7 @@ copyright = "public domain"; } -\version "1.0.21"; +\version "1.1.52"; oboe2 = \notes \relative c{ R1 *2| f''4-.\ff r r2 | R1 *3 | f4-. r r2 | R1 *3 | diff --git a/mutopia/Coriolan/oboi-part.ly b/mutopia/Coriolan/oboi-part.ly index cbdc44edb3..4dc9b03581 100644 --- a/mutopia/Coriolan/oboi-part.ly +++ b/mutopia/Coriolan/oboi-part.ly @@ -9,7 +9,7 @@ copyright = "public domain"; } -\version "1.0.21"; +\version "1.1.52"; \include "global.ly" \include "oboi.ly" diff --git a/mutopia/Coriolan/oboi.ly b/mutopia/Coriolan/oboi.ly index d9d8db98d5..226c4b9627 100644 --- a/mutopia/Coriolan/oboi.ly +++ b/mutopia/Coriolan/oboi.ly @@ -9,7 +9,7 @@ copyright = "public domain"; } -\version "1.0.21"; +\version "1.1.52"; \include "oboe-1.ly" \include "oboe-2.ly" diff --git a/mutopia/Coriolan/timpani.ly b/mutopia/Coriolan/timpani.ly index 64182a018a..089fb1ca25 100644 --- a/mutopia/Coriolan/timpani.ly +++ b/mutopia/Coriolan/timpani.ly @@ -9,7 +9,7 @@ copyright = "public domain"; } -\version "1.0.21"; +\version "1.1.52"; timpani = \notes \relative c { R1 *2 | c4-.\ff r r2 | R1 *3 | c4-. r r2 | R1 *3 | diff --git a/mutopia/Coriolan/trombe-part.ly b/mutopia/Coriolan/trombe-part.ly index 7e829fc02e..eb7d80eb41 100644 --- a/mutopia/Coriolan/trombe-part.ly +++ b/mutopia/Coriolan/trombe-part.ly @@ -9,7 +9,7 @@ copyright = "public domain"; } -\version "1.0.21"; +\version "1.1.52"; \include "global.ly" \include "trombe.ly" diff --git a/mutopia/Coriolan/trombe.ly b/mutopia/Coriolan/trombe.ly index 28ea0951ff..19b0052a97 100644 --- a/mutopia/Coriolan/trombe.ly +++ b/mutopia/Coriolan/trombe.ly @@ -9,7 +9,7 @@ copyright = "public domain"; } -\version "1.0.21"; +\version "1.1.52"; \include "trombo-1.ly" \include "trombo-2.ly" diff --git a/mutopia/Coriolan/trombo-1.ly b/mutopia/Coriolan/trombo-1.ly index 1d7a55ee4d..9fb05d6e4f 100644 --- a/mutopia/Coriolan/trombo-1.ly +++ b/mutopia/Coriolan/trombo-1.ly @@ -7,7 +7,7 @@ enteredby = "JCN"; copyright = "public domain"; } -\version "1.0.21"; +\version "1.1.52"; trombo1 = \notes \relative c { R1 *2 | c''4-.\ff r r2 | R1 *3 | c4-. r r2 | R1 *3 | diff --git a/mutopia/Coriolan/trombo-2.ly b/mutopia/Coriolan/trombo-2.ly index 92fd2bfa75..75d7bf3ef4 100644 --- a/mutopia/Coriolan/trombo-2.ly +++ b/mutopia/Coriolan/trombo-2.ly @@ -7,7 +7,7 @@ enteredby = "JCN"; copyright = "public domain"; } -\version "1.0.21"; +\version "1.1.52"; trombo2 = \notes \relative c { R1 *2 | c'4-.\ff r r2 | R1 *3 | c4-. r r2 | R1 *3 | diff --git a/mutopia/Coriolan/viola-1.ly b/mutopia/Coriolan/viola-1.ly index 7aac9fc86b..44b2312950 100644 --- a/mutopia/Coriolan/viola-1.ly +++ b/mutopia/Coriolan/viola-1.ly @@ -7,7 +7,7 @@ enteredby = "JCN"; copyright = "public domain"; } -\version "1.0.21"; +\version "1.1.52"; viola1 = \notes \relative c { \context Voice=one diff --git a/mutopia/Coriolan/viola-2.ly b/mutopia/Coriolan/viola-2.ly index 1f1c90e041..4b960a8acd 100644 --- a/mutopia/Coriolan/viola-2.ly +++ b/mutopia/Coriolan/viola-2.ly @@ -7,7 +7,7 @@ enteredby = "JCN"; copyright = "public domain"; } -\version "1.0.21"; +\version "1.1.52"; viola2 = \notes \relative c { % starts on (actualy, most part is on) same staff as viola1 diff --git a/mutopia/Coriolan/viola-part.ly b/mutopia/Coriolan/viola-part.ly index f6ac9f640a..451392a491 100644 --- a/mutopia/Coriolan/viola-part.ly +++ b/mutopia/Coriolan/viola-part.ly @@ -7,7 +7,7 @@ enteredby = "JCN"; copyright = "public domain"; } -\version "1.0.21"; +\version "1.1.52"; \include "global.ly" \include "viola-1.ly" diff --git a/mutopia/Coriolan/violino-1-part.ly b/mutopia/Coriolan/violino-1-part.ly index e5641f9fd1..29287a6c9a 100644 --- a/mutopia/Coriolan/violino-1-part.ly +++ b/mutopia/Coriolan/violino-1-part.ly @@ -7,7 +7,7 @@ enteredby = "JCN"; copyright = "public domain"; } -\version "1.0.21"; +\version "1.1.52"; \include "global.ly" \include "violino-1.ly" diff --git a/mutopia/Coriolan/violino-1.ly b/mutopia/Coriolan/violino-1.ly index b77cd240aa..8579677fe8 100644 --- a/mutopia/Coriolan/violino-1.ly +++ b/mutopia/Coriolan/violino-1.ly @@ -7,7 +7,7 @@ enteredby = "JCN"; copyright = "public domain"; } -\version "1.0.21"; +\version "1.1.52"; violino1 = \notes \relative c { c'1\ff ~ | c | r r2 | R1 | diff --git a/mutopia/Coriolan/violino-2-part.ly b/mutopia/Coriolan/violino-2-part.ly index 89cc9cb00d..7cb9b83583 100644 --- a/mutopia/Coriolan/violino-2-part.ly +++ b/mutopia/Coriolan/violino-2-part.ly @@ -7,7 +7,7 @@ enteredby = "JCN"; copyright = "public domain"; } -\version "1.0.21"; +\version "1.1.52"; \include "global.ly" \include "violino-2.ly" diff --git a/mutopia/Coriolan/violino-2.ly b/mutopia/Coriolan/violino-2.ly index d9e906c74e..a0583cd203 100644 --- a/mutopia/Coriolan/violino-2.ly +++ b/mutopia/Coriolan/violino-2.ly @@ -7,7 +7,7 @@ enteredby = "JCN"; copyright = "public domain"; } -\version "1.0.21"; +\version "1.1.52"; violino2 = \notes \relative c { c'1\ff ~ | c | r r2 | R1 | diff --git a/mutopia/Coriolan/violoncello-part.ly b/mutopia/Coriolan/violoncello-part.ly index 34f48f6a20..0fa1446a1a 100644 --- a/mutopia/Coriolan/violoncello-part.ly +++ b/mutopia/Coriolan/violoncello-part.ly @@ -7,7 +7,7 @@ enteredby = "JCN"; copyright = "public domain"; } -\version "1.0.21"; +\version "1.1.52"; \include "global.ly" \include "violoncello.ly" diff --git a/mutopia/Coriolan/violoncello.ly b/mutopia/Coriolan/violoncello.ly index 28ffd4c402..2ea3f661e9 100644 --- a/mutopia/Coriolan/violoncello.ly +++ b/mutopia/Coriolan/violoncello.ly @@ -9,7 +9,7 @@ copyright = "public domain"; } -\version "1.0.21"; +\version "1.1.52"; violoncello = \notes \relative c { c1\ff ~ | c | f,4-. r r2 | r1 | c'1\ff ~ | c | f,4-. r r2 | diff --git a/mutopia/D.Scarlatti/progress.ly b/mutopia/D.Scarlatti/progress.ly index 95aecf997d..b3e4d878f7 100644 --- a/mutopia/D.Scarlatti/progress.ly +++ b/mutopia/D.Scarlatti/progress.ly @@ -807,4 +807,4 @@ Bar_number_engraver;}} ---------------------------------------------------- -\version "1.0.21"; +\version "1.1.52"; diff --git a/mutopia/D.Scarlatti/sonata-k1-l366.ly b/mutopia/D.Scarlatti/sonata-k1-l366.ly index 18b3e31933..226e353c76 100644 --- a/mutopia/D.Scarlatti/sonata-k1-l366.ly +++ b/mutopia/D.Scarlatti/sonata-k1-l366.ly @@ -266,4 +266,4 @@ s1 \paper{barsize=50.0; \translator {\StaffContext \consists Bar_number_engraver;}} } -\version "1.0.21"; +\version "1.1.52"; diff --git a/mutopia/D.Scarlatti/sonata-k2-l388.ly b/mutopia/D.Scarlatti/sonata-k2-l388.ly index 27fa3e2c83..6e3d0dec97 100644 --- a/mutopia/D.Scarlatti/sonata-k2-l388.ly +++ b/mutopia/D.Scarlatti/sonata-k2-l388.ly @@ -336,4 +336,4 @@ g,4. | Bar_number_engraver;}} } -\version "1.0.21"; +\version "1.1.52"; diff --git a/mutopia/D.Scarlatti/sonata-k3-l378.ly b/mutopia/D.Scarlatti/sonata-k3-l378.ly index fcd51d8fae..93da8cb3ff 100644 --- a/mutopia/D.Scarlatti/sonata-k3-l378.ly +++ b/mutopia/D.Scarlatti/sonata-k3-l378.ly @@ -251,4 +251,4 @@ LHtoL = { \tolower \stemdown } } -\version "1.0.21"; +\version "1.1.52"; diff --git a/mutopia/D.Scarlatti/sonata-k4-l390.ly b/mutopia/D.Scarlatti/sonata-k4-l390.ly index e4fe831087..d40371b61b 100644 --- a/mutopia/D.Scarlatti/sonata-k4-l390.ly +++ b/mutopia/D.Scarlatti/sonata-k4-l390.ly @@ -311,4 +311,4 @@ s8 [c''16 g'8 fis'16] [bes'' g' f' ees'] | \paper{barsize=50.0; \translator {\StaffContext \consists Bar_number_engraver;}} } -\version "1.0.21"; +\version "1.1.52"; diff --git a/mutopia/D.Zipoli/verso_2.ly b/mutopia/D.Zipoli/verso_2.ly index 90984120b2..3a88cee648 100644 --- a/mutopia/D.Zipoli/verso_2.ly +++ b/mutopia/D.Zipoli/verso_2.ly @@ -17,7 +17,7 @@ title = "Verso II"; under the Gnu Public Licence. %} -\version "1.0.21"; +\version "1.1.52"; $voice_one = \notes \relative c' { a'2 bes4. [c16 bes] | a4 d ~ d c ~ | c b ~ [b8 a] a4 ~| diff --git a/mutopia/E.Satie/gnossienne-4.ly b/mutopia/E.Satie/gnossienne-4.ly index 26fbb528fb..ca23359ef7 100644 --- a/mutopia/E.Satie/gnossienne-4.ly +++ b/mutopia/E.Satie/gnossienne-4.ly @@ -12,7 +12,7 @@ Tested Features: cross staff auto beams and slurs, grace notes, no bars %} -\version "1.0.20"; +\version "1.1.52"; \include "nederlands.ly" @@ -23,18 +23,18 @@ global = \notes { \bar ".|"; } -upper = \context Staff=treble \notes\relative c''{ +melody = \notes\relative c''{ \clef violin; \property Voice.verticalDirection = 1 r2 r r r2 r r r4 a'8--(\< a-- a-- a-- c-- \!b-- a--\> gis f \!e - es8 \grace b({ ))c r4 r2 r + es8 \grace b( ))c r4 r2 r r2 r r r4 a'8--(\< a-- a-- a-- c-- \!b-- a--\> gis f \!e - es8 } \grace b({ ))c r4 r2 r + es8 \grace b( ))c r4 r2 r r4 g16( a bes a g a bes a g a bes a g a bes a g fis es fis - )d4 } \grace fis8()gis4 ~ gis8 r r4 r2 + )d4 \grace fis8()gis4 ~ gis8 r r4 r2 r4 g16( a bes a g a bes a g a bes a g a bes a g fis es fis )d4 \grace fis8()gis4 ~ gis8 r r4 r2 \grace a8()f4 ~ f8 r r2 r @@ -60,14 +60,11 @@ upper = \context Staff=treble \notes\relative c''{ } basloopje = \notes\relative c{ -% d,8( a' d f a d f d a f d )a - d,8( a' d f a \translator Staff=treble d f d \translator Staff=bass a f d )a +% d,8( a' d f a \translator Staff=treble d f d \translator Staff=bass a f d )a + d,8( a' d f a d f d a f d )a } -lower = \context Voice=two \notes \relative c{ - \stemdown - \property Staff.slurVerticalDirection = 1 - +accompany = \notes \relative c{ % snapnie, hoevaak relative c heeft ze nodig? \notes\relative c \basloopje \notes\relative c \basloopje @@ -105,19 +102,20 @@ lower = \context Voice=two \notes \relative c{ < e1 b' e> ~ < e b' e> } -\score { - \context PianoStaff < - \context Staff = treble < - \global - \upper - > - \context Staff = bass < - \global - \clef bass; - \lower - > - > +\score{ + \notes{ + \context AutoSwitchGrandStaff \relative c < + \global + \context Staff=upper { + \context Voice=foo + \property Voice.verticalDirection = 1 + \property Voice.scriptVerticalDirection = 1 + \melody + } + \context AutoSwitchContext \accompany + > + } \paper { gourlay_maxmeasures = 4.; indent = 8.\mm; @@ -126,10 +124,6 @@ lower = \context Voice=two \notes \relative c{ % no slur damping slur_slope_damping = 100.0; - \translator{ - \VoiceContext - beamAutoEnd = "1/2"; - } \translator{ \StaffContext % don't auto-generate bars: not a good idea: -> no breakpoints @@ -138,9 +132,40 @@ lower = \context Voice=two \notes \relative c{ defaultBarType = "empty"; \remove "Time_signature_engraver"; } + \translator{ + \GraceContext + \remove "Local_key_engraver"; + } + \translator { + \ScoreContext + \accepts AutoSwitchGrandStaff; + } + \translator{ + \type "Engraver_group_engraver"; + \name AutoSwitchGrandStaff; + \consists "Span_bar_engraver"; + \consists "Vertical_align_engraver"; + \consists "Piano_bar_engraver"; + \consistsend "Axis_group_engraver"; + minVerticalAlign = 2.*\staffheight; + maxVerticalAlign = 2.*\staffheight; + switcherName = "Voice"; + acceptorName = "Thread"; + staffContextName = "Staff"; + + \accepts "AutoSwitchContext"; + \accepts "Staff"; + slurVerticalDirection = 1; + verticalDirection = -1; + beamAutoEnd = "1/2"; + } + \translator { + \type "Engraver_group_engraver"; + \name "AutoSwitchContext"; + \consists "Staff_switching_translator"; + } + } + \midi { + \tempo 4 = 54; } -% broken 1.1.51.hwn2 -% \midi { -% \tempo 4 = 54; -% } } diff --git a/mutopia/E.Satie/petite-ouverture-a-danser.ly b/mutopia/E.Satie/petite-ouverture-a-danser.ly index 397be40bb6..e77a6da234 100644 --- a/mutopia/E.Satie/petite-ouverture-a-danser.ly +++ b/mutopia/E.Satie/petite-ouverture-a-danser.ly @@ -12,7 +12,7 @@ Tested Features: %} -\version "1.0.21"; +\version "1.1.52"; \include "nederlands.ly" diff --git a/mutopia/F.Schubert/AnSylvia.ly b/mutopia/F.Schubert/AnSylvia.ly index e20b01ace9..f2b0d496cc 100644 --- a/mutopia/F.Schubert/AnSylvia.ly +++ b/mutopia/F.Schubert/AnSylvia.ly @@ -10,7 +10,7 @@ title = "An Sylvia"; } -\version "1.0.20"; +\version "1.1.52"; \include "paper16.ly"; \include "paper13.ly"; @@ -259,13 +259,13 @@ tune=\notes \relative c'' { r1 \bar "|."; } -fourbars=\lyrics { _1 | _1 | _1 | _1 | } +fourbars=\lyrics { "_"1*5 } verseOne=\lyrics { Who2. is4 | Syl- via, _2 | - What2. is4 | she, _ _ That | + What2. is4 | she,2 That4 | all our swains com- | - mend2 her?4 _ | - _1 | + mend2 her?4 " " | + " "1 | Ho-4 - - ly, | fair,2 _4 and | wise2. is4 | diff --git a/mutopia/F.Schubert/standchen-16.ly b/mutopia/F.Schubert/standchen-16.ly index d38c8cce4d..3564426fa3 100644 --- a/mutopia/F.Schubert/standchen-16.ly +++ b/mutopia/F.Schubert/standchen-16.ly @@ -9,6 +9,6 @@ description = "A schubert song in 16 pt"; copyright = "public domain"; } -\version "1.0.21"; +\version "1.1.52"; \include "standchen.ly" diff --git a/mutopia/F.Schubert/standchen-20.ly b/mutopia/F.Schubert/standchen-20.ly index 9ae5a8c5d8..d5dbd8c30e 100644 --- a/mutopia/F.Schubert/standchen-20.ly +++ b/mutopia/F.Schubert/standchen-20.ly @@ -1,15 +1,16 @@ \header{ filename = "standchen.ly"; -title = "St\"andchen (Serenade) Leise flehen meine Lieder\""; +title = "St\\\"andchen"; +subtitle = "(Serenade)\\\\``Leise flehen meine Lieder''"; opus = "D. 957 No. 4"; -composer = "Franz Schubert (1797-1828)" - "Text by Ludwig Rellstab (1799-1860)"; +date = "August 1828"; +composer = "Franz Schubert (1797-1828)"; +poet= "Text by Ludwig Rellstab (1799-1860)"; enteredby = "JCN"; copyright = "public domain"; -description = "A schubert song in 20 pt"; } -\version "1.0.21"; +\version "1.1.52"; % fool make-website % \include "standchen.ly"; diff --git a/mutopia/F.Schubert/standchen.ly b/mutopia/F.Schubert/standchen.ly index cca14da911..c124113668 100644 --- a/mutopia/F.Schubert/standchen.ly +++ b/mutopia/F.Schubert/standchen.ly @@ -16,10 +16,10 @@ multiple \paper{}s in one \score Note: Original key F. %} -\version "1.0.21"; +\version "1.1.52"; vocalVerse = \notes\relative c''{ - \property Voice.dynamicdir=1 + \property Voice.dynamicDir=1 \times 2/3 { [ g8( )as] g } c4. g8 | \times 2/3 { [ f8( )g] f } c'4 f,8 r | g4.-> f8 \times 2/3 { [ f( )es] d } | @@ -35,18 +35,14 @@ vocalVerse = \notes\relative c''{ g8. b16 es4. d8 | c8. g16 es4. c8 | % \times 2/3 { [ as\grace( bes ] ) -% \tiny [as'16*1/16 bes16*1/16 ] -% \normalsize \times 2/3 { [as8 g8] as8 } c4. as8 | - \times 2/3 { [ as'8( )g] as } c4. as8 | + \grace { as'16 bes } \times 2/3 { [ )as8( )g] as } c4. as8 | g2. | - %\times 2/3 { [ f\grace( g] ) - \times 2/3 { [ f8( )e] f } as4. f8 | - %\tiny \times 2/3 { [f`16*1/16 g16*1/16] \normalsize + \grace { f16( g } \times 2/3 { [ )f8( )e] f } as4. f8 | + es!2. | g8. b16 es4. d8 | c8. g16 e4. c8 | - % \times 2/3 { [ a\grace( b] ) - \times 2/3 { [ a'!8( ) gis] a } c4. a8 | + \grace { a'16( b } \times 2/3 { [ )a!8( ) gis] a } c4. a8 | g!2. | % \times 2/3 { [ a\grace( b] ) \times 2/3 { [ d'8\f cis] d } f4. b,8 | @@ -54,7 +50,7 @@ vocalVerse = \notes\relative c''{ } vocalThrough = \notes\relative c{ - \property Voice.dynamicdir=1 + \property Voice.dynamicDir=1 g''8. g16 b8. b16 d8. d16 | c4 b r | g4. b8 d8. c16 | @@ -63,11 +59,8 @@ vocalThrough = \notes\relative c{ a8. b16 c4-> a8 r | R2. | R2. | - % 4 bars copied from end verse 1 - % \times 2/3 { [ a\grace( b] ) - \times 2/3 { [ a!8( ) gis] a } c4. a8 | + \grace { a16( b } \times 2/3 { [ )a!8( ) gis] a } c4. a8 | g!2. | - % \times 2/3 { [ a\grace( b] ) \times 2/3 { [ d'8\f cis] d } f4. b,8 | c!2. ~ | c4 r c | @@ -82,15 +75,17 @@ lyricVerse1 = \lyrics{ \times 2/3 { mei-4 ne8 } Lie-4 der8 " "8 | Durch4. die8 \times 2/3 { Nacht4 zu8 } | dir;2 " "4 | - " "4 " " " " | - " " " " " " | + " "2.*2 +%{ " "4 " " " " | + " " " " " " |%} % 11 \times 2/3 { In4 den8 } stil-4. len8 | \times 2/3 { Hain4 her-8 } nie-4. der8 | Lieb-4. chen,8 \times 2/3 { komm4 zu8 } | mir!2 " "4 | - " "4 " " " " | - " " " " " " | + " "2.*2 +%{ " "4 " " " " | + " " " " " " |%} % 17 Fl\"us-8. ternd16 schlan-4. ke8 | Wip-8. fel16 rau-4. schen8 | @@ -113,17 +108,19 @@ lyricVerse2 = \lyrics{ \times 2/3 { gal-4 len8 } schla-4 gen?8 " "8 ach!4. sie8 \times 2/3 { fleh-4 en8 } dich,2 " "4 - " "4 " " " " + " "2.*2 +%{ " "4 " " " " " "4" " " " - +%} % 11 \times 2/3 { Mit4 der8 } T\"o-4. ne8 \times 2/3 { s\"u-4 "\ss en"8 } Kla-4. gen8 Fleh-4. en8 \times 2/3 { sie4 f\"ur8 } mich2 " "4 - " "4" " " " + " "2.*2 +%{ " "4" " " " " "4" " " " - +%} % 17 Sie-8. ver-16 stehn4. des8 Bus-8. ens16 Seh-4. nen8 @@ -162,65 +159,64 @@ lyricThrough = \lyrics{ } trebleIntro = \notes\relative c{ - \clef violin; - % ugh: id like to type this! - r8^"\bf m\\\"assig"\pp [ ] | - r8 [ ] | - r8 [ ] | - r8 [ ] | + r8^"\bf m\\\"a\\\ss ig"\pp | + r8 | + r8 | + r8 | \break } trebleVerse1 = \notes\relative c{ %5 - r8 [ ] | - r8 [ ] | - r8 [ ] | - r8 [ ] | + r8 | + r8 | + r8 | + r8 | <)f8 d> - \times 2/3 { < [ f( d> <)d b] > } | + \times 2/3 { < [ f( d> <)d b] > } | %10 | - r8 [ ] | - r8 [ ] | - r8 [ ] | - r8 [ ] + r8 | + r8 | + r8 | + r8 <{ es'( ) d4.() f8}{ c' | bes4. as8 } > - \times 2/3 { < [f( as> <)d f] > } | + \times 2/3 { < [f( as> <)d f] > } | %16 | - r8 [ ] | - r8 [ ] | - r8\pp [ ] | + r8 | + r8 | + r8\pp | %20 - r8 [ ] | - % \times 2/3 { [ as\grace( bes ) - \times 2/3 { [ as'8( g as] } c4.-> ) as8 | + r8 | + \grace { as'16( bes } \times 2/3 { [ )as8( g as] } c4.-> ) as8 | g2. | - r8 [ ] | - r8 [ ] | - r8 [ ] | - r8 [ ] | + r8 | + r8 | + r8 | + r8 | \times 2/3 < { [ f'8\f( e f] } { f' e f } > - < {a4.- > )f8} { a4. f8 } > | + < {a4.- > )f8} { a'4. f8 } > | } trebleEentje = \notes \relative c'{ + \context Voice=one \property Voice.verticalDirection = 0 | - [( c> <)f16 )as>] | - [ ] | - [ ] | + ( c> <)f16 )as> | + | + | | - [ ] | - [ ] | - [ ] | + | + | + | %60 | } trebleThrough = \notes \relative c'{ + \context Voice=one \property Voice.verticalDirection = 0 | %61 R2. | @@ -232,23 +228,24 @@ trebleThrough = \notes \relative c'{ < { d,2.\f a'2} { e2. ~ e2 } { b'2. c,2 }> r4 | \context Staff < { - \voiceone - [a8. b16] c4-> () a8 r | - [a8. b16] c4-> () a8 r | + \context Voice=one \property Voice.verticalDirection = 1 + a8. b16 c4-> () a8 r | + a8. b16 c4-> () a8 r | } { - \voicetwo + \context Voice=two \property Voice.verticalDirection = -1 | | } > + \context Voice=one \property Voice.verticalDirection = 0 % 4 bars copied from end verse1 - r8 [ ] | + r8 | %70 - r8 [ ] | + r8 | \times 2/3 < { [ f'8\f( e f] } { f' e f }> - < { a4.-> )f8 } { a4. f8 } > | + < { a4.-> )f8 } { a'4. f8 } > | r4 | r4 | \property Voice . textStyle = "italic" @@ -258,9 +255,9 @@ trebleThrough = \notes \relative c'{ | % four copied from begin eentje - [ c> ] | - [ ] | - [ ] | + c> | + | + | %80 \property Voice . textStyle = "italic" | @@ -269,8 +266,7 @@ trebleThrough = \notes \relative c'{ } bassIntro = \notes\relative c{ - \clef bass; - \property Voice.dynamicdir=1 + \property Voice.dynamicDir=1 %1 r4 | r4 | @@ -280,7 +276,7 @@ bassIntro = \notes\relative c{ bassVerse1 = \notes\relative c{ % \clef bass; - \property Voice.dynamicdir=1 + \property Voice.dynamicDir=1 %5 r4 | r4 | @@ -311,7 +307,7 @@ bassVerse1 = \notes\relative c{ } bassEentje = \notes\relative c{ - \property Voice.dynamicdir=1 + \property Voice.dynamicDir=1 [ ] | c,8 [ ] | [ ] | @@ -323,7 +319,7 @@ bassEentje = \notes\relative c{ } bassThrough = \notes\relative c{ - \property Voice.dynamicdir=1 + \property Voice.dynamicDir=1 %61 [ b-> d->> ] | [ b-> d->> ] | @@ -366,11 +362,12 @@ global = \notes{ } -lyricFour = \lyrics{ - " "4 " " " " - " " " " " " +lyricFour = \lyrics{ + " "2.*4 +%{ " "4 " " " " " " " " " " " " " " " " + " " " " " "%} } allLyrics = { @@ -391,7 +388,11 @@ lyricStaff = \context Lyrics = lyric< vocals = \notes{ \clef treble; - \property Voice.dynamicdir=UP + % certainly no auto-beaming for vocals + \property Voice.beamAuto=0 + + + \property Voice.dynamicDir = \up \skip 4 * 12; \vocalVerse \skip 4 * 24; @@ -406,6 +407,8 @@ vocalStaff = \context Staff = vocal< > treble = { + \clef treble; + \property Voice.beamAutoBegin=0 \trebleIntro \trebleVerse1 \trebleEentje @@ -419,6 +422,7 @@ trebleStaff = \context Staff = treble< > bass = { + \clef bass; \bassIntro \bassVerse1 \bassEentje @@ -431,7 +435,7 @@ bassStaff = \context Staff = bass< \bass > -grandStaff = \context GrandStaff< +grandStaff = \context PianoStaff < \trebleStaff \bassStaff > @@ -455,7 +459,8 @@ grandStaff = \context GrandStaff< % \translator { \OrchestralPartStaffContext } \translator { \HaraKiriStaffContext } } - \midi{ - \tempo 4 = 54; - } +%broken 1.1.51 +% \midi{ +% \tempo 4 = 54; +% } } diff --git a/mutopia/Hymns/diademata.ly b/mutopia/Hymns/diademata.ly index 99e3b59d1d..5a6a838bc5 100644 --- a/mutopia/Hymns/diademata.ly +++ b/mutopia/Hymns/diademata.ly @@ -6,7 +6,7 @@ date = "1868"; title = "Diademata"; metre = "6 6. 8 6. D"; } -\version "1.0.21"; +\version "1.1.52"; sop=\notes \transpose c''{ ees2 | ees4 ees4 g2 g2 | c'1. \bar "||"; diff --git a/mutopia/Hymns/laudatedom.ly b/mutopia/Hymns/laudatedom.ly index 5078d01f70..ffdcd6f23e 100644 --- a/mutopia/Hymns/laudatedom.ly +++ b/mutopia/Hymns/laudatedom.ly @@ -4,7 +4,7 @@ composer = "Parry"; metre = "10 10 . 11 11"; } -\version "1.0.21"; +\version "1.1.52"; sop = \notes \transpose c''{ f4 | d' bes c' | f2 \bar "||"; diff --git a/mutopia/Hymns/maccabaeus.ly b/mutopia/Hymns/maccabaeus.ly index 6a7ba8e9b7..1ad5091acb 100644 --- a/mutopia/Hymns/maccabaeus.ly +++ b/mutopia/Hymns/maccabaeus.ly @@ -7,7 +7,7 @@ title = "Maccabaeus"; metre = "10 11. 11 11. and refrain"; } -\version "1.0.21"; +\version "1.1.52"; sop=\notes \relative c'' { b2 gis4. a8 |b2 e,2 | diff --git a/mutopia/Hymns/ode.ly b/mutopia/Hymns/ode.ly index 9026a41041..aef853723d 100644 --- a/mutopia/Hymns/ode.ly +++ b/mutopia/Hymns/ode.ly @@ -7,7 +7,7 @@ title = "Ode to Joy"; metre = "8 7 8 7 D"; } -\version "1.0.21"; +\version "1.1.52"; sop=\notes \relative c'' { b4 b c d | d c b a | g g a b | b4. a8 a2 \bar "||"; diff --git a/mutopia/Hymns/stille.ly b/mutopia/Hymns/stille.ly index 3c3a619e04..a2d5573c88 100644 --- a/mutopia/Hymns/stille.ly +++ b/mutopia/Hymns/stille.ly @@ -8,7 +8,7 @@ poet = "Joseph Mohr"; } -\version "1.0.21"; +\version "1.1.52"; global=\notes { \time 6/4; diff --git a/mutopia/J.S.Bach/Cembalo-Partitas/Partita_II_Allemande.ly b/mutopia/J.S.Bach/Cembalo-Partitas/Partita_II_Allemande.ly index f2b28b3581..e1136e13da 100644 --- a/mutopia/J.S.Bach/Cembalo-Partitas/Partita_II_Allemande.ly +++ b/mutopia/J.S.Bach/Cembalo-Partitas/Partita_II_Allemande.ly @@ -4,7 +4,7 @@ piece = "Allemande"; } -\version "1.0.21"; +\version "1.1.52"; global = \notes{ \time 4/4; diff --git a/mutopia/J.S.Bach/Cembalo-Partitas/Partita_II_Capriccio.ly b/mutopia/J.S.Bach/Cembalo-Partitas/Partita_II_Capriccio.ly index 5469e6bf52..4843135792 100644 --- a/mutopia/J.S.Bach/Cembalo-Partitas/Partita_II_Capriccio.ly +++ b/mutopia/J.S.Bach/Cembalo-Partitas/Partita_II_Capriccio.ly @@ -10,7 +10,7 @@ %% %% Noe liknende skjer også i mellom andre og tredje stemme i takt 28 -\version "1.0.21"; +\version "1.1.52"; global = \notes{ \time 2/4; diff --git a/mutopia/J.S.Bach/Cembalo-Partitas/Partita_II_Sinfonia.ly b/mutopia/J.S.Bach/Cembalo-Partitas/Partita_II_Sinfonia.ly index 1a4ec05b46..4ec2a3428f 100644 --- a/mutopia/J.S.Bach/Cembalo-Partitas/Partita_II_Sinfonia.ly +++ b/mutopia/J.S.Bach/Cembalo-Partitas/Partita_II_Sinfonia.ly @@ -10,7 +10,7 @@ copyright = "Public Domain"; } -\version "1.0.21"; +\version "1.1.52"; global = \notes { \time 4/4; diff --git a/mutopia/J.S.Bach/Petites-Preludes/preludes-1.ly b/mutopia/J.S.Bach/Petites-Preludes/preludes-1.ly index ecb7306334..586ab4e11f 100644 --- a/mutopia/J.S.Bach/Petites-Preludes/preludes-1.ly +++ b/mutopia/J.S.Bach/Petites-Preludes/preludes-1.ly @@ -12,7 +12,7 @@ enteredby = "jcn"; copyright = "public domain"; } -\version "1.0.21"; +\version "1.1.52"; % upper = \context Staff \notes\relative c { upper = \context Staff=upper \notes\relative c { diff --git a/mutopia/J.S.Bach/Petites-Preludes/preludes-2.ly b/mutopia/J.S.Bach/Petites-Preludes/preludes-2.ly index d77cc32d9e..24fcc6d71e 100644 --- a/mutopia/J.S.Bach/Petites-Preludes/preludes-2.ly +++ b/mutopia/J.S.Bach/Petites-Preludes/preludes-2.ly @@ -10,7 +10,7 @@ enteredby = "jcn"; copyright = "public domain"; } -\version "1.0.21"; +\version "1.1.52"; upper = \context Staff \notes\relative c{ \context Voice=i \property Voice . textStyle = "italic" diff --git a/mutopia/J.S.Bach/Petites-Preludes/preludes-4.ly b/mutopia/J.S.Bach/Petites-Preludes/preludes-4.ly index e40697f63e..71139a0aa6 100644 --- a/mutopia/J.S.Bach/Petites-Preludes/preludes-4.ly +++ b/mutopia/J.S.Bach/Petites-Preludes/preludes-4.ly @@ -8,7 +8,7 @@ composer = "Johann Sebastian Bach (1685-1750)"; enteredby = "jcn"; copyright = "public domain"; } -\version "1.0.21"; +\version "1.1.52"; one = \context Staff \notes\relative c { \context Voice=i diff --git a/mutopia/J.S.Bach/Petites-Preludes/preludes-5.ly b/mutopia/J.S.Bach/Petites-Preludes/preludes-5.ly index 420a85766d..9f0fde9241 100644 --- a/mutopia/J.S.Bach/Petites-Preludes/preludes-5.ly +++ b/mutopia/J.S.Bach/Petites-Preludes/preludes-5.ly @@ -8,7 +8,7 @@ composer = "Johann Sebastian Bach (1685-1750)"; enteredby = "jcn"; copyright = "public domain"; } -\version "1.0.21"; +\version "1.1.52"; upper = \context Staff \notes\relative c{ diff --git a/mutopia/J.S.Bach/Petites-Preludes/preludes-6.ly b/mutopia/J.S.Bach/Petites-Preludes/preludes-6.ly index f0259058a3..a3568d5bbb 100644 --- a/mutopia/J.S.Bach/Petites-Preludes/preludes-6.ly +++ b/mutopia/J.S.Bach/Petites-Preludes/preludes-6.ly @@ -8,7 +8,7 @@ composer = "Johann Sebastian Bach (1685-1750)"; enteredby = "jcn"; copyright = "public domain"; } -\version "1.0.21"; +\version "1.1.52"; one = \context Staff \notes\relative c{ diff --git a/mutopia/J.S.Bach/Solo-Cello-Suites/allemande-cello.ly b/mutopia/J.S.Bach/Solo-Cello-Suites/allemande-cello.ly index 632aad0510..937ec2cd03 100644 --- a/mutopia/J.S.Bach/Solo-Cello-Suites/allemande-cello.ly +++ b/mutopia/J.S.Bach/Solo-Cello-Suites/allemande-cello.ly @@ -15,7 +15,7 @@ copyright = "public domain"; dotted slurs %} -\version "1.0.21"; +\version "1.1.52"; \include "allemande-urtext.ly"; diff --git a/mutopia/J.S.Bach/Solo-Cello-Suites/allemande-urtext.ly b/mutopia/J.S.Bach/Solo-Cello-Suites/allemande-urtext.ly index 3b4fda0013..fdfdf76f8b 100644 --- a/mutopia/J.S.Bach/Solo-Cello-Suites/allemande-urtext.ly +++ b/mutopia/J.S.Bach/Solo-Cello-Suites/allemande-urtext.ly @@ -106,4 +106,4 @@ allemande = \context Staff \notes< > -\version "1.0.21"; +\version "1.1.52"; diff --git a/mutopia/J.S.Bach/Solo-Cello-Suites/courante-urtext.ly b/mutopia/J.S.Bach/Solo-Cello-Suites/courante-urtext.ly index f2797a3ca2..65793d7931 100644 --- a/mutopia/J.S.Bach/Solo-Cello-Suites/courante-urtext.ly +++ b/mutopia/J.S.Bach/Solo-Cello-Suites/courante-urtext.ly @@ -91,4 +91,4 @@ courante = \context Staff \notes< \$courante_b > -\version "1.0.21"; +\version "1.1.52"; diff --git a/mutopia/J.S.Bach/Solo-Cello-Suites/gigue-urtext.ly b/mutopia/J.S.Bach/Solo-Cello-Suites/gigue-urtext.ly index fe92ef610c..2ea545bd7b 100644 --- a/mutopia/J.S.Bach/Solo-Cello-Suites/gigue-urtext.ly +++ b/mutopia/J.S.Bach/Solo-Cello-Suites/gigue-urtext.ly @@ -106,4 +106,4 @@ gigue = \notes< \$gigue_b > -\version "1.0.21"; +\version "1.1.52"; diff --git a/mutopia/J.S.Bach/Solo-Cello-Suites/menuetto-cello.ly b/mutopia/J.S.Bach/Solo-Cello-Suites/menuetto-cello.ly index 0890faa692..80dc4bb656 100644 --- a/mutopia/J.S.Bach/Solo-Cello-Suites/menuetto-cello.ly +++ b/mutopia/J.S.Bach/Solo-Cello-Suites/menuetto-cello.ly @@ -16,7 +16,7 @@ copyright = "public domain"; dotted slurs %} -\version "1.0.21"; +\version "1.1.52"; \include "menuetto-urtext.ly"; diff --git a/mutopia/J.S.Bach/Solo-Cello-Suites/menuetto-urtext.ly b/mutopia/J.S.Bach/Solo-Cello-Suites/menuetto-urtext.ly index fb729e383e..f74c407aa5 100644 --- a/mutopia/J.S.Bach/Solo-Cello-Suites/menuetto-urtext.ly +++ b/mutopia/J.S.Bach/Solo-Cello-Suites/menuetto-urtext.ly @@ -156,4 +156,4 @@ menuetto_ii = \context Staff\notes \relative c { d2. } -\version "1.0.21"; +\version "1.1.52"; diff --git a/mutopia/J.S.Bach/Solo-Cello-Suites/prelude-cello.ly b/mutopia/J.S.Bach/Solo-Cello-Suites/prelude-cello.ly index 7b56811271..158b401ac0 100644 --- a/mutopia/J.S.Bach/Solo-Cello-Suites/prelude-cello.ly +++ b/mutopia/J.S.Bach/Solo-Cello-Suites/prelude-cello.ly @@ -15,7 +15,7 @@ copyright = "public domain"; dotted slurs %} -\version "1.0.21"; +\version "1.1.52"; \include "prelude-urtext.ly"; diff --git a/mutopia/J.S.Bach/Solo-Cello-Suites/prelude-urtext.ly b/mutopia/J.S.Bach/Solo-Cello-Suites/prelude-urtext.ly index 7445345cd2..7e8847975b 100644 --- a/mutopia/J.S.Bach/Solo-Cello-Suites/prelude-urtext.ly +++ b/mutopia/J.S.Bach/Solo-Cello-Suites/prelude-urtext.ly @@ -280,4 +280,4 @@ prelude = \context Staff \notes< \$prelude_b > -\version "1.0.21"; +\version "1.1.52"; diff --git a/mutopia/J.S.Bach/Solo-Cello-Suites/prelude-viola.ly b/mutopia/J.S.Bach/Solo-Cello-Suites/prelude-viola.ly index 36defc8198..1da2d1d072 100644 --- a/mutopia/J.S.Bach/Solo-Cello-Suites/prelude-viola.ly +++ b/mutopia/J.S.Bach/Solo-Cello-Suites/prelude-viola.ly @@ -15,7 +15,7 @@ copyright = "public domain"; dotted slurs %} -\version "1.0.21"; +\version "1.1.52"; \include "prelude-urtext.ly"; diff --git a/mutopia/J.S.Bach/Solo-Cello-Suites/sarabande-urtext.ly b/mutopia/J.S.Bach/Solo-Cello-Suites/sarabande-urtext.ly index dba20e9cbc..ead13666a5 100644 --- a/mutopia/J.S.Bach/Solo-Cello-Suites/sarabande-urtext.ly +++ b/mutopia/J.S.Bach/Solo-Cello-Suites/sarabande-urtext.ly @@ -92,4 +92,4 @@ sarabande = \context Staff \notes< \$sarabande_b > -\version "1.0.21"; +\version "1.1.52"; diff --git a/mutopia/J.S.Bach/viola-i.ly b/mutopia/J.S.Bach/viola-i.ly index 61e33e7e0d..c239761d3e 100644 --- a/mutopia/J.S.Bach/viola-i.ly +++ b/mutopia/J.S.Bach/viola-i.ly @@ -16,4 +16,4 @@ $viola_i_staff = \context Staff = viola < \clef alto; \$global_i > -\version "1.0.21"; +\version "1.1.52"; diff --git a/mutopia/J.S.Bach/violino-i.ly b/mutopia/J.S.Bach/violino-i.ly index 940f740103..1c4a2d1618 100644 --- a/mutopia/J.S.Bach/violino-i.ly +++ b/mutopia/J.S.Bach/violino-i.ly @@ -37,4 +37,4 @@ $violino_i_staff = \context Staff = violino < > \$global_i > -\version "1.0.21"; +\version "1.1.52"; diff --git a/mutopia/J.S.Bach/violino-viola.ly b/mutopia/J.S.Bach/violino-viola.ly index 7295ee78d0..e79ff409c0 100644 --- a/mutopia/J.S.Bach/violino-viola.ly +++ b/mutopia/J.S.Bach/violino-viola.ly @@ -30,4 +30,4 @@ copyright = "Public Domain"; } } -\version "1.0.21"; +\version "1.1.52"; diff --git a/mutopia/J.S.Bach/violino-violoncello.ly b/mutopia/J.S.Bach/violino-violoncello.ly index 315135b5b1..d7431f1dc9 100644 --- a/mutopia/J.S.Bach/violino-violoncello.ly +++ b/mutopia/J.S.Bach/violino-violoncello.ly @@ -30,4 +30,4 @@ copyright = "Public Domain"; } } -\version "1.0.21"; +\version "1.1.52"; diff --git a/mutopia/J.S.Bach/violoncello-i.ly b/mutopia/J.S.Bach/violoncello-i.ly index 18900b1617..bae5e6dab9 100644 --- a/mutopia/J.S.Bach/violoncello-i.ly +++ b/mutopia/J.S.Bach/violoncello-i.ly @@ -28,4 +28,4 @@ $violoncello_i_staff = \context Staff = violoncello < \clef bass; \$global_i > -\version "1.0.21"; +\version "1.1.52"; diff --git a/mutopia/J.S.Bach/wtk1-fugue1.ly b/mutopia/J.S.Bach/wtk1-fugue1.ly index b00149f495..5d029b0bcb 100644 --- a/mutopia/J.S.Bach/wtk1-fugue1.ly +++ b/mutopia/J.S.Bach/wtk1-fugue1.ly @@ -11,7 +11,7 @@ copyright = "Public Domain"; %{ %} -\version "1.0.21"; +\version "1.1.52"; global = @@ -20,14 +20,13 @@ global = } -beamkludge = \property Voice. stemLeftBeamCount = "1" tenor = \notes \relative c' { \clef "violin"; \stemdown - r8 [c8 d e] [f. \beamkludge g32 f] [e8 a] | + r8 [c8 d e] [f. g32 f] [e8 a] | [d, g] ~ [g16 a g f] [e f e d] [c d c b ] | [a 8 fis'] g4 ~ [g8 fis16 e] [f8 d] | [g f! e d] c r r g' ~ | @@ -36,20 +35,20 @@ tenor = [c8 f] r16 [g f e] [f8 d] g4 ~ | g4 r4 r2 | r1 | - r8 [g8 a b] [c . \beamkludge d 32 c ] [b8 e ] + r8 [g8 a b] [c . d 32 c ] [b8 e ] %% 10 [a, d ] ~ [d 16 e d c ] b8 r8 r d, | - [e fis] [g. \beamkludge a32 g] [fis8 b e, a] ~ | + [e fis] [g. a32 g] [fis8 b e, a] ~ | [a16 b a gis] [fis8 f!] [e d] ~ [d16 e fis gis] | [a gis a b] [gis fis gis a] b8 r8 r4 | - r8 [c,8 d e] \stemup [f. \beamkludge g32 f] [e8 a] | + r8 [c,8 d e] \stemup [f. g32 f] [e8 a] | %% 15 [d, g] ~ [g16 a g f] e8 \stemdown [e fis g] ~ | [g8 fis] [gis8 a] ~ [a g! a b] | \stemboth - [c . \beamkludge d32 c ] [b8 e ] [a, d ] ~ [d 16 e d c ] | + [c . d32 c ] [b8 e ] [a, d ] ~ [d 16 e d c ] | [b8 g' cis, d ] [e cis d e ] | - \stemdown a,8 r8 r e [fis g] \stemboth [a. \beamkludge b32 a] | + \stemdown a,8 r8 r e [fis g] \stemboth [a. b32 a] | %% 20 [g8 c fis, b] ~ [b16 c b a] \stemdown [g fis e d] \stemboth | e4 \stemdown d ~ [d16 a' g f!] [e g f! a] | @@ -57,7 +56,7 @@ tenor = \stemboth g4. f8 ~ [f e] d4 | \stemdown e8 a4 g8 ~ [g8 f g a] | %% 25 - [bes8. \beamkludge c32 b] [a8 d ] [g, c ] ~ [c 16 d c bes] | + [bes8. c32 b] [a8 d ] [g, c ] ~ [c 16 d c bes] | [a bes a g] [f g f e] d4 ~ [d8. g16] | a4 r16 [f' 16 d 8] e 2 | } @@ -69,12 +68,12 @@ soprane = \stemup r1 | r2 r8 [g'8 a b] | - [c . \beamkludge d32 c ] [b8 e ] [a, d ] ~ [d 16 e d c ] | + [c . d32 c ] [b8 e ] [a, d ] ~ [d 16 e d c ] | [b g a b] [c b c d ] [e d e fis ] [g 8 b,] | %% 5 [c a] [d 16 c b a] [g8. g16] [f e f g] | [a g a b] c 2 b4 | - r8 [c8 d e] [f. \beamkludge g32 f] [e8 a] | + r8 [c8 d e] [f. g32 f] [e8 a] | [d, g] ~ [g16 a g f] [e8 a] ~ [a16 b a g] | f2 [e8. fis16] g4 ~ %% 10 @@ -85,13 +84,13 @@ soprane = a 4 r4 r2 | %% 15 r2 r8 [g 8 a b ] | - [c8. \beamkludge d32 c] [b 8 c] [d e] [f!. \beamkludge g32 f!] | + [c8. d32 c] [b 8 c] [d e] [f!. g32 f!] | [e8 a d, g] ~ [g16 a g f] [e8 a] | - [d,8 bes'] [a g16 f] [g f g e] [f g g \beamkludge f32 g] | + [d,8 bes'] [a g16 f] [g f g e] [f g g f32 g] | [a16 cis, d g] [e8. d16] d8 r8 r4 | %% 20 r2 r4 r8 g, | - [a b ] [c. \beamkludge d32 c] [b 8 e a, d] ~ | + [a b ] [c. d32 c] [b 8 e a, d] ~ | [e16 e d c] [b c d e] [f g a g] [f e d c] | b 4 [c,8 d] g c4 b 8 | c4 [b 8 bes 8] a d4 c8 | @@ -110,31 +109,31 @@ alt = r1 | r | r | - r8 [g'8 a b] [c . \beamkludge d32 c ] [b8 e ] | + r8 [g'8 a b] [c . d32 c ] [b8 e ] | %% 5 [a, d ] ~ [d 16 e d c ] [b8 c ~ c bes8] | [a d g, c ] r16 [a16 b c ] d 4 | - g,4 r8 g8 [a b] [c . \beamkludge d32 c ] | + g,4 r8 g8 [a b] [c . d32 c ] | [b8 e a, d ] ~ [d 16 e d c !] [b!8 e ] ~ | e 4 d 4 [c 16 b c a] [e' d c b] | %% 10 [c 16 a b c ] [d c b a] g4 r4 | r1 | - r8 [e8 fis gis] [a. \beamkludge b32 a] [gis8 c ] | + r8 [e8 fis gis] [a. b32 a] [gis8 c ] | [fis, b] ~ [b16 c b a] gis8 a4 gis8 | a4 r8 g8 [a b] c . [d32 c ] | %% 15 [b8 e a, d ] ~ [d' g,] d 4 | [c 8 a] e' 4 d 8 r8 r4 | - r8 [a8 b cis ] [d . \beamkludge e32 d ] [c !8 f ] | + r8 [a8 b cis ] [d . e32 d ] [c !8 f ] | [b,8 e ] ~ [e 16 f e d ] cis 8 r8 r4 | - r8 [a8 b cis ] [d . \beamkludge e32 d ] [c !8 fis ] | + r8 [a8 b cis ] [d . e32 d ] [c !8 fis ] | %% 20 [b, e ] ~ [e 16 fis e d ] c 2 ~ | [c 16 d c b] [a g a fis] [g8 b c d ] | - [e . \beamkludge f32 e ] [d 8 g ] [c, f ] ~ [f 16 g f e ] | + [e . f32 e ] [d 8 g ] [c, f ] ~ [f 16 g f e ] | d 4 [e 8 d ] ~ [d g,] g4 ~ - [g8 c, d e] [f. \beamkludge g32 f] [e8 a] | + [g8 c, d e] [f. g32 f] [e8 a] | %% 25 [d, g] ~ [g16 a g f] [e d e f] [g a bes g] | [a e f g] [a b c a] b2 | @@ -153,21 +152,21 @@ bass = r | %% 5 r2 r8 [c8 d e] | - [f. \beamkludge g32 f] [e8 a] [d, g] ~ [g16 a g f] | + [f. g32 f] [e8 a] [d, g] ~ [g16 a g f] | [e f e d] [c d c b ] [a' 8 d a fis] | [g16 a bes g] [cis,8 d] a'4 e4 | [a16 b c d ] [c b a g] c 8 r8 r4 | %% 10 r2 r8 [g, 8 a b ] | - [c. \beamkludge d32 c] [b 8 e] [a, d] ~ [d16 e d c] | + [c. d32 c] [b 8 e] [a, d] ~ [d16 e d c] | b 8 e4 d8 c f!4 e8 ~ | e d4 e8 [f! e16 d] e4 | a, 4 r4 r2 | %% 15 - r8 [g 8 a b ] [c. \beamkludge d32 c] [b 8 e] | + r8 [g 8 a b ] [c. d32 c] [b 8 e] | [a, 8 d] ~ [d16 e d c] [b 8 bes a g'' ] | [a,, 8 fis' g e] d4 [e8 f!] | - [g8. \beamkludge a32 g] [f8 bes] [e, a] ~ [a16 bes a g] | + [g8. a32 g] [f8 bes] [e, a] ~ [a16 bes a g] | [f e f d] [g8 a] d,2 ~ | %% 20 [d16 e d c] [b a g fis ] [e' 8 e fis g] ~ | diff --git a/mutopia/J.S.Bach/wtk1-fugue2.ly b/mutopia/J.S.Bach/wtk1-fugue2.ly index e8e00e53f5..8e76f0d347 100644 --- a/mutopia/J.S.Bach/wtk1-fugue2.ly +++ b/mutopia/J.S.Bach/wtk1-fugue2.ly @@ -19,7 +19,7 @@ * auto beaming %} -\version "1.0.21"; +\version "1.1.52"; \include "nederlands.ly" % for correct parsing of note names diff --git a/mutopia/J.S.Bach/wtk1-prelude1.ly b/mutopia/J.S.Bach/wtk1-prelude1.ly index e0d8f711f7..df8501f268 100644 --- a/mutopia/J.S.Bach/wtk1-prelude1.ly +++ b/mutopia/J.S.Bach/wtk1-prelude1.ly @@ -8,7 +8,7 @@ enteredby = "Shay Rojansky"; copyright = "Public Domain"; } -\version "1.0.21"; +\version "1.1.52"; global = \notes { diff --git a/mutopia/L.Mozart/sinfonia.ly b/mutopia/L.Mozart/sinfonia.ly index 7d78a101be..ac73c392b1 100644 --- a/mutopia/L.Mozart/sinfonia.ly +++ b/mutopia/L.Mozart/sinfonia.ly @@ -383,4 +383,4 @@ bassocontinuo = \notes \relative c'{ \midi{ \tempo 4 = 100; } } -\version "1.0.21"; +\version "1.1.52"; diff --git a/mutopia/N.W.Gade/brass.ly b/mutopia/N.W.Gade/brass.ly index f29cfb8334..7a9930b7cc 100644 --- a/mutopia/N.W.Gade/brass.ly +++ b/mutopia/N.W.Gade/brass.ly @@ -1,4 +1,4 @@ -\version "1.0.21"; +\version "1.1.52"; corI=\notes\relative c'' { \key c; diff --git a/mutopia/N.W.Gade/parts.ly b/mutopia/N.W.Gade/parts.ly index beb95deccd..4a4ecd6446 100644 --- a/mutopia/N.W.Gade/parts.ly +++ b/mutopia/N.W.Gade/parts.ly @@ -11,7 +11,7 @@ copyright = "Mats Bengtsson, 1999. Free circulation permitted and " + % Process with 'ly2dvi -s parts.ly' to get the separate parts. -\version "1.0.21"; +\version "1.1.52"; \include "global.ly" \include "wood.ly" diff --git a/mutopia/N.W.Gade/score.ly b/mutopia/N.W.Gade/score.ly index 878267faea..181725d825 100644 --- a/mutopia/N.W.Gade/score.ly +++ b/mutopia/N.W.Gade/score.ly @@ -8,7 +8,7 @@ copyright = "Mats Bengtsson, 1999. Free circulation permitted and " + "Statens Musikbibliotek, Stockholm, Sweden"; } -\version "1.0.21"; +\version "1.1.52"; \include "global.ly" \include "wood.ly" diff --git a/mutopia/N.W.Gade/strings.ly b/mutopia/N.W.Gade/strings.ly index 0944ec0802..e19eb2518c 100644 --- a/mutopia/N.W.Gade/strings.ly +++ b/mutopia/N.W.Gade/strings.ly @@ -1,4 +1,4 @@ -\version "1.0.21"; +\version "1.1.52"; viI=\notes\relative c'' { diff --git a/mutopia/N.W.Gade/wood.ly b/mutopia/N.W.Gade/wood.ly index b3001a9a34..99230fd85b 100644 --- a/mutopia/N.W.Gade/wood.ly +++ b/mutopia/N.W.Gade/wood.ly @@ -1,4 +1,4 @@ -\version "1.0.21"; +\version "1.1.52"; oboe=\notes\relative c'' { \clef "treble"; diff --git a/mutopia/W.A.Mozart/cadenza.ly b/mutopia/W.A.Mozart/cadenza.ly index 6b4c9079e6..4187780dc0 100644 --- a/mutopia/W.A.Mozart/cadenza.ly +++ b/mutopia/W.A.Mozart/cadenza.ly @@ -11,14 +11,14 @@ copyright = "public domain"; Tested Features: cadenza mode %} -\version "1.0.21"; +\version "1.1.52"; cad = \notes \relative c' { \property Score.instrument = "french horn" \context Staff { \cadenza 1; - \grouping 1*4; + \clef "violin"; c'4.\mf g8 diff --git a/mutopia/W.A.Mozart/horn-concerto-3.ly b/mutopia/W.A.Mozart/horn-concerto-3.ly index dda8a525ee..a11757c35e 100644 --- a/mutopia/W.A.Mozart/horn-concerto-3.ly +++ b/mutopia/W.A.Mozart/horn-concerto-3.ly @@ -9,7 +9,7 @@ copyright = "public domain"; } -\version "1.0.21"; +\version "1.1.52"; allegro = \notes @@ -237,7 +237,7 @@ rondo = \notes \relative c' \partial 8; g'8 | \time 6/8; - \grouping 8*3 8*3; + \rondotheme R2.*13 | diff --git a/mutopia/gallina.ly b/mutopia/gallina.ly index e8b434fe69..047efd54f0 100644 --- a/mutopia/gallina.ly +++ b/mutopia/gallina.ly @@ -45,7 +45,7 @@ Voice engraver by uncommenting the lines in the paper definition below. --MB %} -\version "1.0.21"; +\version "1.1.52"; global = \notes { \property StaffGroup.timeSignatureStyle = "old" diff --git a/mutopia/los-toros-oboe.ly b/mutopia/los-toros-oboe.ly index 0c89debf8b..6152042ead 100644 --- a/mutopia/los-toros-oboe.ly +++ b/mutopia/los-toros-oboe.ly @@ -8,7 +8,7 @@ enteredby = "jcn"; copyright = "public domain"; latexheaders= "headers"; } -\version "1.0.21"; +\version "1.1.52"; diff --git a/scm/lily.scm b/scm/lily.scm index 660166e878..268a383d62 100644 --- a/scm/lily.scm +++ b/scm/lily.scm @@ -270,6 +270,8 @@ "\\placebox{" (number->dim y) "}{" (number->dim x) "}{" s "}")) + + ;;;; UGH! Junk \\bracefont ! (define (pianobrace y) (define step 1.0) (define minht (* 2 mudelapaperstaffheight)) diff --git a/scripts/convert-mudela.py b/scripts/convert-mudela.py index 4909d29dc7..f7a68585e1 100644 --- a/scripts/convert-mudela.py +++ b/scripts/convert-mudela.py @@ -350,6 +350,18 @@ if 1: 'hshift -> horizontalNoteShift') +if 1: + def conv(lines): + newlines =[] + for x in lines: + x = re.sub ('\\\\grouping[^;]*;','', x) + newlines.append (x) + return newlines + + conversions.append ((1,1,52), conv, + 'deprecate \\grouping') + + ############################ diff --git a/tex/lilyponddefs.tex b/tex/lilyponddefs.tex index 794397fcf4..5dc69f9e60 100644 --- a/tex/lilyponddefs.tex +++ b/tex/lilyponddefs.tex @@ -60,13 +60,15 @@ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % set fonts and primary dimensions -% ugh +% +% TODO JUNK THIS +% +% ugh \def\cmrtwenty{ \font\smalltextfont=cmr8 \font\textmusic=cmmi12 } - \def\cmrsixteen{ \font\smalltextfont=cmr6 \font\textmusic=cmmi10 @@ -79,7 +81,6 @@ \font\smalltextfont=cmr5 \font\textmusic=cmmi8 } - %%%%%%% % \def\musixtwentydefs{ @@ -114,16 +115,12 @@ \def\textflat{\raise.2ex\hbox{\textmusic\char"5B}} + %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % do derivative calcs % this has to be synced with the font definition \def\musixcalc{ - \staffheight=\mudelapaperbarsize pt - - % ugh. Can extract ex dim from TFM - \interlinedist=\staffheight - \divide\interlinedist by 4 \notewidth=\mudelapapernotewidth pt \smallspace=.3\interlinedist