From dbed556ca13bc2371e83774890eaa06bc8b04def Mon Sep 17 00:00:00 2001 From: Han-Wen Nienhuys Date: Thu, 20 Mar 1997 02:23:14 +0100 Subject: [PATCH] release: 0.0.43 --- .dstreamrc | 8 +- .version | 4 +- Documentation/language.pod | 89 ++++++++ Documentation/lilyinput.pod | 214 ++++++++++---------- Documentation/lilypond.pod | 4 +- NEWS | 28 ++- TODO | 51 +++-- configure | 202 ++++++++++++++---- configure.in | 1 - flower/Makefile | 2 +- init/table_sixteen.ini | 4 +- input/Makefile | 4 +- input/cadenza.ly | 14 +- input/coriolan-alto.ly | 4 +- input/error.ly | 2 +- input/fugue1.midi.ly | 146 ++++++------- input/kortjakje.ly | 2 +- input/maartje.ly | 41 ++-- input/mlvio1.ly | 2 +- input/new-twinkle.ly | 109 ---------- input/plet.ly | 2 +- input/pre1.midi.ly | 186 ++++++++--------- input/rhythm.ly | 25 ++- input/scales.ly | 13 +- input/scsii-menuetto.ly | 125 +++++------- input/standchen.ly | 120 ++++++----- input/twinkle.ly | 8 +- lib/duration.cc | 5 - lib/include/duration.hh | 7 +- lily/.version | 4 +- lily/Makefile | 2 +- lily/command-request.cc | 10 + lily/identifier.cc | 17 +- lily/include/command-request.hh | 2 +- lily/include/identifier.hh | 7 +- lily/include/input-music.hh | 5 +- lily/include/musical-request.hh | 6 +- lily/include/{lexer.hh => my-lily-lexer.hh} | 27 ++- lily/include/request.hh | 1 + lily/include/voice-element.hh | 2 +- lily/include/voice.hh | 2 +- lily/input-music.cc | 12 ++ lily/input-staff.cc | 2 +- lily/keyword.cc | 2 +- lily/lexer.l | 144 +++++++------ lily/lexerinit.cc | 4 +- lily/musical-request.cc | 16 ++ lily/{mylexer.cc => my-lily-lexer.cc} | 48 +++-- lily/note.cc | 2 +- lily/parser.y | 102 ++++++---- lily/voice-elt.cc | 10 +- lily/voice.cc | 7 + lily/warn.cc | 2 +- make/Variables.make | 3 + 54 files changed, 1056 insertions(+), 805 deletions(-) delete mode 100644 input/new-twinkle.ly rename lily/include/{lexer.hh => my-lily-lexer.hh} (79%) rename lily/{mylexer.cc => my-lily-lexer.cc} (78%) diff --git a/.dstreamrc b/.dstreamrc index 4448ee7d89..dd50d37872 100644 --- a/.dstreamrc +++ b/.dstreamrc @@ -1,7 +1,7 @@ # class name silence? Dstream 1 -My_flex_lexer 0 +My_lily_lexer 0 PCol 1 Score_column 1 Ineq_constrained_qp 1 @@ -15,7 +15,7 @@ Idealspacing 1 InitParser 1 Parser 0 InitDeclarations 1 - +Declarations 0 # FlexLexer debug InitLexer 1 Lexer 1 @@ -46,9 +46,9 @@ Group_change_req 1 Script_req 1 Colinfo 1 Word_wrap 1 -Text_req 1 +Text_req 0 Script_def 1 -Text_def 1 +Text_def 0 Paperdef 1 Symtable 1 Symtables 1 diff --git a/.version b/.version index e268239e5d..f3fe58849a 100644 --- a/.version +++ b/.version @@ -1,8 +1,8 @@ TOPLEVEL_MAJOR_VERSION = 0 TOPLEVEL_MINOR_VERSION = 0 -TOPLEVEL_PATCH_LEVEL = 42 +TOPLEVEL_PATCH_LEVEL = 43 # use to send patches, always empty for released version: # include separator: ".postfix", "-pl" makes rpm barf -TOPLEVEL_MY_PATCH_LEVEL =.3 +TOPLEVEL_MY_PATCH_LEVEL = # diff --git a/Documentation/language.pod b/Documentation/language.pod index 4b74742642..181c4dea1f 100644 --- a/Documentation/language.pod +++ b/Documentation/language.pod @@ -133,6 +133,95 @@ it will make things easier. =head1 CONCRETE PROPOSALS +=head1 Decisions (Sat 1997-3-15, dommelpijpje no21) + +=over 4 + +=item * + +\keyword, bo difference notes vs. notenames, + +=item * + +{} hierachical, nest., + +=item * + +<> chords, + +=item * + +drop staff (NOT)?, + +=item * + +melody = \melodic{ } vs. \melodic melody = { } + +=item * + +lexer mode switch by types: \lyric{ }, \melodic{ }, etc., + +=item * + +octaves: low 'C C c c' c'' high; 'c' == c === "c-klein", comment: a ' +' a . Which ' for which a? Now using a!'`. + +=over 4 + +=item * + +\meter{ 2/4 }, + +=item * + +\grouping{ 2*8 3*8 }, + +=item * + +\skip{ 2: 2*8 3*32 }, + +=item * + +abbrev: [c2 c2]\noplet{1/2} (wat bout [c2 c2]1/2\noplet?), + +=item * + +abbrev: c4=16 (heu, =?), + +=item * + +plet === midi-note: c4*2/3; c4*385/384, + +=back + +=item * + +drop \music, + +=item * + +\meter compulsory in Simple mudela, + +=item * + +++ concat + +=item * + +C<+> is merge + +=item * + + \transpose{ \from c \to g \melodic{ c d e } } + \transpose{ \from c \to g melody } %!? + +=item * + + \extract{ \from 2:3*4 \to 5 oboe } + +=back + + =head1 THOUGHTS diff --git a/Documentation/lilyinput.pod b/Documentation/lilyinput.pod index b7fe60ff83..6fdedd2148 100644 --- a/Documentation/lilyinput.pod +++ b/Documentation/lilyinput.pod @@ -42,7 +42,7 @@ Other considerations were (and will be): =item * be able to edit the layout -without danger of changing the original music (Urtekst), +without danger of changing the original music (Urtext), =item * @@ -105,21 +105,41 @@ has a logical structure, making use of typing and naming (using identifiers), that allows for flexible input, and definition reuse. +The below included for explanatory +purposes only (i.e., for a complete and up-to-date definition, see +F and F): + +=head2 Files + +The de-facto extension of Mudela is F<.ly>. Files may be included by +entering C at the start of a line: + + include "a_file.ly" + =head2 Comments Line comments are introduced by a C<%> -=head2 Keywords +=head2 Words -Keywords are preceded by a backslash "\". +Keywords are preceded by a backslash "\". They contain alphabetic +characters only. -The actual musical part of Mudela that defines a melody, is known as -I. +Identifiers in their normal form consist start with a alpha character, +followed by alpha-numerics. Identifiers can contain any characters +(except whitespace, C<$> and C<%>), if you use this construct: + + $Id_with###@weird92chars = + +=head2 Nesting characters Mudela uses the brace (C<{> and C<}>) for hierarchical structures. To -aid the eye in reading, for chords we have used the C<<> and the C<>> -as nesting braces. +aid the eye in reading, for chords the C<<> and the C<>> are used as +nesting braces. +=head2 Identifiers + +=head2 Hierarchical structures The general structure consists of declarations: @@ -141,36 +161,84 @@ Most instantiations that use an IDENTIFIER are specified as follows: Some exceptions on this rule have been made to prevent inputting Mudela becoming tedious -=head1 Music =head2 Simple mudela +The actual musical part of Mudela that defines a melody, is known as +I. + Simple mudela is the most common type of music. It consists of a list -of notes, chords, and commands. The below included for explanatory -purposes only (i.e., for a complete and up-to-date definition, see -F and F): +of notes or lyrics, chords, and commands. + +=head2 Modes: + +To simplify different aspects of music definition (entering the notes +and manipulating them) Mudela has a number of different input "modes": + +=over 4 + +=item Normal mode + +At the start of parsing, Mudela assumes normal mode. +In Normal mode, a word is looked up in the following order: + + word identifier, string + \word keyword, string + +In normalmode, a word is assumed to start with an alphabetic +character, followed by alpha-numeric characters. + +=item Note mode + +Note mode (and thus Simple mudela) is introduced by the keyword C<\music>. +In Note mode, a word is looked up in the following order: + + word identifier, string + \word keyword, string + +In Note mode a word is considered to have alphabetic characters only. + +=item Lyric mode + +Lyrics mode (and thus Simple mudela) is introduced by the keyword C<\lyrics>. + +In Lyrics mode, a word is looked up in the following order: + + word string + \word keyword, string + +In Lyric mode every sequence of non-digit and non-white characters +starting with an alphabetic character is considered a word. + +=back + +These modes are of a lexical nature. Normal and Note mode largely +resemble each other, save the possibility of entering Reals, and +meaning of C<_> + +=head2 Notes Simple mudela basically is a sequence of the notes you want to enter. a'4 % dutch names -is a A-1 pitched quaver. The ' signifies an octave change. +is a A-1 pitched quaver. The ' as well as the ` signify an octave change. A-1 is 440 Hz concert-pitch. C is also known as the central c. More examples: - a` % 110 + `a % 110 a % 220 a' % 440 a'' % 880 another example: - as`4.*2/3 + `as4.*2/3 This is an A flat, (just below 110 Hz concert-pitch). The C<*2/3> signifies that this note is part of a triplet (3 in stead of 2). The -duration is one and a half quaver times 2/3. +duration is one and a half quaver (C<4.>) times 2/3. The default language for notenames is defined to be dutch, @@ -192,6 +260,11 @@ down: A % 110 'A % 55 A' % 220 + Cisis + +The rest is named + + r These notenames along with duration is enough material to construct simple melodies: @@ -212,7 +285,7 @@ example: [c8 () d8 () e8 ] -Please note that these two parentheses do I necesarrily nest, eg: +Please note that these two characters do I necessarrily nest, eg: [c8 e8(] [)g8 c'8] @@ -239,15 +312,21 @@ The general form of a note is: Notenames are just identifiers, and can be declared for any language appropriate (see F). - =head2 Lyrics -Lyrics in Mudela resemble Simple mudela a lot, -with notes substituted by text. -All syllables are entered separately, separated by whitespace -("Twin-4 kle4 twin-4 kle4 ... "). -Two syllables or words that compose a single duration entry -are bound together using an underscore ("He_could4 not4"). +Lyrics in Mudela resemble Simple mudela a lot, with notes substituted +by text. + +All syllables are entered separately, separated by whitespace + + Twin-4 kle4 twin-4 kle4 ... + +Two syllables or words that compose a single +duration entry are bound together using an underscore + + He_could4 not4 + + =head2 Rhythms @@ -281,92 +360,3 @@ maintenance no long examples are included in this document. LilyPond first reads F, which contains declarations crucial to proper operation of LilyPond (symbol tables, note names). - -=head1 Decisions (Sat 1997-3-15, dommelpijpje no21) - -=over 4 - -=item * - -\keyword, bo difference notes vs. notenames, - -=item * - -{} hierachical, nest., - -=item * - -<> chords, - -=item * - -drop staff (NOT)?, - -=item * - -melody = \melodic{ } vs. \melodic melody = { } - -=item * - -lexer mode switch by types: \lyric{ }, \melodic{ }, etc., - -=item * - -octaves: low 'C C c c' c'' high; 'c' == c === "c-klein", comment: a ' -' a . Which ' for which a? Now using a!'`. - -=over 4 - -=item * - -\meter{ 2/4 }, - -=item * - -\grouping{ 2*8 3*8 }, - -=item * - -\skip{ 2: 2*8 3*32 }, - -=item * - -abbrev: [c2 c2]\noplet{1/2} (wat bout [c2 c2]1/2\noplet?), - -=item * - -abbrev: c4=16 (heu, =?), - -=item * - -plet === midi-note: c4*2/3; c4*385/384, - -=back - -=item * - -drop \music, - -=item * - -\meter compulsory in Simple mudela, - -=item * - -++ concat - -=item * - -C<+> is merge - -=item * - - \transpose{ \from c \to g \melodic{ c d e } } - \transpose{ \from c \to g melody } %!? - -=item * - - \extract{ \from 2:3*4 \to 5 oboe } - -=back - diff --git a/Documentation/lilypond.pod b/Documentation/lilypond.pod index 067c596d74..bc02a12617 100644 --- a/Documentation/lilypond.pod +++ b/Documentation/lilypond.pod @@ -88,8 +88,8 @@ multiple stafftypes (melodic, rhythmic) [broken from pl28 on] =item * -beams, slurs, chords, super/subscripts (accents and text), -triplets, general n-plet (triplet, quadruplets, etc.), lyrics +beams, slurs, chords, super/subscripts (accents and text), triplets, +general n-plet (triplet, quadruplets, etc.), lyrics, transposition =item * diff --git a/NEWS b/NEWS index 0ed6c6a5d5..cb41bce2b2 100644 --- a/NEWS +++ b/NEWS @@ -1,7 +1,33 @@ -pl 42.3 +****** +pl 43 + - transposition. + - $variable&@name + - warnings if incorrect mode + - missing scsii measure + - declaration used check. + - + +pl 42.hwn3 - const naming change (T const <-> const T) - Mudela 0.1 +pl 42.3 + - moving towards Mudela 0.1: + * (almost) all keywords must be preceded by backslash '\' + * explicit lexer switches '$' and '@' dropped + * keyword "music" dropped for horizontal music + * keywords "\lyric" "\melodic" "\rhythmic" introduced, e.g.: + melody = \melodic { c c | g g } + * staff initialisable with music identifier: + \staff{ melody } + * chords: < c e > + * octavate ''c`` + * \meter{ 2/4 } + * \octave{ ''`` } + - configure sets CXX (to c++, commonly) +Internal + - renamed lexer.hh, mylexer.cc My_flex_lexer to my.lily.lexer.* + pl 42.2 - new lilyinput (Mudela 0.1) doc. Examples diff --git a/TODO b/TODO index 6a36fe3b9d..e074ce5aa6 100644 --- a/TODO +++ b/TODO @@ -1,5 +1,4 @@ before 0.1 - * fix Lyric mode * remove spurious/outdated comments in .ly, debug .ly @@ -7,17 +6,20 @@ before 0.1 * basic dynamics - * basic syntax & parser/lexer cleanup. - * decent TeX page layout - - * avoid unnecessary confusing constructs from .ly + + * remove unnecessary or confusing constructs from .ly This is an assorted collection of stuff that will be done, might be done, or is an idea that I want to think about +PARSER + * Duration + MAKE-STUFF + * flower config: separate optiflags. + * sort out headers, see m2m * do platform stuff: configure, header(s), targets, build (out?) @@ -32,7 +34,7 @@ BUGS * [c8. c32 c32] - * $cis ( | ) cis$ + * cis ( | ) cis * Group_feature at start of music. @@ -54,7 +56,11 @@ FURTHER FOR ORCHESTRAL SCORE: INPUTLANGUAGE - * read ENV for include path + * read ENV for include /init path + + * configure pitch_byte + + * special key. * figured bass? @@ -62,8 +68,15 @@ INPUTLANGUAGE * rest name configurable + * uniformate: \clef\violin, \clef"violin", \geometric 1.4, + \meter{ 2/4 }, etc. + SMALLISH PROJECTS + * key transposition + + * key { C } + * use dstream feature in mi2mu * qtor, btor, mtor-> tor( QUIET_ver ), tor( DEBUG_ver ), etc. @@ -76,13 +89,11 @@ SMALLISH PROJECTS * parshape - * a pure parser. - - * bar numbers/repetition marks + * a pure parser? * read from mmap directly: study yy_scan_buffer - * binsearch/hash for notenames, id. for identifiers + * binsearch/hash for identifiers * stafftypes: voice names/ instrument names. @@ -101,8 +112,6 @@ SMALLISH PROJECTS * Brackets - * space rest. - * caching of Register_group_register hierarchies. @@ -113,9 +122,11 @@ SMALLISH PROJECTS * collision Request_register. - * make install (gnu dir names) + * add (good guess of) width to lyric items - * LilyPond .rpm and .deb + * midi output: eat-up dynamic, key/meter/tempo changes, and write them neatly + + * LilyPond .deb DOC @@ -129,7 +140,7 @@ DOC FUTURE - * Register_container baseclass + * mixed fontsizes * put scripts on bars @@ -137,7 +148,7 @@ FUTURE * guitar chord - * better beamslope calculation + * better beamslope calculation: QLP for beams? * implement better breaking algorithm @@ -147,8 +158,6 @@ FUTURE * merge key{item} & localkey{item}? - * QLP for beams? - * revise calcideal * eentje/tweetje @@ -159,7 +168,7 @@ IDEAS * integrate Register/Midi stuff - * create libmudela, or liblily_frontend + * create libmudela, or liblily_frontend * Horizontal_align_item, Vertical_align_item. @@ -167,8 +176,6 @@ IDEAS * fold indentifiers and notenames? - * enter Requests directly - * itemcolumns: Use dummy items. * use an embedded language: scheme, lisp, S-lang, Perl, GUILE, ? diff --git a/configure b/configure index c79b71d92c..3c13edc01f 100755 --- a/configure +++ b/configure @@ -1,7 +1,7 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated automatically using autoconf version 2.10 +# Generated automatically using autoconf version 2.12 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc. # # This configure script is free software; the Free Software Foundation @@ -61,6 +61,8 @@ mandir='${prefix}/man' # Initialize some other variables. subdirs= MFLAGS= MAKEFLAGS= +# Maximum number of lines to put in a shell here document. +ac_max_here_lines=12 ac_prev= for ac_option @@ -342,7 +344,7 @@ EOF verbose=yes ;; -version | --version | --versio | --versi | --vers) - echo "configure generated by autoconf version 2.10" + echo "configure generated by autoconf version 2.12" exit 0 ;; -with-* | --with-*) @@ -444,11 +446,14 @@ do done # NLS nuisances. -# Only set LANG and LC_ALL to C if already set. -# These must not be set unconditionally because not all systems understand -# e.g. LANG=C (notably SCO). -if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi +# Only set these to C if already set. These must not be set unconditionally +# because not all systems understand e.g. LANG=C (notably SCO). +# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'! +# Non-C LC_CTYPE values break the ctype check. if test "${LANG+set}" = set; then LANG=C; export LANG; fi +if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi +if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi +if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi # confdefs.h avoids OS command line length limits that DEFS can exceed. rm -rf conftest* confdefs.h @@ -510,6 +515,7 @@ ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' +cross_compiling=$ac_cv_prog_cc_cross if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu. @@ -531,6 +537,7 @@ ac_ext=C ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' ac_link='${CXX-g++} -o conftest $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' +cross_compiling=$ac_cv_prog_cxx_cross # Check whether --enable-printing or --disable-printing was given. @@ -578,11 +585,12 @@ fi AUTOHEADER="This file was automatically generated by configure" CXXFLAGS=${CXXFLAGS:-""} # we don't want -g -O junk -for ac_prog in $CCC c++ g++ gcc CC cxx +for ac_prog in $CCC c++ g++ gcc CC cxx cc++ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:594: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -612,7 +620,47 @@ done test -n "$CXX" || CXX="gcc" +echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works""... $ac_c" 1>&6 +echo "configure:625: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5 + +ac_ext=C +# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' +ac_link='${CXX-g++} -o conftest $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' +cross_compiling=$ac_cv_prog_cxx_cross + +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then + ac_cv_prog_cxx_works=yes + # If we can't run a trivial program, we are probably using a cross compiler. + if (./conftest; exit) 2>/dev/null; then + ac_cv_prog_cxx_cross=no + else + ac_cv_prog_cxx_cross=yes + fi +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + ac_cv_prog_cxx_works=no +fi +rm -fr conftest* + +echo "$ac_t""$ac_cv_prog_cxx_works" 1>&6 +if test $ac_cv_prog_cxx_works = no; then + { echo "configure: error: installation or configuration problem: C++ compiler cannot create executables." 1>&2; exit 1; } +fi +echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 +echo "configure:659: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "$ac_t""$ac_cv_prog_cxx_cross" 1>&6 +cross_compiling=$ac_cv_prog_cxx_cross + echo $ac_n "checking whether we are using GNU C++""... $ac_c" 1>&6 +echo "configure:664: checking whether we are using GNU C++" >&5 if eval "test \"`echo '$''{'ac_cv_prog_gxx'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -621,7 +669,7 @@ else yes; #endif EOF -if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:625: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then +if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:673: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then ac_cv_prog_gxx=yes else ac_cv_prog_gxx=no @@ -629,29 +677,34 @@ fi fi echo "$ac_t""$ac_cv_prog_gxx" 1>&6 + if test $ac_cv_prog_gxx = yes; then GXX=yes - if test "${CXXFLAGS+set}" != set; then - echo $ac_n "checking whether ${CXX-g++} accepts -g""... $ac_c" 1>&6 -if eval "test \"`echo '$''{'ac_cv_prog_gxx_g'+set}'`\" = set"; then + ac_test_CXXFLAGS="${CXXFLAGS+set}" + ac_save_CXXFLAGS="$CXXFLAGS" + CXXFLAGS= + echo $ac_n "checking whether ${CXX-g++} accepts -g""... $ac_c" 1>&6 +echo "configure:688: checking whether ${CXX-g++} accepts -g" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_cxx_g'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else echo 'void f(){}' > conftest.cc if test -z "`${CXX-g++} -g -c conftest.cc 2>&1`"; then - ac_cv_prog_gxx_g=yes + ac_cv_prog_cxx_g=yes else - ac_cv_prog_gxx_g=no + ac_cv_prog_cxx_g=no fi rm -f conftest* fi -echo "$ac_t""$ac_cv_prog_gxx_g" 1>&6 - if test $ac_cv_prog_gxx_g = yes; then - CXXFLAGS="-g -O" - else - CXXFLAGS="-O" - fi +echo "$ac_t""$ac_cv_prog_cxx_g" 1>&6 + if test "$ac_test_CXXFLAGS" = set; then + CXXFLAGS="$ac_save_CXXFLAGS" + elif test $ac_cv_prog_cxx_g = yes; then + CXXFLAGS="-g -O2" + else + CXXFLAGS="-O2" fi else GXX= @@ -661,6 +714,7 @@ fi # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:718: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -716,11 +770,12 @@ ac_configure=$ac_aux_dir/configure # This should be Cygnus configure. # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # ./install, which can be erroneously created by make from ./install.sh. echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 +echo "configure:774: checking for a BSD compatible install" >&5 if test -z "$INSTALL"; then if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" + IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="${IFS}:" for ac_dir in $PATH; do # Account for people who put trailing slashes in PATH elements. case "$ac_dir/" in @@ -743,7 +798,7 @@ else ;; esac done - IFS="$ac_save_ifs" + IFS="$ac_save_IFS" fi if test "${ac_cv_path_install+set}" = set; then @@ -769,6 +824,7 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:828: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_FIND'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -810,12 +866,12 @@ else - for ac_prog in bison do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:875: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_BISON'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -849,6 +905,7 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:909: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_FLEX'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -882,6 +939,7 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:943: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_MAKE'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -915,6 +973,7 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:977: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_PODMAN'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -950,6 +1009,7 @@ if test $TEXPREFIX = auto ; then # do something sensible if root hasn't specced dir yet attempts install echo $ac_n "checking TeX installation directory""... $ac_c" 1>&6 +echo "configure:1013: checking TeX installation directory" >&5 ac_tmp_prefix=$prefix test "x$ac_tmp_prefix" = xNONE && ac_tmp_prefix=$ac_default_prefix @@ -1012,6 +1072,7 @@ else fi echo $ac_n "checking how to run the C++ preprocessor""... $ac_c" 1>&6 +echo "configure:1076: checking how to run the C++ preprocessor" >&5 if test -z "$CXXCPP"; then if eval "test \"`echo '$''{'ac_cv_prog_CXXCPP'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1021,19 +1082,22 @@ else ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' ac_link='${CXX-g++} -o conftest $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' +cross_compiling=$ac_cv_prog_cxx_cross CXXCPP="${CXX-g++} -E" cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1032: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1094: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then : else echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 rm -rf conftest* CXXCPP=/lib/cpp fi @@ -1044,24 +1108,27 @@ fi CXXCPP="$ac_cv_prog_CXXCPP" echo "$ac_t""$CXXCPP" 1>&6 -ac_safe=`echo "FlexLexer.h" | tr './\055' '___'` +ac_safe=`echo "FlexLexer.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for FlexLexer.h""... $ac_c" 1>&6 +echo "configure:1114: checking for FlexLexer.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1059: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1124: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* eval "ac_cv_header_$ac_safe=yes" else echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_header_$ac_safe=no" fi @@ -1094,11 +1161,25 @@ cat > confcache <<\EOF # --recheck option to rerun configure. # EOF +# The following way of writing the cache mishandles newlines in values, +# but we know of no workaround that is simple, portable, and efficient. +# So, don't put newlines in cache variables' values. # Ultrix sh set writes to stderr and can't be redirected directly, # and sets the high bit in the cache file unless we assign to the vars. (set) 2>&1 | - sed -n "s/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=\${\1='\2'}/p" \ - >> confcache + case `(ac_space=' '; set) 2>&1` in + *ac_space=\ *) + # `set' does not quote correctly, so add quotes (double-quote substitution + # turns \\\\ into \\, and sed turns \\ into \). + sed -n \ + -e "s/'/'\\\\''/g" \ + -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p" + ;; + *) + # `set' quotes correctly as required by POSIX, so do not add quotes. + sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p' + ;; + esac >> confcache if cmp -s $cache_file confcache; then : else @@ -1165,7 +1246,7 @@ do echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion" exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;; -version | --version | --versio | --versi | --vers | --ver | --ve | --v) - echo "$CONFIG_STATUS generated by autoconf version 2.10" + echo "$CONFIG_STATUS generated by autoconf version 2.12" exit 0 ;; -help | --help | --hel | --he | --h) echo "\$ac_cs_usage"; exit 0 ;; @@ -1224,20 +1305,56 @@ s%@subdirs@%$subdirs%g CEOF EOF + +cat >> $CONFIG_STATUS <<\EOF + +# Split the substitutions into bite-sized pieces for seds with +# small command number limits, like on Digital OSF/1 and HP-UX. +ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script. +ac_file=1 # Number of current file. +ac_beg=1 # First line for current file. +ac_end=$ac_max_sed_cmds # Line after last line for current file. +ac_more_lines=: +ac_sed_cmds="" +while $ac_more_lines; do + if test $ac_beg -gt 1; then + sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file + else + sed "${ac_end}q" conftest.subs > conftest.s$ac_file + fi + if test ! -s conftest.s$ac_file; then + ac_more_lines=false + rm -f conftest.s$ac_file + else + if test -z "$ac_sed_cmds"; then + ac_sed_cmds="sed -f conftest.s$ac_file" + else + ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file" + fi + ac_file=`expr $ac_file + 1` + ac_beg=$ac_end + ac_end=`expr $ac_end + $ac_max_sed_cmds` + fi +done +if test -z "$ac_sed_cmds"; then + ac_sed_cmds=cat +fi +EOF + cat >> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then - # Support "outfile[:infile]", defaulting infile="outfile.in". + # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". case "$ac_file" in - *:*) ac_file_in=`echo "$ac_file"|sed 's%.*:%%'` + *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; *) ac_file_in="${ac_file}.in" ;; esac - # Adjust relative srcdir, etc. for subdirectories. + # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories. # Remove last slash and all that follows it. Not all systems have dirname. ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` @@ -1265,6 +1382,7 @@ for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then [/$]*) INSTALL="$ac_given_INSTALL" ;; *) INSTALL="$ac_dots$ac_given_INSTALL" ;; esac + echo creating "$ac_file" rm -f "$ac_file" configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure." @@ -1273,16 +1391,22 @@ for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then # $configure_input" ;; *) ac_comsub= ;; esac + + ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` sed -e "$ac_comsub s%@configure_input@%$configure_input%g s%@srcdir@%$srcdir%g s%@top_srcdir@%$top_srcdir%g s%@INSTALL@%$INSTALL%g -" -f conftest.subs $ac_given_srcdir/$ac_file_in > $ac_file +" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file fi; done -rm -f conftest.subs +rm -f conftest.s* +EOF +cat >> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF exit 0 EOF @@ -1338,13 +1462,16 @@ if test "$no_recursion" != yes; then ac_popdir=`pwd` cd $ac_config_dir + # A "../" for each directory in /$ac_config_dir. + ac_dots=`echo $ac_config_dir|sed -e 's%^\./%%' -e 's%[^/]$%&/%' -e 's%[^/]*/%../%g'` + case "$srcdir" in .) # No --srcdir option. We are building in place. ac_sub_srcdir=$srcdir ;; /*) # Absolute path. ac_sub_srcdir=$srcdir/$ac_config_dir ;; *) # Relative path. - ac_sub_srcdir=../$srcdir/$ac_config_dir ;; + ac_sub_srcdir=$ac_dots$srcdir/$ac_config_dir ;; esac # Check for guested configure; otherwise get Cygnus style configure. @@ -1361,8 +1488,6 @@ if test "$no_recursion" != yes; then if test -n "$ac_sub_configure"; then # Make the cache file name correct relative to the subdirectory. - # A "../" for each directory in /$ac_config_dir. - ac_dots=`echo $ac_config_dir|sed -e 's%^\./%%' -e 's%[^/]$%&/%' -e 's%[^/]*/%../%g'` case "$cache_file" in /*) ac_sub_cache_file=$cache_file ;; *) # Relative path. @@ -1392,6 +1517,7 @@ fi eval "DIR_DATADIR=$datadir" DIR_DATADIR="$DIR_DATADIR/lilypond" echo $ac_n "checking ""... $ac_c" 1>&6 +echo "configure:1521: checking " >&5 cat << EOF > lib/out/config.hh diff --git a/configure.in b/configure.in index cbb4430499..309488cae9 100644 --- a/configure.in +++ b/configure.in @@ -75,7 +75,6 @@ if test FIND = error; then AC_MSG_WARN(Couldn't find \`find'. Please use --enable-texprefix) else - AC_SUBST(DEFINES) AC_SUBST(COMPILEINFO) AC_SUBST(AUTOHEADER) diff --git a/flower/Makefile b/flower/Makefile index 6a71998fde..f24e0f3d24 100644 --- a/flower/Makefile +++ b/flower/Makefile @@ -31,7 +31,7 @@ include ./$(depth)/make/Files.make CXXFLAGS+=-O2 # descent order into subdirectories: # -SUBDIRS = test include +SUBDIRS = include test # # list of distribution files: diff --git a/init/table_sixteen.ini b/init/table_sixteen.ini index dfd036f741..5d9e6842ad 100644 --- a/init/table_sixteen.ini +++ b/init/table_sixteen.ini @@ -3,7 +3,7 @@ % It has a lot of hard-wired stringconstants % -tablesixteen= +table_sixteen= \symboltables { \texid "\musixsixteendefs" @@ -139,4 +139,4 @@ tablesixteen= } } -defaulttable = \symboltables { tablesixteen } +default_table = \symboltables { table_sixteen } diff --git a/input/Makefile b/input/Makefile index d2e1363371..94a5042a3f 100644 --- a/input/Makefile +++ b/input/Makefile @@ -14,8 +14,8 @@ include ./$(depth)/make/Include.make # list of distribution files: # -LYFILES = $(shell ls *.ly) -TEXFILES = $(shell ls *.tex) +LYFILES = $(wildcard *.ly) +TEXFILES = $(wildcard *.tex) DISTFILES = Makefile $(LYFILES) $(TEXFILES) # diff --git a/input/cadenza.ly b/input/cadenza.ly index b1fe77a160..ebef5ed7a1 100644 --- a/input/cadenza.ly +++ b/input/cadenza.ly @@ -5,10 +5,11 @@ % cad = \music { - \duration { 8} + \cadenza {1} + \grouping{1*4}\duration { 8} \textstyle "italic" \clef \violin - c'4.\mf g8 + c'4.mf g8 \textstyle "roman" [e'^"accel" ()d' c' b] @@ -45,14 +46,11 @@ cad = \music { c4 } -score { +\score { \staff { \melodic \music { cad } } - \co\mmands { - \cadenza {1} - grouping{1*4} - } + \paper {} - \midi { \tempo 4:80 } + \midi { \tempo 4:90 } } diff --git a/input/coriolan-alto.ly b/input/coriolan-alto.ly index 29a7b38c02..ad468d0573 100644 --- a/input/coriolan-alto.ly +++ b/input/coriolan-alto.ly @@ -70,10 +70,10 @@ alto = \music { } -score { +\score { \staff { \melodic \music { alto }} - } + \paper { \unitspace 14\mm \geometric 1.4 diff --git a/input/error.ly b/input/error.ly index 66b3760844..570300af98 100644 --- a/input/error.ly +++ b/input/error.ly @@ -5,7 +5,7 @@ mwa = \music { [ a8 a8 a8 a8 a8 ] % [ a8 ] % % segfault - { \\music{ [ bes^"1"( )a bes-. g-. ] a4-.^"4" } \\music{ [ e ] } \\music{ [ c ] } } | + < { [ bes^"1"( )a bes-. g-. ] a4-.^"4" } { [ e ] } { [ c ] } > | a ) b ] c % warning & % ok; error a b ) ] % ok; error diff --git a/input/fugue1.midi.ly b/input/fugue1.midi.ly index c42cc42775..630b94a4ba 100644 --- a/input/fugue1.midi.ly +++ b/input/fugue1.midi.ly @@ -11,120 +11,120 @@ track0 = \music { track1 = \music { % \midi copyright: % instrument: - g8 a8 b8 c'8. { \\music{ d'16 } } { \\music{ c'16 } } - { \\music{ b8 } } e'8 a8 { \\music{ d'8. } } e'16 + g8 a8 b8 c'8. { \music{ d'16 } } { \music{ c'16 } } + { \music{ b8 } } e'8 a8 { \music{ d'8. } } e'16 d'16 c'16 b16 g16 a16 b16 c'16 b16 c'16 d'16 e'16 d'16 e'16 fis'16 g'8 b8 c'8 a8 d'16 c'16 b16 a16 { - \\music{ g8. } } g16 f16 e16 f16 g16 a16 g16 a16 b16 - c'2 b4 c'8 d'8 e'8 f'8. { \\music{ f'16 } \\music{ + \music{ g8. } } g16 f16 e16 f16 g16 a16 g16 a16 b16 + c'2 b4 c'8 d'8 e'8 f'8. { \music{ f'16 } \music{ g'16 } } e'8 a'8 d'8 g'8. a'16 g'16 f'16 e'8 a'8. b'16 a'16 g'16 f'2 e'8. fis'16 g'2 fis'4 g'16 f'16 e'16 d'16 c'16 d'16 c'16 b16 a16 c'16 b16 a16 c'16 a16 gis8 e'8 d'8 c'16 b16 a16 gis16 a16 b16 c'16 fis16 gis16 a16 b8 a16 b16 c'8 f'8 e'8 d'4 c'16 b16 - { \\music{ c'16 } } { \\music{ b16 } } { \\music{ b16 - b16 } \\music{ c'16 c'16 } \\music{ b16 } \\music{ - c'16 c'16 } } { } { \\music{ b16 } } { \\music{ a16 } - } a4 g8 a8 b8 c'8. { \\music{ d'16 } } { \\music{ - c'16 } } { \\music{ b8 } } c'8 d'8 e'8 f'8. { \\music{ - g'16 } } { \\music{ f'16 } } { \\music{ e'8 } } a'8 + { \music{ c'16 } } { \music{ b16 } } { \music{ b16 + b16 } \music{ c'16 c'16 } \music{ b16 } \music{ + c'16 c'16 } } { } { \music{ b16 } } { \music{ a16 } + } a4 g8 a8 b8 c'8. { \music{ d'16 } } { \music{ + c'16 } } { \music{ b8 } } c'8 d'8 e'8 f'8. { \music{ + g'16 } } { \music{ f'16 } } { \music{ e'8 } } a'8 d'8 g'8. a'16 g'16 f'16 e'8 a'8 d'8 ais'8 a'8 g'16 - f'16 g'16 f'16 g'16 e'16 f'16 { \\music{ g'16 } } { - \\music{ g'16 } } { \\music{ a'16 } } { \\music{ g'16 } - } { } { } { \\music{ f'16 } } { \\music{ g'16 } } { - \\music{ a'16 } } cis'16 d'16 g'16 { \\music{ f'16 } - } { \\music{ e'16 } } { \\music{ f'16 } } { \\music{ - e'16 } } { } { \\music{ f'16 } } { } { } { } { - \\music{ e'8 } } { } d'16 d'8 g8 a8 b8 c'8 d'16 { - \\music{ c'16 } } { \\music{ b8 } } e'8 a8 { \\music{ + f'16 g'16 f'16 g'16 e'16 f'16 { \music{ g'16 } } { + \music{ g'16 } } { \music{ a'16 } } { \music{ g'16 } + } { } { } { \music{ f'16 } } { \music{ g'16 } } { + \music{ a'16 } } cis'16 d'16 g'16 { \music{ f'16 } + } { \music{ e'16 } } { \music{ f'16 } } { \music{ + e'16 } } { } { \music{ f'16 } } { } { } { } { + \music{ e'8 } } { } d'16 d'8 g8 a8 b8 c'8 d'16 { + \music{ c'16 } } { \music{ b8 } } e'8 a8 { \music{ d'8. } } e'16 d'16 c'16 b16 c'16 d'16 e'16 f'16 - g'16 a'16 g'16 f'16 e'16 d'16 c'16 { \\music{ c'16 } - } { \\music{ b16 } } { \\music{ c'16 } } { } { } { - \\music{ b8. } } c'8 d'8 g8 { \\music{ c'4 } } b8 c'4 - b8 ais8 a8 { \\music{ d'4 } } c'8 d'8 e'8 f'4 a'16 { - \\music{ g'16 } } f'16 e'16 { \\music{ f'16 } } { - \\music{ e'16 } } d'16 c'2 g16 { \\music{ a16 } } b16 - c'16 d'16 e'16 { \\music{ f'8. } } { \\music{ d'16 } - \\music{ c'16 e'16 } } f'16 { \\music{ g'16 } } { - \\music{ a'8. } } b'16 c''2 + g'16 a'16 g'16 f'16 e'16 d'16 c'16 { \music{ c'16 } + } { \music{ b16 } } { \music{ c'16 } } { } { } { + \music{ b8. } } c'8 d'8 g8 { \music{ c'4 } } b8 c'4 + b8 ais8 a8 { \music{ d'4 } } c'8 d'8 e'8 f'4 a'16 { + \music{ g'16 } } f'16 e'16 { \music{ f'16 } } { + \music{ e'16 } } d'16 c'2 g16 { \music{ a16 } } b16 + c'16 d'16 e'16 { \music{ f'8. } } { \music{ d'16 } + \music{ c'16 e'16 } } f'16 { \music{ g'16 } } { + \music{ a'8. } } b'16 c''2 } % track1 track2 = \music { % \midi copyright: % instrument: - c8 d8 e8 f8. { \\music{ g16 } } { \\music{ f16 } } { - \\music{ e8 } } a8 d8 { \\music{ g8. } } a16 g16 f16 - e16 f16 e16 d16 c16 d16 c16 `b16 `a8 fis8 { \\music{ + c8 d8 e8 f8. { \music{ g16 } } { \music{ f16 } } { + \music{ e8 } } a8 d8 { \music{ g8. } } a16 g16 f16 + e16 f16 e16 d16 c16 d16 c16 `b16 `a8 fis8 { \music{ g4. } } f16 e16 f8 d8 g8 f8 e8 d8 g4 f16 e16 f4 f16 e8 d4 c8 f8 g16 f16 e16 f8 d8 g4.. g8 a8 b8 { - \\music{ c'8. } } { \\music{ d'16 } } { \\music{ c'16 } - } { \\music{ b8 } } e'8 a8 { \\music{ d'8. } } e'16 - d'16 c'16 b8 d8 e8 fis8 { \\music{ g8. } } { \\music{ - a16 } } { \\music{ g16 } } { \\music{ f8 } } b8 e8 + \music{ c'8. } } { \music{ d'16 } } { \music{ c'16 } + } { \music{ b8 } } e'8 a8 { \music{ d'8. } } e'16 + d'16 c'16 b8 d8 e8 fis8 { \music{ g8. } } { \music{ + a16 } } { \music{ g16 } } { \music{ f8 } } b8 e8 a8. b16 a16 gis16 fis8 f8 e8 d8. e16 fis16 gis16 a16 gis16 a16 b16 gis16 fis16 gis16 a16 b8 c8 d8 e8 - { \\music{ f8. } } { \\music{ g16 } } { \\music{ f16 } - } { \\music{ e8 } } a8 d8 g8. a16 g16 f16 e16 e16 - fis16 g4 fis8 gis8 { \\music{ a4 } } g8 a8 b8 { - \\music{ c'8. } } { \\music{ d'16 } } { \\music{ c'16 } - } { \\music{ b8 } } e'8 a8 d'8. e'16 d'16 c'16 b8 + { \music{ f8. } } { \music{ g16 } } { \music{ f16 } + } { \music{ e8 } } a8 d8 g8. a16 g16 f16 e16 e16 + fis16 g4 fis8 gis8 { \music{ a4 } } g8 a8 b8 { + \music{ c'8. } } { \music{ d'16 } } { \music{ c'16 } + } { \music{ b8 } } e'8 a8 d'8. e'16 d'16 c'16 b8 g'8 cis'8 d'8 e'8 cis'8 d'8 e'8 a8 e8 fis8 g8 { - \\music{ a8. } } { \\music{ b16 } } { \\music{ a16 } } - { \\music{ g8 } } c'8 fis8 { \\music{ b8. } } c'16 + \music{ a8. } } { \music{ b16 } } { \music{ a16 } } + { \music{ g8 } } c'8 fis8 { \music{ b8. } } c'16 b16 a16 g16 fis16 e16 d16 e4 d4 a16 g16 f16 e16 g16 - f16 a16 g4 a16 ais8 { \\music{ c'4 } } d'8 g8 { - \\music{ g4. } } f4 e8 d4 e16 a4 g4 f8 g8 a8 { - \\music{ ais8. } } { \\music{ c'16 } } { \\music{ - ais16 } } { \\music{ a8 } } d'8 g8 { \\music{ c'8. } + f16 a16 g4 a16 ais8 { \music{ c'4 } } d'8 g8 { + \music{ g4. } } f4 e8 d4 e16 a4 g4 f8 g8 a8 { + \music{ ais8. } } { \music{ c'16 } } { \music{ + ais16 } } { \music{ a8 } } d'8 g8 { \music{ c'8. } } d'16 c'16 ais16 a16 ais16 a16 g16 f16 g16 f16 e16 - g16 a4 f'16 d'8 { \\music{ e'2 } \\music{ g'2 } } + g16 a4 f'16 d'8 { \music{ e'2 } \music{ g'2 } } } % track2 track3 = \music { % \midi copyright: % instrument: - `g8 `a8 `b8 c8. { \\music{ d16 } } { \\music{ c16 } } - { \\music{ `b8 } } e8 `a8 { \\music{ d8. } } e16 d16 + `g8 `a8 `b8 c8. { \music{ d16 } } { \music{ c16 } } + { \music{ `b8 } } e8 `a8 { \music{ d8. } } e16 d16 c16 `b8 c4 `ais8 `a8 d8 `g8 c8 `a16 `b16 c16 d4 `g4 - `g8 `a8 `b8 c8. { \\music{ d16 } } { \\music{ c16 } } + `g8 `a8 `b8 c8. { \music{ d16 } } { \music{ c16 } } { } `b8 e8 `a8 d8. e16 d16 c16 `b8 e4. d4 `b16 c16 `a16 e16 d16 c16 `b16 c16 `a16 `b16 c16 d16 c16 - `b16 `a16 `g4 `e8 `fis8 `gis8 `a8. { \\music{ `b16 } - } { \\music{ `a16 } } { \\music{ `g8 } } c8 `fis8 - `b8. c16 `b16 `a16 `gis8 { \\music{ `a4 } } `gis8 - `a4 `g8 `a8 `b8 c8. { \\music{ d16 } } { \\music{ c16 - } } { \\music{ `b8 } } e8 `a8 d4 `g8 d4 c8 `a8 e4 d8 - `a8 `b8 cis8 d8. { \\music{ e16 } } { \\music{ d16 } - } { \\music{ c8 } } f8 `b8 e8. f16 e16 d16 cis8 `a8 - `b8 cis8 d8. { \\music{ e16 } } { \\music{ d16 } } { - \\music{ c8 } } fis8 `b8 e8. fis16 e16 d16 c4.. d16 - c16 `b16 `a16 `g16 `a16 `fis16 `g8 `b8 c8 { \\music{ - d8 } } e8. { \\music{ f16 } } { \\music{ e16 } } { - \\music{ d8 } } g8 c8 f8. g16 f16 e16 d4 e8 d4 { - \\music{ `g8 } } `g4. `c8 `d8 `e8 `f8. { \\music{ - `g16 } } { \\music{ `f16 } } { \\music{ `e8 } } `a8 - `d8 { \\music{ `g8. } } `a16 `g16 `f16 `e16 `d16 + `b16 `a16 `g4 `e8 `fis8 `gis8 `a8. { \music{ `b16 } + } { \music{ `a16 } } { \music{ `g8 } } c8 `fis8 + `b8. c16 `b16 `a16 `gis8 { \music{ `a4 } } `gis8 + `a4 `g8 `a8 `b8 c8. { \music{ d16 } } { \music{ c16 + } } { \music{ `b8 } } e8 `a8 d4 `g8 d4 c8 `a8 e4 d8 + `a8 `b8 cis8 d8. { \music{ e16 } } { \music{ d16 } + } { \music{ c8 } } f8 `b8 e8. f16 e16 d16 cis8 `a8 + `b8 cis8 d8. { \music{ e16 } } { \music{ d16 } } { + \music{ c8 } } fis8 `b8 e8. fis16 e16 d16 c4.. d16 + c16 `b16 `a16 `g16 `a16 `fis16 `g8 `b8 c8 { \music{ + d8 } } e8. { \music{ f16 } } { \music{ e16 } } { + \music{ d8 } } g8 c8 f8. g16 f16 e16 d4 e8 d4 { + \music{ `g8 } } `g4. `c8 `d8 `e8 `f8. { \music{ + `g16 } } { \music{ `f16 } } { \music{ `e8 } } `a8 + `d8 { \music{ `g8. } } `a16 `g16 `f16 `e16 `d16 `e16 `f16 `g16 `a16 `ais16 `g16 `a16 `e16 `f16 `g16 - `a16 `b16 c16 { \\music{ `a16 } \\music{ d2 } } c1 + `a16 `b16 c16 { \music{ `a16 } \music{ d2 } } c1 } % track3 track4 = \music { % \midi copyright: % instrument: - `c8 `d8 `e8 `f8. { \\music{ `g16 } } { \\music{ `f16 } - } { \\music{ `e8 } } `a8 `d8 { \\music{ `g8. } } + `c8 `d8 `e8 `f8. { \music{ `g16 } } { \music{ `f16 } + } { \music{ `e8 } } `a8 `d8 { \music{ `g8. } } `a16 `g16 `f16 `e16 `f16 `e16 `d16 `c16 `d16 `c16 ``b16 ``a8 `d8 `a8 `fis8 `g16 `a16 `ais16 `g16 `cis8 `d8 `a4 `e4 `a16 `b16 c16 d16 c16 `b16 `a16 - `g16 c8 ``g8 ``a8 ``b8 `c8. { \\music{ `d16 } } { - \\music{ `c16 } } { \\music{ ``b8 } } `e8 ``a8 `d8. - `e16 `d16 `c16 { \\music{ ``b8 } } `e4 `d8 `c8 `f4 + `g16 c8 ``g8 ``a8 ``b8 `c8. { \music{ `d16 } } { + \music{ `c16 } } { \music{ ``b8 } } `e8 ``a8 `d8. + `e16 `d16 `c16 { \music{ ``b8 } } `e4 `d8 `c8 `f4 `e4 `d4 `e8 `f8 `e16 `d16 `e4 ``a4 ``g8 ``a8 ``b8 - `c8. { \\music{ `d16 } } { \\music{ `c16 } } { \\music{ + `c8. { \music{ `d16 } } { \music{ `c16 } } { \music{ ``b8 } } `e8 ``a8 `d8. `e16 `d16 `c16 ``b8 ai``s8 ``a8 ``g8 ``a8 `fis8 `g8 `e8 `d4 `e8 `f8 `g8. { - \\music{ `a16 } } { \\music{ `g16 } } { \\music{ `f8 } - } `ais8 `e8 `a8. `b16 { \\music{ `a16 } } `g16 `f16 + \music{ `a16 } } { \music{ `g16 } } { \music{ `f8 } + } `ais8 `e8 `a8. `b16 { \music{ `a16 } } `g16 `f16 `e16 `f16 `d16 `g8 `a8 `d4.. `e16 `d16 `c16 ``b16 ``a16 ``g16 fi``s16 ``e8 `e8 `fis8 `g4 `a16 `g16 `fis8 `d8 `g1 `a4 `b8 c8 `f16 `a16 `g16 `f16 `e16 diff --git a/input/kortjakje.ly b/input/kortjakje.ly index d1e704afe2..d26a7431bf 100644 --- a/input/kortjakje.ly +++ b/input/kortjakje.ly @@ -34,7 +34,7 @@ melodie = \music { % more of this. begeleiding = % \clef bass % bass-\clef -% \\music { % as you can see, the sign obliges +% \music { % as you can see, the sign obliges % you to precede \keyword by a backslash: \ \music { \clef "bass" diff --git a/input/maartje.ly b/input/maartje.ly index c9cde44649..ce3425fbb3 100644 --- a/input/maartje.ly +++ b/input/maartje.ly @@ -3,9 +3,19 @@ % COPYRIGHT: GPL % % +globals=\music{ + \meter {4/ 4} + \partial {8} + \skip {1*8} + \skip {3*2 } + \bar ":|:" + \skip {1*2} + \meter {2/4} +} ritme = \staff { rhythmic + \music{globals} \music { c8 |[a8() a8. a8 a16 a16 a16] c4. @@ -25,6 +35,7 @@ ritme = \staff { melody= \staff { \melodic + \music { globals } \music{ c8\key{fis cis gis} |r4 r4 r4 r4 @@ -32,15 +43,15 @@ melody= | r4 r8 r16 r32 r32 \duration {4} - { - \\music { c () `bes [c8 c8] } - \\music { fis' ()gisis' fis8 fis8 } - \\music { d () d dis8 dis8 } - \\music { a () bes eis8 eis8 } - \\music { fis () g gis8 gis8 } - } + < + { c () `bes [c8 c8] } + { fis' ()gisis' fis8 fis8 } + { d () d dis8 dis8 } + { a () bes eis8 eis8 } + { fis () g gis8 gis8 } + > \clef\tenor - { c4 c'4 } + < c4 c'4 > [d8 e8 f'8 g8] d8 e8 f8 g8 |fis''2 @@ -53,24 +64,16 @@ melody= } -score { +\score { \paper { \geometric 1.4 \unitspace 3.0 \cm } % \staff { ritme } % broken for now \staff { melody } - \co\mmands { - \meter {4* 4} - \partial {8} - \skip {1*8} - \skip {3*2 } - \bar ":|:" - \skip {1*2} - \meter {2*4} - - } + } + diff --git a/input/mlvio1.ly b/input/mlvio1.ly index 97078db255..9b3bf05604 100644 --- a/input/mlvio1.ly +++ b/input/mlvio1.ly @@ -101,7 +101,7 @@ violinI = \music { %39 [ e'8 c' c' ] [ c'8 d' c' ] | %40 - c'4 { b4 d'4 } | + c'4 < b4 d'4 > | %41 \textstyle "italic" \duration{8} diff --git a/input/new-twinkle.ly b/input/new-twinkle.ly deleted file mode 100644 index 75eaf799c4..0000000000 --- a/input/new-twinkle.ly +++ /dev/null @@ -1,109 +0,0 @@ -% "Ah, vous dirais-je, maman" -% "Altijd is Kortjakje ziek" -% "Twinkle twinkle little star" -% -% Copyright: none - -melody = \melodic{ - \clef\violin - c c | g g | a a | g g | - f f | e e | d [ d8.( e16 ] | )c2 \bar ":|" - - g g | f f | e e | d d | -% g g | f f | e( [f0*32 e0*32 d0*32] [ e8. f16 ] | e )d | c c | - g g | f f | e( [ e8. f16 ] | e )d | - - c c | g g | a a | g g | - f f | e e | d [ d8.( e16 ] | )c2 \bar ":|" -} - -accompany = \melodic{ - \clef\bass - \octave{ c' } - c c' | e' c' | f' c' | e' c' | - d' b | c' a | f g | c2 \bar ":|" - - e' g | d g | c' g | b g | -% e' g | d' g | c' [ c'8.( d'16 ] | \voice{ c' )b } \voice{ g2 } | - e' g | d' g | c' [ c'8.( d'16 ] | c' )b | - - c c' | e' c' | f' c' | e' c' | - d' b | c' a | f g | c2 \bar ":|" -} - -original_text = \lyric{ - \textstyle "italic" - Ah! vous dir- ai_- je ma man2 - Ce qui cau- se mon tour- ment2 - Pa- pa veut que je rai- sonne2 - Co\mme un- e grand- e per- sonne2 - Moi je dis que les bon- bons2 - Val- ent mieu que la rai- son2 -} - -tekst = \lyric{ - Al- tijd is Kort- jak- je ziek,2 - midden in_de week maar s'_zon- dags niet.2 - s'_Zon- dags gaat ze naar de kerk,2 - met een boek vol zil- ver werk.2 - Al- tijd is Kort- jak- je ziek,2 - midden in_de week maar s'_zon- dags niet.2 -} - -he_gedraagje_tekst = \lyric{ - Al- tijd zuigt Bill Gates mijn piek,2 - "\TeX" is slecht- ser dan mu- ziek.2 - s''_Zon- dags gaat het door een raam,2 - Weet dat ik me er- voor schaam.2 - Al- tijd zuigt Bill Gates mijn piek,2 - "\TeX" is slecht- ser dan mu- ziek.2 -} - -text1 = \lyric{ - \textstyle "roman" - Twin- kle, twin- kle, lit- tle star,2 - How I won- der what you are.2 - Up a- bove the world so high,2 - Like a dia- mond in the sky.2 - Twin- kle, twin- kle, lit- tle star,2 - How I won- der what you are!2 -} - -text2 = \lyric{ - \textstyle "roman" - When the bla- zing sun is gone,2 - When he no- thing shines up- on,2 - Then you show your lit- tle light,2 - Twin- kle, twin- kle, all the night.2 - Twin- kle, twin- kle, lit- tle star,2 - How I won- der what you are!2 -} - -text3 = \lyric{ - \textstyle "roman" - Then the tra- veler in the dark2 - Thanks you for your ti- ny spark;2 - He_could not see which way to go,2 - If you did not twin- kle so.2 - Twin- kle, twin- kle, lit- tle star,2 - How I won- der what you are!2 -} - -\score{ - \\staff{ melody } - \\staff{ tekst } - \\staff{ original_text } - \\staff{ text1 text2 text3 } - \\staff{ accompany } - \co\mmands{ - \meter{ 2/4 } - \skip{ 24 } - } - \midi{ - \tempo 4:120 - } - \paper{ - \unitspace 2.5\cm - } -} - diff --git a/input/plet.ly b/input/plet.ly index 75382fdd8f..d309296dda 100644 --- a/input/plet.ly +++ b/input/plet.ly @@ -6,7 +6,7 @@ melanie = \music { [ c d ] [ e { d g } c ]2/3 | [ c d ] [ c16 d16 e'16 e'16 d16 c16 ]4/6 | [ c d e e d c ]4/6 | - [c d ] { \\music{ [ c d e ]2/3 } \\music{ [ f g a ]2/3 } } | + [c d ] { \music{ [ c d e ]2/3 } \music{ [ f g a ]2/3 } } | [ c d ] [ d c ] | } diff --git a/input/pre1.midi.ly b/input/pre1.midi.ly index 4a3183ab99..3945d68be8 100644 --- a/input/pre1.midi.ly +++ b/input/pre1.midi.ly @@ -12,106 +12,106 @@ track0 = \music { track1 = \music { % \midi copyright: % instrument: - { \\music{ g16 c'16 e'16 g16 c'16 e'16 } } { \\music{ - g16 c'16 e'16 g16 c'16 e'16 } } { \\music{ a16 d'16 - f'16 a16 d'16 f'16 } } { \\music{ a16 d'16 f'16 a16 - d'16 f'16 } } { \\music{ g16 d'16 f'16 g16 d'16 f'16 - } } { \\music{ g16 d'16 f'16 g16 d'16 f'16 } } { - \\music{ g16 c'16 e'16 g16 c'16 e'16 } } { \\music{ - g16 c'16 e'16 g16 c'16 e'16 } } { \\music{ a16 e'16 - a'16 a16 e'16 a'16 } } { \\music{ a16 e'16 a'16 a16 - e'16 a'16 } } { \\music{ fis16 a16 d'16 fis16 a16 - d'16 } } { \\music{ fis16 a16 d'16 fis16 a16 d'16 } - } { \\music{ g16 d'16 g'16 g16 d'16 g'16 } } { - \\music{ g16 d'16 g'16 g16 d'16 g'16 } } { \\music{ - e16 g16 c'16 e16 g16 c'16 } } { \\music{ e16 g16 - c'16 e16 g16 c'16 } } { \\music{ e16 g16 c'16 e16 - g16 c'16 } } { \\music{ e16 g16 c'16 e16 g16 c'16 } - } { \\music{ d16 fis16 c'16 d16 fis16 c'16 } } { - \\music{ d16 fis16 c'16 d16 fis16 c'16 } } { \\music{ - d16 g16 b16 d16 g16 b16 } } { \\music{ d16 g16 b16 - d16 g16 b16 } } { \\music{ e16 g16 cis'16 e16 g16 - cis'16 } } { \\music{ e16 g16 cis'16 e16 g16 cis'16 } - } { \\music{ d16 a16 d'16 d16 a16 d'16 } } { \\music{ - d16 a16 d'16 d16 a16 d'16 } } { \\music{ d16 f16 - b16 d16 f16 b16 } } { \\music{ d16 f16 b16 d16 f16 - b16 } } { \\music{ c16 g16 c'16 c16 g16 c'16 } } { - \\music{ c16 g16 c'16 c16 g16 c'16 } } { \\music{ - `a16 c16 f16 `a16 c16 f16 } } { \\music{ `a16 c16 - f16 `a16 c16 f16 } } { \\music{ `a16 c16 f16 `a16 - c16 f16 } } { \\music{ `a16 c16 f16 `a16 c16 f16 } } - { \\music{ `g16 `b16 f16 `g16 `b16 f16 } } { \\music{ - `g16 `b16 f16 `g16 `b16 f16 } } { \\music{ `g16 c16 - e16 `g16 c16 e16 } } { \\music{ `g16 c16 e16 `g16 - c16 e16 } } { \\music{ `ais16 c16 e16 `ais16 c16 e16 - } } { \\music{ `ais16 c16 e16 `ais16 c16 e16 } } { - \\music{ `a16 c16 e16 `a16 c16 e16 } } { \\music{ - `a16 c16 e16 `a16 c16 e16 } } { \\music{ `a16 c16 - dis16 `a16 c16 dis16 } } { \\music{ `a16 c16 dis16 - `a16 c16 dis16 } } { \\music{ `b16 c16 d16 `b16 c16 - d16 } } { \\music{ `b16 c16 d16 `b16 c16 d16 } } { - \\music{ `g16 `b16 d16 `g16 `b16 d16 } } { \\music{ - `g16 `b16 d16 `g16 `b16 d16 } } { \\music{ `g16 c16 - e16 `g16 c16 e16 } } { \\music{ `g16 c16 e16 `g16 - c16 e16 } } { \\music{ `g16 c16 f16 `g16 c16 f16 } } - { \\music{ `g16 c16 f16 `g16 c16 f16 } } { \\music{ - `g16 `b16 f16 `g16 `b16 f16 } } { \\music{ `g16 `b16 - f16 `g16 `b16 f16 } } { \\music{ `a16 c16 fis16 `a16 - c16 fis16 } } { \\music{ `a16 c16 fis16 `a16 c16 - fis16 } } { \\music{ `g16 c16 g16 `g16 c16 g16 } } { - \\music{ `g16 c16 g16 `g16 c16 g16 } } { \\music{ - `g16 c16 f16 `g16 c16 f16 } } { \\music{ `g16 c16 - f16 `g16 c16 f16 } } { \\music{ `g16 `b16 f16 `g16 - `b16 f16 } } { \\music{ `g16 `b16 f16 `g16 `b16 f16 } - } { \\music{ `g16 `ais16 e16 `g16 `ais16 e16 } } { - \\music{ `g16 `ais16 e16 `g16 `ais16 e16 } } { - \\music{ `f16 `a16 c16 f16 c16 `a16 c16 `a16 `f16 - `a16 `f16 `d16 `f16 `d16 } } { \\music{ g16 b16 d'16 + { \music{ g16 c'16 e'16 g16 c'16 e'16 } } { \music{ + g16 c'16 e'16 g16 c'16 e'16 } } { \music{ a16 d'16 + f'16 a16 d'16 f'16 } } { \music{ a16 d'16 f'16 a16 + d'16 f'16 } } { \music{ g16 d'16 f'16 g16 d'16 f'16 + } } { \music{ g16 d'16 f'16 g16 d'16 f'16 } } { + \music{ g16 c'16 e'16 g16 c'16 e'16 } } { \music{ + g16 c'16 e'16 g16 c'16 e'16 } } { \music{ a16 e'16 + a'16 a16 e'16 a'16 } } { \music{ a16 e'16 a'16 a16 + e'16 a'16 } } { \music{ fis16 a16 d'16 fis16 a16 + d'16 } } { \music{ fis16 a16 d'16 fis16 a16 d'16 } + } { \music{ g16 d'16 g'16 g16 d'16 g'16 } } { + \music{ g16 d'16 g'16 g16 d'16 g'16 } } { \music{ + e16 g16 c'16 e16 g16 c'16 } } { \music{ e16 g16 + c'16 e16 g16 c'16 } } { \music{ e16 g16 c'16 e16 + g16 c'16 } } { \music{ e16 g16 c'16 e16 g16 c'16 } + } { \music{ d16 fis16 c'16 d16 fis16 c'16 } } { + \music{ d16 fis16 c'16 d16 fis16 c'16 } } { \music{ + d16 g16 b16 d16 g16 b16 } } { \music{ d16 g16 b16 + d16 g16 b16 } } { \music{ e16 g16 cis'16 e16 g16 + cis'16 } } { \music{ e16 g16 cis'16 e16 g16 cis'16 } + } { \music{ d16 a16 d'16 d16 a16 d'16 } } { \music{ + d16 a16 d'16 d16 a16 d'16 } } { \music{ d16 f16 + b16 d16 f16 b16 } } { \music{ d16 f16 b16 d16 f16 + b16 } } { \music{ c16 g16 c'16 c16 g16 c'16 } } { + \music{ c16 g16 c'16 c16 g16 c'16 } } { \music{ + `a16 c16 f16 `a16 c16 f16 } } { \music{ `a16 c16 + f16 `a16 c16 f16 } } { \music{ `a16 c16 f16 `a16 + c16 f16 } } { \music{ `a16 c16 f16 `a16 c16 f16 } } + { \music{ `g16 `b16 f16 `g16 `b16 f16 } } { \music{ + `g16 `b16 f16 `g16 `b16 f16 } } { \music{ `g16 c16 + e16 `g16 c16 e16 } } { \music{ `g16 c16 e16 `g16 + c16 e16 } } { \music{ `ais16 c16 e16 `ais16 c16 e16 + } } { \music{ `ais16 c16 e16 `ais16 c16 e16 } } { + \music{ `a16 c16 e16 `a16 c16 e16 } } { \music{ + `a16 c16 e16 `a16 c16 e16 } } { \music{ `a16 c16 + dis16 `a16 c16 dis16 } } { \music{ `a16 c16 dis16 + `a16 c16 dis16 } } { \music{ `b16 c16 d16 `b16 c16 + d16 } } { \music{ `b16 c16 d16 `b16 c16 d16 } } { + \music{ `g16 `b16 d16 `g16 `b16 d16 } } { \music{ + `g16 `b16 d16 `g16 `b16 d16 } } { \music{ `g16 c16 + e16 `g16 c16 e16 } } { \music{ `g16 c16 e16 `g16 + c16 e16 } } { \music{ `g16 c16 f16 `g16 c16 f16 } } + { \music{ `g16 c16 f16 `g16 c16 f16 } } { \music{ + `g16 `b16 f16 `g16 `b16 f16 } } { \music{ `g16 `b16 + f16 `g16 `b16 f16 } } { \music{ `a16 c16 fis16 `a16 + c16 fis16 } } { \music{ `a16 c16 fis16 `a16 c16 + fis16 } } { \music{ `g16 c16 g16 `g16 c16 g16 } } { + \music{ `g16 c16 g16 `g16 c16 g16 } } { \music{ + `g16 c16 f16 `g16 c16 f16 } } { \music{ `g16 c16 + f16 `g16 c16 f16 } } { \music{ `g16 `b16 f16 `g16 + `b16 f16 } } { \music{ `g16 `b16 f16 `g16 `b16 f16 } + } { \music{ `g16 `ais16 e16 `g16 `ais16 e16 } } { + \music{ `g16 `ais16 e16 `g16 `ais16 e16 } } { + \music{ `f16 `a16 c16 f16 c16 `a16 c16 `a16 `f16 + `a16 `f16 `d16 `f16 `d16 } } { \music{ g16 b16 d'16 f'16 d'16 b16 d'16 b16 g16 b16 d16 f16 e64 } } { - \\music{ f64 } } { } { \\music{ e32 } } { \\music{ d16 - } } { \\music{ c'1 } \\music{ g1 } \\music{ e1 } } + \music{ f64 } } { } { \music{ e32 } } { \music{ d16 + } } { \music{ c'1 } \music{ g1 } \music{ e1 } } } % track1 % jcn: substituted some "2" \durations to "4." track2 = \music { % \midi copyright: % instrument: - { \\music{ e4. } } { \\music{ e4. } } { \\music{ d4. } - } { \\music{ d4. } } { \\music{ d4. } } { \\music{ d4. - } } { \\music{ e4. } } { \\music{ e4. } } { \\music{ - e4. } } { \\music{ e4. } } { \\music{ d4. } } { - \\music{ d4. } } { \\music{ d4. } } { \\music{ d4. } } - { \\music{ c4. } } { \\music{ c4. } } { \\music{ c4. } - } { \\music{ c4. } } { \\music{ `a4. } } { \\music{ - `a4. } } { \\music{ `b4. } } { \\music{ `b4. } } { - \\music{ `ais4. } } { \\music{ `ais4. } } { \\music{ - `a4. } } { \\music{ `a4. } } { \\music{ `gis4. } } { - \\music{ `gis4. } } { \\music{ `g4. } } { \\music{ - `g4. } } { \\music{ `f4. } } { \\music{ `f4. } } { - \\music{ `f4. } } { \\music{ `f4. } } { \\music{ `d4. } - } { \\music{ `d4. } } { \\music{ `e4. } } { \\music{ - `e4. } } { \\music{ `g4. } } { \\music{ `c4. } } { } { - } { \\music{ `g4. } } { } { \\music{ ``f4. } } { - \\music{ `f4. } } { \\music{ ``f4. } } { \\music{ `f4. } - } { \\music{ fi``s4. } } { \\music{ fi``s4. } \\music{ - `c4. } } { } { \\music{ `c4. } } { \\music{ gi``s4. } } - { \\music{ gi``s4. } \\music{ `f4. } } { } { \\music{ - `f4. } } { \\music{ ``g4. } } { \\music{ ``g4. } \\music{ - `f4. } } { } { \\music{ `f4. } } { \\music{ ``g4. } } - { \\music{ ``g4. } \\music{ `e4. } } { } { \\music{ ``g4. - } \\music{ `e4. } } { } { \\music{ ``g4. } \\music{ - `d4. } } { } { \\music{ ``g4. } \\music{ `d4. } } { } { - \\music{ `d4. } } { \\music{ ``g4. } } { \\music{ ``g4. } - \\music{ `d4. } } { } { \\music{ `dis4. } } { \\music{ - ``g4. } } { \\music{ `dis4. } } { \\music{ ``g4. } } { - \\music{ `e4. } } { \\music{ ``g4. } } { \\music{ `e4. } - } { \\music{ ``g4. } } { \\music{ `d4. } } { \\music{ - ``g4. } } { \\music{ `d4. } } { \\music{ ``g4. } } { - \\music{ `d4. } } { \\music{ ``g4. } } { \\music{ `d4. } - } { \\music{ ``c4. } } { \\music{ `c4. } } { \\music{ - ``c4. } } { \\music{ `c4. } } { \\music{ ``c1 } } { - \\music{ `c1 } } { \\music{ ``c1 } \\music{ ``b1 } } { - } { } { } { \\music{ ``c1 } \\music{ `c1 } } + { \music{ e4. } } { \music{ e4. } } { \music{ d4. } + } { \music{ d4. } } { \music{ d4. } } { \music{ d4. + } } { \music{ e4. } } { \music{ e4. } } { \music{ + e4. } } { \music{ e4. } } { \music{ d4. } } { + \music{ d4. } } { \music{ d4. } } { \music{ d4. } } + { \music{ c4. } } { \music{ c4. } } { \music{ c4. } + } { \music{ c4. } } { \music{ `a4. } } { \music{ + `a4. } } { \music{ `b4. } } { \music{ `b4. } } { + \music{ `ais4. } } { \music{ `ais4. } } { \music{ + `a4. } } { \music{ `a4. } } { \music{ `gis4. } } { + \music{ `gis4. } } { \music{ `g4. } } { \music{ + `g4. } } { \music{ `f4. } } { \music{ `f4. } } { + \music{ `f4. } } { \music{ `f4. } } { \music{ `d4. } + } { \music{ `d4. } } { \music{ `e4. } } { \music{ + `e4. } } { \music{ `g4. } } { \music{ `c4. } } { } { + } { \music{ `g4. } } { } { \music{ ``f4. } } { + \music{ `f4. } } { \music{ ``f4. } } { \music{ `f4. } + } { \music{ fi``s4. } } { \music{ fi``s4. } \music{ + `c4. } } { } { \music{ `c4. } } { \music{ gi``s4. } } + { \music{ gi``s4. } \music{ `f4. } } { } { \music{ + `f4. } } { \music{ ``g4. } } { \music{ ``g4. } \music{ + `f4. } } { } { \music{ `f4. } } { \music{ ``g4. } } + { \music{ ``g4. } \music{ `e4. } } { } { \music{ ``g4. + } \music{ `e4. } } { } { \music{ ``g4. } \music{ + `d4. } } { } { \music{ ``g4. } \music{ `d4. } } { } { + \music{ `d4. } } { \music{ ``g4. } } { \music{ ``g4. } + \music{ `d4. } } { } { \music{ `dis4. } } { \music{ + ``g4. } } { \music{ `dis4. } } { \music{ ``g4. } } { + \music{ `e4. } } { \music{ ``g4. } } { \music{ `e4. } + } { \music{ ``g4. } } { \music{ `d4. } } { \music{ + ``g4. } } { \music{ `d4. } } { \music{ ``g4. } } { + \music{ `d4. } } { \music{ ``g4. } } { \music{ `d4. } + } { \music{ ``c4. } } { \music{ `c4. } } { \music{ + ``c4. } } { \music{ `c4. } } { \music{ ``c1 } } { + \music{ `c1 } } { \music{ ``c1 } \music{ ``b1 } } { + } { } { } { \music{ ``c1 } \music{ `c1 } } } % track4. score { diff --git a/input/rhythm.ly b/input/rhythm.ly index 21fa4ab36a..a3f64906ae 100644 --- a/input/rhythm.ly +++ b/input/rhythm.ly @@ -7,20 +7,22 @@ ritme = \staff { \melodic \music { + \partial {1*8} % doesnt' have to be here. + \meter{ 4/4} c8 | - + [a8() a8. a8 a16 a16 a16] c4. | % watch the beams! r32 r32 r16 r8 r4 r2 | - \meter{ 5*16} + \meter{ 5/16} % divide measure in 5 equal parts. Usually it 2+3 or 3+2 \grouping { 5*16 } [c8 c16 c8 ] | % watch THIS! \plet{5/4} [c16 c16 c16 c16]\plet{1/1} | - \meter{ 2*8} + \meter{ 2/8} c4 | c4 c4 c4 c4 - \meter {4*4} + \meter {4/4} c1 c1 c1 % [c16 c16 c16 c16 ] | @@ -35,30 +37,27 @@ ritme = \staff { % \music block; % - \co\mmands { % override "\co\mmands" section of Score. - \partial {1*8} % doesnt' have to be here. - \meter{ 4*4} - } + } another = \staff { \melodic - \music { - c1 c1 c1 c4 c4 c4 c4 \meter{ 4*4} c1 c1 c1 + \music { \meter{ 4/4} + c1 c1 c1 c4 c4 c4 c4 \meter{ 4/4} c1 c1 c1 } } yanother = \staff { \melodic - \music { + \music { \meter{ 4/4} c1 c1 c1 c4 c4 c4 c4 c1 c1 c1 } } -score { +\score { \staff{ritme} \staff { another } \staff { yanother } - \co\mmands { \meter {4*4 }} + \paper { \unitspace 2\cm \geometric 1.3 diff --git a/input/scales.ly b/input/scales.ly index cb38307579..ee267b8ce6 100644 --- a/input/scales.ly +++ b/input/scales.ly @@ -1,6 +1,8 @@ blah = -\staff {\melodic +\staff {\melodic\music{ \meter {6/8} + \skip {36*8} + \meter {4/4}} \music{ \duration { 8 } \octave{ } @@ -43,18 +45,13 @@ c1 } } -score { +\score { \staff { blah } \paper { - symbol\tables { \table_sixteen} + \symboltables {table_sixteen} \unitspace 1.5 \cm \geometric 1.4 } - \co\mmands { - \meter {6*8} - \skip {36*8} - \meter {4*4} - } } diff --git a/input/scsii-menuetto.ly b/input/scsii-menuetto.ly index 824591f81f..b9f848715b 100644 --- a/input/scsii-menuetto.ly +++ b/input/scsii-menuetto.ly @@ -28,109 +28,78 @@ % % because piece is set very tightly %%1 % double co\mments are included in .tex file ii_menuetto = \music { - \clef"alto" + \clef"alto"\meter{3/4} \key {bes} \octave{} \duration{8} - { a2 f2 d2_"\f" } bes4-. | + < a2 f2 d2 df > bes4-. | %%2 - { [ bes^"1" e c_"2"_"4" } -% (^ ) - a bes-. g-. ] a4-.^"4" | + < [ bes^"1" e c_"2"_"4" > + a bes-. g-. ] a4-.^"4" | %%3 -% { d4 `bes4-.\stemup } \stemup: 2 \voices? - { d4 `bes4-. } g4-. [ f-. e-. ] | + < d4 `bes4-. > g4-. [ f-. e-. ] | %%4 -% { f `a } (^ e ) d cis-. `b-. `a-. ] -% [ f ( e ) d cis-. `b-. `a-. ] - { [ f `a } e d cis-. `b-. `a-. ] + < [ f `a > e d cis-. `b-. `a-. ] %%5 - { a2 f2 d2 } bes4-. | % @bes4-. | + < a2 f2 d2 > bes4-. | % @bes4-. | %%6 -% { bes( e } ) a - { [ bes e } a bes-. g-. ] + < [ bes e > a bes-. g-. ] c'4-. | % =c'4-. | %%7 - { a4-. f4} -% { d'4-.-\upbow f4 `bes4\stemdown } - { d'4-.-\upbow f4 `bes4 } -% { e'4-.-\downbow g4 `g4\stemdown } | - { e'4-.-\downbow g4 `g4 } | + < a4-. f4> + < d'4-.-upbow f4 `bes4 > + < e'4-.-downbow g4 `g4 > | %%8 -% { cis'2.-\upbow e2. `a2.\stemdown } :|:%%sorry!! - { cis'2.-\upbow e2. `a2. } \bar ":|:"%%!! sorry! + < cis'2.-upbow e2. `a2. > \bar ":|:"%%!! sorry! %%9 \clef "violin" -% { e'2 a2_f\stemdown } - { e'2 a2_"\f" } + < e'2 a2 df > [ d'( e'16 )f'16 ] | %%10 -% [ { e'( g } ) d' cis'_{ }_{ }_2 e' - { [ e' g } d' cis'_"2" e' a( )g ] | + < [ e' g > d' cis'_"2" e' a( )g ] | %%11 -% { a4\stemup( f2\stemdown } ) d'4\stemup -% { cis'4\stemup-. e4\stemdown } - { \multi\voice \\music {\stem{1} a4(\stem{1}) d'4 cis'4-. } \\music { \stem{-1} f2 e4 } } | + < \multivoice + {\stem{1} a4(\stem{1}) d'4 cis'4-. } + { \stem{-1} f2 e4 } > | %%12 -% { g'^4 d\stemdown } (^ f' e' ) f' d'^3(^ ) =c' ] | - { [ g'^"4" d } f' e' f' d'^"3"( ) c' ] | -% %13 -% { bes2\stemup g4\stemdown } ( ) f4 -% { c'4\stemup e4\stemdown } -% { bes2 g4 } f4 { c'4 e4 } | + < [ g'^"4" d > f' e' f' d'^"3"( ) c' ] | +%%13 \clef "alto"% - { \multi\voice - \\music { \stem{1} bes2 c'4 } - \\music { \stem{-1} g4(\stem{-1}) f4 e4 }% ugh - } | -%%%14 -%% [ { a( f } ) g a f ] { d'4-\upbow e4 `bes4\stemdown } | - { [ a f } g a f ] { d'4-\upbow e4 `bes4 } | -%%%15 -%% { c'4-\downbow f4 `a4\stemdown } [ bes( )a g a ] | -% { c'4-\downbow f4 `a4 } [ bes( )a g a ] | -%%%16 + < \multivoice + { \stem{1} bes2 c'4 } + { \stem{-1} g4(\stem{-1}) f4 e4 }% ugh + > | +%%14 + < [ a f > g a f ] < d'4-upbow e4 `bes4 > | +%%15 + < c'4-\downbow f4 `a4 > [ bes( )a g a ] | +%%16 [ f( e )f a-. g-. bes-. ] | -%% \tighten % use one line less -%% \newline % \start new line -%% | -%%%17 -%% { a2^0^\tr fis2_3 } bes4 | - { a2^"0" fis2_"3" } bes4 | -%%%18 -%% [ { c'( es } ) bes c' a ] fis4^\tr | - { \\music{ [ c'( )bes c' a ] } \\music{ [ es ] } } fis4 | -%%%19 - { d'4-\downbow g4 `bes4 } { c'4-\upbow g4 c4 } { [ bes d } a ] | -%%%20 -%% [ { c'( d `g } bes a ) bes g ( ) bes ] | - { \\music{ [ c'( bes a )bes g( )bes ] } \\music{ [ d ] } \\music{ [ g ] } } | -%%%21 -%% { d'4\stemup g2\stemdown } (^ ) cis'4\stemup { d'4\stemup =f4\stemdown } | - { \multi\voice \\music {\stem{1} d'4(\stem{1} ) cis'4 d'4 } \\music { \stem{-1} g2 f4 } } | -%%%22 -%% [ { g( cis } )f g e ] { f4 d4 } | - { \\music{ [ g( )f g e ] } \\music{ [ cis ] } } { f4 d4 } | -%%%23 -%% [ `g g ] { e4.\stemup^\tr `a4.\stemdown } d\stemup-\upbow | - [ `g g ] { e4. `a4. } d-\upbow | -%%%24 -%% { d2.^{fine} `a2. `d2.\stemup_{ }_{ }_{3 mins.}} s4 :|| -%% { \textstyle "italic" d2.^"fine" `a2. \textstyle "roman" `d2._"3 mins."} | % :|| - { d2.^"fine" `a2. `d2._"3 mins."} \bar ":|" % \bar ":||" +%%17 + < a2^"0" fis2_"3" > bes4 | +%%18 + < { [ c'( )bes c' a ] } { [ es ] } > fis4 | +%%19 + < d'4-downbow g4 `bes4 > < c'4-upbow g4 c4 > < [ bes d > a ] | +%%20 + < { [ c'( bes a )bes g( )bes ] } { [ d ] } { [ g ] } > | +%%21 + < \multivoice {\stem{1} d'4(\stem{1} ) cis'4 d'4 } { \stem{-1} g2 f4 } > | +%%22 + < { [ g( )f g e ] } { [ cis ] } > < f4 d4 > | +%%23 + [ `g g ] < e4. `a4. > d-upbow | +%%24 + < d2.^"fine" `a2. `d2._"3 mins."> \bar ":|" % \bar ":||" %% \tighten % use one line less } -score { +\score { \staff { - \melodic \music { ii_menuetto } - } - \co\mmands { - \meter {3 * 4} + \melodic \music { $ii_menuetto } } \paper { - symbol\tables { \table_sixteen } \width 195\mm \unitspace 9\mm % to get lily to use only three lines \geometric 1.4 @@ -138,6 +107,6 @@ score { } \midi { \tempo 4:120 - \output "scsii-menuetto.\midi" + \output "scsii-menuetto.midi" } } diff --git a/input/standchen.ly b/input/standchen.ly index cfd267b80d..7673bb95c1 100644 --- a/input/standchen.ly +++ b/input/standchen.ly @@ -16,7 +16,7 @@ melodie = \music { \clef\violin \key{bes} \meter{3/4}\duration{ 8 } - r\pp < [ d `a-| > f-| < d `a-| > f-| < d `a-| ] > | + r pp < [ d `a-| > f-| < d `a-| > f-| < d `a-| ] > | %%2 r < [ d `bes-| > f-| < d `bes-| > f-| < d `bes-| ] > | %%3 @@ -37,19 +37,20 @@ melodie = \music { \clef\violin f2 r4 | %%9 - < { a'4.( )g' [ g'( f' )e' ]2/3 } { cis'4. e'_"dolce" \plet{ 2/3 } e' \plet{ 1/1 } } > | + < { a'4.( )g' [ g'( f' )e' ]2/3 } + { cis'4. e'_"dolce" \plet{ 2/3 } e' \plet{ 1/1 } } > | %%10 < f'2. d'2. > | %%11 - [ a\pp( )bes a ]2/3 f'4. a | + [ a pp( )bes a ]2/3 f'4. a | %%12 [ g( ) a g ]2/3 e'4. d' | %%13 c'4. bes [ bes( ) a g ]2/3 | %%14 a2 r -% < { d'( | )c'4. g [ bes a g ]2/3 } { f\p( | )e4._"dolce" bes [ g ]2/3 } > | - < { d'( | )c'4. g [ bes a g ]2/3 } { f\p( | )e4._"dolce" bes \plet{ 2/3 } g \plet{ 1/1 } } > | + < { d'( | )c'4. g [ bes a g ]2/3 } + { f p ( | )e4._"dolce" bes \plet{ 2/3 } g \plet{ 1/1 } } > | %%16 < a2. f2. > | %%17 @@ -60,7 +61,7 @@ melodie = \music { \clef\violin [ d'8. a16 ] f4. d | %%19 %#% c'\grace\stemup - [ bes\pp( ) a bes ]2/3 d'4. bes | + [ bes pp( ) a bes ]2/3 d'4. bes | %%20 a2. | %%21 @@ -70,32 +71,38 @@ melodie = \music { \clef\violin %#% =f2. | f2. | %%23 - [ a8.\mf cis'16 ] f'4. e' | + [ a8. mf cis'16 ] f'4. e' | %%24 [ d'8. a16 ] fis4. d | %%25 - [ b\mf( ) ais b ]2/3 d'4. b | + [ b mf( ) ais b ]2/3 d'4. b | %%26 < a2. fis2. > | %%27 - [ e'\df( )dis' e' ]2/3 g'4. cis' | + [ e' df( )dis' e' ]2/3 g'4. cis' | %%28 < d'2. fis2. > | %#%\volta1 %%29 - < { bes2( [ d'8.( ))g16 ] } { g2\mf [ bes8. bes16 ] } > | + < { bes2( [ d'8.( ))g16 ] } + { g2 mf [ bes8. bes16 ] } > | %%30 - < { a4. [ a-. a-. a-. ] } { fis4. [ fis-.( fis-. )fis-. ] } > | + < { a4. [ a-. a-. a-. ] } + { fis4. [ fis-.( fis-. )fis-. ] } > | %%31 - < { a4. [ a-. a-. a-. ] } { g4. [ cis-.( e-. )g-. ] } > | + < { a4. [ a-. a-. a-. ] } + { g4. [ cis-.( e-. )g-. ] } > | %%32 - < a2 fis2\pp > < a4 fis4 > | + < a2 fis2 pp > < a4 fis4 > | %%33 - < { b2( [ d'8.( ) )g16 ] } { g2 [ b8. b16 ] } > | + < { b2( [ d'8.( ) )g16 ] } + { g2 [ b8. b16 ] } > | %%34 - < { a4. [ a-. a-. a-. ] } { fis4. [ fis-.( fis-. )fis-. ] } > | + < { a4. [ a-. a-. a-. ] } + { fis4. [ fis-.( fis-. )fis-. ] } > | %%35 - < { a4. [ a-. a-. a-. ] } { g4. [ cis-.( e-. )g-. ] } > | + < { a4. [ a-. a-. a-. ] } + { g4. [ cis-.( e-. )g-. ] } > | %%36 < a2. fis2. > | %#%\volta2 @@ -110,38 +117,41 @@ melodie = \music { \clef\violin %%40 cis'2 r4 | %%41 - < fis'4. cis'4.\df > e' [ e'( )d' cis' ]2/3 | + < fis'4. cis'4. df > e' [ e'( )d' cis' ]2/3 | %%42 [ b8. cis'16 ] d'4^> b r | %%43 - [ b8.\df cis'16 ] d'4^> b r | + [ b8. df cis'16 ] d'4^> b r | %%44 [ b8. cis'16 ] d'4^> b r | %%45 - [ b\p( )ais b ]2/3 d'4. b | + [ b p ( )ais b ]2/3 d'4. b | %%46 %#% { =a2. fis2. } | < a2. fis2. > | %%47 - [ e'\df( )dis' e' ]2/3 g'4.^> cis' | + [ e' df( )dis' e' ]2/3 g'4.^> cis' | %%48 \textstyle "italic" - < \multivoice { \stem{ 1 } fis2.( | \stem{ -1 } )f2. } { \stem{ 1 } d'2.( | \stem{ 1 } )d'4 r4_"decresc." d'4 } > + < \multivoice { \stem{ 1 } fis2.( | \stem{ -1 } )f2. } + { \stem{ 1 } d'2.( | \stem{ 1 } )d'4 r4_"decresc." d'4 } > \textstyle "roman" | %%50 < bes2. e2. > | %%51 < a2. cis2. > | %%52 - < fis2 d2 > < a4 fis4\pp > | + < fis2 d2 > < a4 fis4 pp > | %%53 < bes2 g2 > < [ d'8.^> bes8. > < bes16 g16 ] > | %%54 - < { a4. [ a-. a-. a-. ] } { fis4. [ fis-.( fis-. )fis-.] } > | + < { a4. [ a-. a-. a-. ] } + { fis4. [ fis-.( fis-. )fis-.] } > | %%55 - < { a4. [ a-. a-. a-. ] } { g4. [ cis-.( e-. )g-. ] } > | + < { a4. [ a-. a-. a-. ] } + { g4. [ cis-.( e-. )g-. ] } > | %%56 \textstyle "italic" < a2. fis2._"dim." > @@ -169,49 +179,65 @@ begeleiding = \music { %#%:| %%5 \duration{ 8 } - < \multivoice { \stem{ 1 } [ `f `a d `a d `a ] } { \stem{ -1 } `d2 r4 } > | + < \multivoice { \stem{ 1 } [ `f `a d `a d `a ] } + { \stem{ -1 } `d2 r4 } > | %%6 - < \multivoice { \stem{ 1 } [ `d `e `g `e `g `e ] } { \stem{ -1 } ``bes2 r4 } > | + < \multivoice { \stem{ 1 } [ `d `e `g `e `g `e ] } + { \stem{ -1 } ``bes2 r4 } > | %%7 - < \multivoice { \stem{ 1 } [ `cis `e `g `e `g e ] } { \stem{ -1 } ``a2 r4 } > | -%%8 - < \multivoice { \stem{ 1 } [ `d `a d `a d `a ] } { \stem{ -1 } `d2 r4 } > | + < \multivoice { \stem{ 1 } [ `cis `e `g `e `g e ] } + { \stem{ -1 } ``a2 r4 } > | + %%8 + < \multivoice { \stem{ 1 } [ `d `a d `a d `a ] } + { \stem{ -1 } `d2 r4 } > | %%9 [ `a e g e g e ] | %%10 [ `d `a d `a d `a ] | %%11 - < \multivoice { \stem{ 1 } [ `f `a d `a d `a ] } { \stem{ -1 } `d2 r4 } > | + < \multivoice { \stem{ 1 } [ `f `a d `a d `a ] } + { \stem{ -1 } `d2 r4 } > | %%12 == 6 - < \multivoice { \stem{ 1 } [ `d `e `g `e `g `e ] } { \stem{ -1 } ``bes2 r4 } > | + < \multivoice { \stem{ 1 } [ `d `e `g `e `g `e ] } + { \stem{ -1 } ``bes2 r4 } > | %13 - < \multivoice { [ `e `g `bes `g `bes `g ] } { \stem{ -1 } `c2 r4 } > | + < \multivoice { [ `e `g `bes `g `bes `g ] } + { \stem{ -1 } `c2 r4 } > | %%14 - < \multivoice { \stem{ 1 } [ `a c f c f c ] } { \stem{ -1 } `f2 r4 } > | + < \multivoice { \stem{ 1 } [ `a c f c f c ] } + { \stem{ -1 } `f2 r4 } > | %%15 [ `c `g `bes `g `bes `g ] | %%16 [ ``f `c `f `c `f `c ] | %%17 - < \multivoice { \stem{ 1 } [ ``a `e `g `e `g `e ] } { \stem{ -1 } ``a2 r4 } > | + < \multivoice { \stem{ 1 } [ ``a `e `g `e `g `e ] } + { \stem{ -1 } ``a2 r4 } > | %%18 - < \multivoice { \stem{ 1 } [ `d `a d `a d `a ] } { \stem{ -1 } `d2 r4 } > | + < \multivoice { \stem{ 1 } [ `d `a d `a d `a ] } + { \stem{ -1 } `d2 r4 } > | %%19 - < \multivoice { \stem{ 1 } [ ``bes `f `bes `f `bes `f ] } { \stem{ -1 } ``bes2 r4 } > | + < \multivoice { \stem{ 1 } [ ``bes `f `bes `f `bes `f ] } + { \stem{ -1 } ``bes2 r4 } > | %%20 - < \multivoice { \stem{ 1 } [ ``f `c `f `c `f `c ] } { \stem{ -1 } ``f2 r4 } > | + < \multivoice { \stem{ 1 } [ ``f `c `f `c `f `c ] } + { \stem{ -1 } ``f2 r4 } > | %%21 < [ `e `c > `g c `g c `g ] | %%22 [ `f `a c `a `f `c ] | %%23 - < \multivoice { \stem{ 1 } [ ``a `e `g `e `g `e ] } { \stem{ -1 } ``a2 r4 } > | + < \multivoice { \stem{ 1 } [ ``a `e `g `e `g `e ] } + { \stem{ -1 } ``a2 r4 } > | %%24 - < \multivoice { \stem{ 1 } [ `d `fis `a `fis `a `fis ] } { \stem{ -1 } `d2 r4 } > | + < \multivoice { \stem{ 1 } [ `d `fis `a `fis `a `fis ] } + { \stem{ -1 } `d2 r4 } > | %%25 - < \multivoice { \stem{ 1 } [ ``g `d `b `d `b `d ] } { \stem{ -1 } ``g2 r4 } > | + < \multivoice { \stem{ 1 } [ ``g `d `b `d `b `d ] } + { \stem{ -1 } ``g2 r4 } > | %%26 - < \multivoice { \stem{ 1 } [ `d `a d `a d `a ] } { \stem{ -1 } `d2 r4 } > | + < \multivoice { \stem{ 1 } [ `d `a d `a d `a ] } + { \stem{ -1 } `d2 r4 } > | %%27 < [ `cis ``a > `e `a `e `a `e ] | %%28 @@ -252,9 +278,11 @@ begeleiding = \music { %%44 < [ `d ``b > `fis `b `fis `b `fis ] | %%45 - < \multivoice { \stem{ 1 } [ ``g `d `b `d `b `d ] } { \stem{ -1 } ``g2 r4 } > | + < \multivoice { \stem{ 1 } [ ``g `d `b `d `b `d ] } + { \stem{ -1 } ``g2 r4 } > | %%46 - < \multivoice { \stem{ 1 } [ `d `a d `a d `a ] } { \stem{ -1 } `d2 r4 } > | + < \multivoice { \stem{ 1 } [ `d `a d `a d `a ] } + { \stem{ -1 } `d2 r4 } > | %%47 < [ `cis ``a > `e `a `e `a `e ] | %%48 @@ -421,11 +449,11 @@ tekstII= \lyrics { } % Setting up music ...lilypond: ../flower/include/cursor.inl:98: class Cursor Cursor::operator ++(int): Assertion `pointer_' failed. %IOT trap/Abort -% \music { melodie } +% als geen music in staff \staff { \melodic - \music { begeleiding } - } + \music { melodie } + } \staff { \melodic \music { begeleiding } diff --git a/input/twinkle.ly b/input/twinkle.ly index c54fdea039..14f6030cc7 100644 --- a/input/twinkle.ly +++ b/input/twinkle.ly @@ -35,7 +35,7 @@ begeleiding = \music { globalmusic=\music{ \meter {2 / 4} \skip {24*2} - \bar "||" +% \bar "||" } tekst = \lyrics { Al- tijd is Kort- jak- je ziek,2 @@ -61,7 +61,7 @@ texte = \lyrics { Ah! vous dir- ai_- je ma man2 Ce qui cau- se mon tour- ment2 Pa- pa veut que je rai- sonne2 - Co\mme un- e grand- e per- sonne2 + Comme un- e grand- e per- sonne2 Moi je dis que les bon- bons2 Val- ent mieux que la rai- son2 @@ -76,11 +76,9 @@ textI = \lyrics { Like a dia- mond in the sky.2 Twin- kle, twin- kle, lit- tle star,2 How I won- der what you are!2 - } -textII = \music { - +textII = \lyrics { \textstyle "roman" When the bla- zing sun is gone,2 When he no- thing shines up- on,2 diff --git a/lib/duration.cc b/lib/duration.cc index f737d660d1..5504ed6e35 100644 --- a/lib/duration.cc +++ b/lib/duration.cc @@ -78,11 +78,6 @@ Plet::Plet( int iso_i, int type_i ) type_i_ = type_i; } -Plet::Plet( Plet const& plet_c_r ) -{ - iso_i_ = plet_c_r.iso_i_; - type_i_ = plet_c_r.type_i_; -} // statics Duration_convert bool Duration_convert::be_blonde_b_s = false; diff --git a/lib/include/duration.hh b/lib/include/duration.hh index c642ce6eda..5c56285954 100644 --- a/lib/include/duration.hh +++ b/lib/include/duration.hh @@ -27,7 +27,6 @@ struct Duration { void set_ticks( int ticks_i ); static int division_1_i_s; -// int i_; // balltype -> type! int type_i_; int dots_i_; Plet* plet_p_; @@ -37,10 +36,8 @@ struct Duration { /// (plet) struct Plet { Plet( int replace_i, int type_i ); - Plet( Plet const& plet_c_r ); - -// int i_; - int iso_i_; // 2/3; 2 is not duration, maar of count! + + int iso_i_; // 2/3; 2 is not duration, maar of count! int type_i_; }; diff --git a/lily/.version b/lily/.version index 04e19c9ac8..0ae4d984d1 100644 --- a/lily/.version +++ b/lily/.version @@ -1,8 +1,8 @@ MAJOR_VERSION = 0 MINOR_VERSION = 0 -PATCH_LEVEL = 42 +PATCH_LEVEL = 43 # use to send patches, always empty for released version: # include separator: ".postfix", "-pl" makes rpm barf -MY_PATCH_LEVEL =.2 +MY_PATCH_LEVEL = # diff --git a/lily/Makefile b/lily/Makefile index 1bc1595cc5..cb49063ad6 100644 --- a/lily/Makefile +++ b/lily/Makefile @@ -68,7 +68,7 @@ include ./$(depth)/make/Rules.make # # force these: Make can't know these have to be generated in advance -mylexer.cc: $(outdir)/parser.hh +my-lily-lexer.cc: $(outdir)/parser.hh lexer.l: $(outdir)/parser.hh # diff --git a/lily/command-request.cc b/lily/command-request.cc index 7e33d78a9d..92e7097c43 100644 --- a/lily/command-request.cc +++ b/lily/command-request.cc @@ -124,6 +124,16 @@ Measure_grouping_req::do_print() const } } /* *************** */ + +void +Key_change_req::transpose(Melodic_req const & d)const +{ + WARN << "don't know how to transpose a key. \n"; + for (int i=0; i < melodic_p_arr_.size(); i++) { + melodic_p_arr_[i]->transpose(d); + } +} + void Key_change_req::do_print() const { diff --git a/lily/identifier.cc b/lily/identifier.cc index c3de1d3987..0eab514cb5 100644 --- a/lily/identifier.cc +++ b/lily/identifier.cc @@ -9,7 +9,7 @@ #include #include "identifier.hh" -#include "lexer.hh" +#include "my-lily-lexer.hh" #include "debug.hh" #include "input-score.hh" @@ -28,6 +28,16 @@ Identifier::error(String expect) ::error(e); } +Identifier::Identifier(String n, int code) + : name(n) +{ + token_code_i_ = code; + data = 0; + accessed_b_ = 0; + init_b_ = 0; + defined_ch_C_ = 0; +} + void Identifier::print()const { @@ -65,9 +75,10 @@ char const * Idclass::classname() const\ }\ Class*\ Idclass::accessor(bool copy) {\ - if (copy)\ + if (copy){ \ + accessed_b_ = true;\ return new Class(* (Class*) data);\ - else\ + }else\ return (Class*) data;\ }\ Idclass::~Idclass() { delete accessor(false); }\ diff --git a/lily/include/command-request.hh b/lily/include/command-request.hh index 3d5a1eb18d..f32dbea2fd 100644 --- a/lily/include/command-request.hh +++ b/lily/include/command-request.hh @@ -101,7 +101,7 @@ struct Group_feature_req : Command_req { struct Key_change_req : Command_req { Array melodic_p_arr_; - + virtual void transpose(Melodic_req const &)const; Key_change_req(); Key_change_req(Key_change_req const&); ~Key_change_req(); diff --git a/lily/include/identifier.hh b/lily/include/identifier.hh index 812d1fe71f..2baf529b49 100644 --- a/lily/include/identifier.hh +++ b/lily/include/identifier.hh @@ -18,9 +18,12 @@ struct Identifier { void *data; String name; + bool init_b_; + bool accessed_b_; int token_code_i_; - - Identifier(String n, int code) : name(n) { token_code_i_ = code; } + char const *defined_ch_C_; + + Identifier(String n, int code) ; virtual ~Identifier() {} void print()const; diff --git a/lily/include/input-music.hh b/lily/include/input-music.hh index 7a35bbfd19..36ca215f67 100644 --- a/lily/include/input-music.hh +++ b/lily/include/input-music.hh @@ -37,7 +37,7 @@ struct Input_music { virtual void set_default_group(String)=0; virtual bool find_plet_start_bo(char c, Moment& moment_r) = 0; virtual void set_plet_backwards(Moment& now_moment_r, Moment until_moment, int num_i, int den_i) = 0; - // virtual void transpose(...) const =0; + virtual void transpose(Melodic_req const&) const =0; virtual Input_music *clone() const = 0; @@ -49,6 +49,8 @@ struct Simple_music : Input_music { Voice voice_; /* *** */ + virtual void transpose(Melodic_req const&) const ; + virtual Simple_music*simple() { return this; } void add(Voice_element*); virtual void set_default_group(String g) { voice_.set_default_group(g); } @@ -67,6 +69,7 @@ struct Simple_music : Input_music { struct Complex_music : Input_music { IPointerList elts; /* *************** */ + virtual void transpose(Melodic_req const&) const ; virtual void set_default_group(String g); void add(Input_music*); Complex_music(); diff --git a/lily/include/musical-request.hh b/lily/include/musical-request.hh index 1ad791de40..761efce6bd 100644 --- a/lily/include/musical-request.hh +++ b/lily/include/musical-request.hh @@ -96,9 +96,11 @@ struct Melodic_req :virtual Musical_req /// 0 natural, 1 sharp, etc int accidental_i_; - /// return height from central c (in halflines) - int height()const; + int height()const; + + /// transpose. #delta# is relative to central c. + void transpose(Melodic_req const &delta); /// return pitch from central c (in halfnotes) int pitch()const; Melodic_req(); diff --git a/lily/include/lexer.hh b/lily/include/my-lily-lexer.hh similarity index 79% rename from lily/include/lexer.hh rename to lily/include/my-lily-lexer.hh index 08faa553f8..c3f2bfa388 100644 --- a/lily/include/lexer.hh +++ b/lily/include/my-lily-lexer.hh @@ -1,5 +1,5 @@ /* - lexer.hh -- declare My_flex_lexer + lexer.hh -- declare My_lily_lexer source file of the LilyPond music typesetter @@ -38,7 +38,13 @@ struct Lexer_prefs { }; /// lexer with provisions for include files. -struct My_flex_lexer : yyFlexLexer { +class My_lily_lexer : public yyFlexLexer { + int lookup_keyword(String); + void lookup_notename(int &large, int &small, String s); + int scan_bare_word(String); + int scan_escaped_word(String); + +public: Lexer_prefs prefs; Array include_stack_; @@ -48,25 +54,26 @@ struct My_flex_lexer : yyFlexLexer { /* *************** */ + Identifier*lookup_identifier(String s); char const* here_ch_c_l(); - int lookup_keyword(String); - void lookup_notename(int &large, int &small, String s); - + void push_note_state(); void push_lyric_state(); void pop_state(); void LexerError(char const *); String spot() const; - Identifier*lookup_identifier(String s); - My_flex_lexer(); + My_lily_lexer(); void add_identifier(Identifier*i); - ~My_flex_lexer(); + ~My_lily_lexer(); void new_input(String s); bool close_input(); int yylex(); - void print_declarations() const; + void print_init_declarations() const; + void print_user_declarations() const; + bool note_state_b() const; + bool lyric_state_b() const; }; -extern My_flex_lexer *lexer; +extern My_lily_lexer *lexer; #endif diff --git a/lily/include/request.hh b/lily/include/request.hh index 1936d5a2ab..6e9bfd4df2 100644 --- a/lily/include/request.hh +++ b/lily/include/request.hh @@ -35,6 +35,7 @@ public: virtual Request* clone() const { return new Request(*this); } void print()const ; + virtual void transpose(Melodic_req const &){} virtual Moment duration() const { return 0; } /* accessors for children diff --git a/lily/include/voice-element.hh b/lily/include/voice-element.hh index be54ac401b..cf398bc9b6 100644 --- a/lily/include/voice-element.hh +++ b/lily/include/voice-element.hh @@ -23,7 +23,7 @@ struct Voice_element { IPointerList reqs; /* *************** */ - + void transpose(Melodic_req const &)const; Voice_element(); Voice_element(Voice_element const & src ); diff --git a/lily/include/voice.hh b/lily/include/voice.hh index ccdff1f626..4e7e615693 100644 --- a/lily/include/voice.hh +++ b/lily/include/voice.hh @@ -24,7 +24,7 @@ struct Voice { Moment when(Voice_element const *)const; Moment last() const; - + void transpose(Melodic_req const &)const; void add(Voice_element*); bool find_plet_start_bo(char c, Moment& moment_r); void print() const; diff --git a/lily/input-music.cc b/lily/input-music.cc index 8ccc9071b8..5c8aa72472 100644 --- a/lily/input-music.cc +++ b/lily/input-music.cc @@ -21,6 +21,12 @@ Input_music::check_plet(Voice_element* velt_l) } } +void +Simple_music::transpose(Melodic_req const &d)const +{ + voice_.transpose(d); +} + void Simple_music::add(Voice_element*v) { @@ -67,6 +73,12 @@ Simple_music::set_plet_backwards(Moment& now_moment_r, Moment until_moment, int /* *************** */ +void +Complex_music::transpose(Melodic_req const& d) const +{ + for (iter_top(elts,i); i.ok(); i++) + i->transpose(d); +} void Complex_music::add(Input_music*v) { diff --git a/lily/input-staff.cc b/lily/input-staff.cc index 678ff2f16b..2d42e2a1ba 100644 --- a/lily/input-staff.cc +++ b/lily/input-staff.cc @@ -14,7 +14,7 @@ #include "complex-staff.hh" #include "lyric-staff.hh" -#include "lexer.hh" +#include "my-lily-lexer.hh" Input_staff::Input_staff(String s) diff --git a/lily/keyword.cc b/lily/keyword.cc index 2ccb446e27..965630964e 100644 --- a/lily/keyword.cc +++ b/lily/keyword.cc @@ -5,7 +5,7 @@ #include #include "glob.hh" -#include "lexer.hh" +#include "my-lily-lexer.hh" //#include "mudobs.hh" //#include "gram.hh" diff --git a/lily/lexer.l b/lily/lexer.l index 8e9d503536..549a957efd 100644 --- a/lily/lexer.l +++ b/lily/lexer.l @@ -4,7 +4,7 @@ #include "string.hh" #include "string-convert.hh" -#include "lexer.hh" +#include "my-lily-lexer.hh" #include "varray.hh" #include "parser.hh" #include "debug.hh" @@ -25,13 +25,13 @@ %option nodefault %option yylineno %option debug -%option yyclass="My_flex_lexer" +%option yyclass="My_lily_lexer" %option stack -%x notes %x incl -%x quote %x lyrics +%x notes +%x quote @@ -48,23 +48,27 @@ WORD {A}{AN}* ALPHAWORD {A}+ INT -?{N}+ REAL {INT}?(\.{N}*)? - -RESTNAME r|s|p +KEYWORD \\{WORD} +WHITE [ \n\t\f] +BLACK [^ \n\t\f] +RESTNAME r NOTECOMMAND \\{WORD} DOTS \.+ -LYRICS {TEX}+ +LYRICS {AA}[^0-9 \t\n\f]* COMMENT %.*\n %% +{COMMENT} { +} -include { +^include { yy_push_state(incl); } -[ \t]* { /* eat the whitespace */ } -\"[^"]*\"+ { /* got the include file name */ +{WHITE}* { /* eat the whitespace */ } +\"[^"]*\" { /* got the include file name */ String s (YYText()+1); s = s.left_str(s.length_i()-1); defined_ch_c_l = here_ch_c_l() - String( YYText() ).length_i() - 1; @@ -78,28 +82,23 @@ include { mtor << "rest:"<< yylval.string; return RESTNAME; } -{ALPHAWORD} { - String str = YYText(); - mtor << "word: `" << str<< "'\n"; - Identifier * id = lookup_identifier(str); - if (id) { - yylval.id = id; - return id->token_code_i_; - } +\$\\{BLACK}*{WHITE} { + String s=YYText() + 2; + s=s.left_str(s.length_i() - 1); + return scan_escaped_word(s); +} +\${BLACK}*{WHITE} { + String s=YYText() + 1; + s=s.left_str(s.length_i() - 1); + return scan_bare_word(s); +} +{ALPHAWORD} { + return scan_bare_word(YYText()); - yylval.string=new String( str ); - return STRING; } -{NOTECOMMAND} { - String c = YYText() +1; - mtor << "\\word: `" << YYText()+1<<"'\n"; - int l = lookup_keyword(c); - if (l != -1) - return l; - - String *sp = new String( c); - yylval.string=sp; - return STRING; + +{NOTECOMMAND} { + return scan_escaped_word(YYText()+1); } {DOTS} { @@ -110,8 +109,6 @@ include { yylval.i = String_convert::dec2_i( String( YYText() ) ); return INT; } -{COMMENT} { -} [ \t\n]+ { } @@ -129,6 +126,9 @@ include { \" { start_quote(); } +\\\" { + *yylval.string +='\"'; +} [^"]+ { *yylval.string += YYText(); } @@ -150,30 +150,7 @@ include { return INT; } {NOTECOMMAND} { - String c = YYText() +1; - mtor << "\\word: `" << YYText()+1<<"'\n"; - int l = lookup_keyword(c); - if (l != -1) - return l; - -/* let's try passing tex's typesetting macros like \ss \alpha \c */ - String* str_p = new String(YYText()); - yylval.string=str_p; - mtor << "\\word: `" << *str_p << "'\n"; - return STRING; - -/* and skip identifiers... - Identifier * id = lookup_identifier(c); - if (id) { - yylval.id = id; - return IDENTIFIER; - } - String *sp = new String( c); - - yylval.string=sp; - - return STRING; -*/ + return scan_escaped_word(YYText()+1); } {LYRICS} { /* ugr. This sux. */ @@ -192,9 +169,6 @@ include { } \| { return YYText()[0]; -} -{COMMENT} { - } [{}] { return YYText()[0]; @@ -211,6 +185,12 @@ include { if (! close_input()) yyterminate(); // can't move this, since it actually rets a YY_NULL } +{WORD} { + return scan_bare_word(YYText()); +} +{KEYWORD} { + return scan_escaped_word(YYText()+1); +} {REAL} { Real r; int cnv=sscanf (YYText(), "%lf", &r); @@ -245,18 +225,58 @@ include { %% void -My_flex_lexer::push_note_state() +My_lily_lexer::push_note_state() { yy_push_state(notes); } void -My_flex_lexer::push_lyric_state() +My_lily_lexer::push_lyric_state() { yy_push_state(lyrics); } void -My_flex_lexer::pop_state() +My_lily_lexer::pop_state() { yy_pop_state(); } + +int +My_lily_lexer::scan_escaped_word(String str) +{ + mtor << "\\word: `" << str<<"'\n"; + int l = lookup_keyword(str); + if (l != -1) { + mtor << "(keyword)\n"; + return l; + } + String *sp = new String( str); + yylval.string=sp; + return STRING; +} +int +My_lily_lexer::scan_bare_word(String str) +{ + mtor << "word: `" << str<< "'\n"; + Identifier * id = lookup_identifier(str); + if (id) { + mtor << "(identifier)\n"; + yylval.id = id; + return id->token_code_i_; + } + + yylval.string=new String( str ); + return STRING; +} + +bool +My_lily_lexer::note_state_b() const +{ + return YY_START == notes; +} + +bool +My_lily_lexer::lyric_state_b() const +{ + return YY_START == lyrics; +} diff --git a/lily/lexerinit.cc b/lily/lexerinit.cc index 2eb9ed4e50..c118bbe229 100644 --- a/lily/lexerinit.cc +++ b/lily/lexerinit.cc @@ -10,13 +10,13 @@ #include #include "proto.hh" #include "plist.hh" -#include "lexer.hh" +#include "my-lily-lexer.hh" #include "debug.hh" #include "main.hh" #include "source-file.hh" #include "source.hh" -My_flex_lexer *lexer=0; +My_lily_lexer *lexer=0; int yylex() { diff --git a/lily/musical-request.cc b/lily/musical-request.cc index bf1b56c44c..597a60ac76 100644 --- a/lily/musical-request.cc +++ b/lily/musical-request.cc @@ -91,6 +91,22 @@ Melodic_req::Melodic_req() accidental_i_ = 0; } +void +Melodic_req::transpose(Melodic_req const & delta) +{ + octave_i_ += delta.octave_i_; + notename_i_ += delta.notename_i_; + while (notename_i_ >= 7 ) { + notename_i_ -= 7; + octave_i_ ++; + } + accidental_i_ += delta.accidental_i_; + if (abs(accidental_i_) > 2) { + warning("transposition makes accidental larger than 2", + delta.defined_ch_c_l_); + } +} + void Melodic_req::do_print() const { diff --git a/lily/mylexer.cc b/lily/my-lily-lexer.cc similarity index 78% rename from lily/mylexer.cc rename to lily/my-lily-lexer.cc index 265e02b126..8c02f127b8 100644 --- a/lily/mylexer.cc +++ b/lily/my-lily-lexer.cc @@ -3,14 +3,12 @@ #include "interval.hh" #include "identifier.hh" #include "assoc-iter.hh" -#include "lexer.hh" #include "input-file.hh" #include "out/parser.hh" #include "keyword.hh" #include "assoc.hh" -#include "lexer.hh" +#include "my-lily-lexer.hh" #include "debug.hh" - #include "source-file.hh" #include "parseconstruct.hh" @@ -19,12 +17,9 @@ static Keyword_ent the_key_tab[]={ "cadenza", CADENZA, "clef", CLEF, "cm", CM_T, - "command", COMMAND, - "commands", COMMANDS, "duration", DURATIONCOMMAND, "dynamic", DYNAMIC, "geometric", GEOMETRIC, - "goto", GOTO, "in", IN_T, "lyrics", LYRICS, "key", KEY, @@ -50,16 +45,15 @@ static Keyword_ent the_key_tab[]={ "tempo", TEMPO, "texid", TEXID, "textstyle", TEXTSTYLE, + "transpose", TRANSPOSE, "unitspace", UNITSPACE, - "voice", VOICE, - "voices", VOICES, "width", WIDTH, "music", MUSIC, "grouping", GROUPING, 0,0 }; -My_flex_lexer::My_flex_lexer() +My_lily_lexer::My_lily_lexer() { keytable_p_ = new Keyword_table(the_key_tab); identifier_assoc_p_ = new Assoc; @@ -67,13 +61,13 @@ My_flex_lexer::My_flex_lexer() } int -My_flex_lexer::lookup_keyword(String s) +My_lily_lexer::lookup_keyword(String s) { return keytable_p_->lookup(s); } Identifier* -My_flex_lexer::lookup_identifier(String s) +My_lily_lexer::lookup_identifier(String s) { if (!identifier_assoc_p_->elt_query(s)) return 0; @@ -82,45 +76,59 @@ My_flex_lexer::lookup_identifier(String s) } char const* -My_flex_lexer::here_ch_c_l() +My_lily_lexer::here_ch_c_l() { return include_stack_.top()->sourcefile_l_->ch_c_l() + yyin->tellg(); } void -My_flex_lexer::add_identifier(Identifier*i) +My_lily_lexer::add_identifier(Identifier*i) { delete lookup_identifier(i->name); (*identifier_assoc_p_)[i->name] = i; } -My_flex_lexer::~My_flex_lexer() +My_lily_lexer::~My_lily_lexer() { delete keytable_p_; for (Assoc_iter ai(*identifier_assoc_p_); ai.ok(); ai++) { mtor << "deleting: " << ai.key()<<'\n'; + Identifier *i_p = ai.val(); + if (!i_p->accessed_b_ && !i_p->init_b_) + warning("Variable not used", i_p->defined_ch_C_); + delete ai.val(); } delete identifier_assoc_p_; } void -My_flex_lexer::print_declarations()const +My_lily_lexer::print_init_declarations()const +{ + for (Assoc_iter ai(*identifier_assoc_p_); ai.ok(); + ai++) { + if (ai.val()->init_b_) + ai.val()->print(); + } +} +void +My_lily_lexer::print_user_declarations()const { for (Assoc_iter ai(*identifier_assoc_p_); ai.ok(); ai++) { - ai.val()->print(); + if (!ai.val()->init_b_) + ai.val()->print(); } } String -My_flex_lexer::spot()const +My_lily_lexer::spot()const { return include_stack_.top()->name + ": " + String( lineno() ); } void -My_flex_lexer::LexerError(char const *s) +My_lily_lexer::LexerError(char const *s) { if (lexer->include_stack_.empty()) { *mlog << "error at EOF" << s << '\n'; @@ -139,7 +147,7 @@ My_flex_lexer::LexerError(char const *s) // set the new input to s, remember old file. void -My_flex_lexer::new_input(String s) +My_lily_lexer::new_input(String s) { if (!include_stack_.empty()) { include_stack_.top()->line = lineno(); @@ -156,7 +164,7 @@ My_flex_lexer::new_input(String s) // pop the inputstack. bool -My_flex_lexer::close_input() +My_lily_lexer::close_input() { Input_file *old = include_stack_.pop(); bool ok = true; diff --git a/lily/note.cc b/lily/note.cc index 543ef6130c..9c26c57f08 100644 --- a/lily/note.cc +++ b/lily/note.cc @@ -2,7 +2,7 @@ could use cleanup */ #include -#include "lexer.hh" +#include "my-lily-lexer.hh" #include "string.hh" #include "real.hh" #include "debug.hh" diff --git a/lily/parser.y b/lily/parser.y index a5110d97ca..d5d53de1d1 100644 --- a/lily/parser.y +++ b/lily/parser.y @@ -4,7 +4,7 @@ #include "symtable.hh" #include "lookup.hh" #include "misc.hh" -#include "lexer.hh" +#include "my-lily-lexer.hh" #include "paper-def.hh" #include "midi-def.hh" #include "main.hh" @@ -30,7 +30,7 @@ Paper_def*default_paper(); char const* defined_ch_c_l; char const* req_defined_ch_c_l; int fatal_error_i = 0; - +bool init_parse_b; %} @@ -72,14 +72,11 @@ int fatal_error_i = 0; %token CADENZA %token CLEF %token CM_T -%token COMMAND -%token COMMANDS %token CONCAT %token DURATIONCOMMAND %token DYNAMIC %token END %token GEOMETRIC -%token GOTO %token GROUPING %token IN_T %token LYRICS @@ -104,14 +101,12 @@ int fatal_error_i = 0; %token STEM %token SYMBOLTABLES %token TABLE -%token TABLE +%token TRANSPOSE %token TEMPO %token TEXID %token TEXTSTYLE %token TITLE %token UNITSPACE -%token VOICE -%token VOICES %token WIDTH %token DOTS @@ -143,14 +138,14 @@ int fatal_error_i = 0; %type dinterval %type intastint_list %type symtables symtables_body -%type melodic_request +%type melodic_request steno_melodic_req %type steno_note_req %type pitch_list %type midi_block midi_body %type duration_length -%type music init_music -%type music_voice_body music_voice init_music_voice init_lyrics_voice - +%type init_music +%type transposed_music_voice init_lyrics_voice +%type music_voice_body music_voice init_music_voice %type paper_block paper_body %type dim real %type unit @@ -167,7 +162,7 @@ int fatal_error_i = 0; %left PRIORITY -%expect 2 /* have to fix this. */ +%expect 1 /* have to fix this. */ %% @@ -184,16 +179,23 @@ mudela: /* empty */ */ add_declaration: declaration { lexer->add_identifier($1); + $1->init_b_ = init_parse_b; + $1->defined_ch_C_ = define_spots.pop(); } ; declarable_identifier: - STRING { $$ = $1; - if (lexer->lookup_identifier(*$1)) + STRING { + define_spots.push(lexer->here_ch_c_l()); + $$ = $1; + if (lexer->lookup_identifier(*$1)) warning("redeclaration of `" + *$1 + "'", lexer->here_ch_c_l()); } - | IDENTIFIER { $$ = new String($1->name); } + | IDENTIFIER { + define_spots.push(lexer->here_ch_c_l()); + $$ = new String($1->name); + } ; declaration: @@ -257,7 +259,6 @@ score_block: /* handle error levels. */ $$->errorlevel_i_ = lexer->errorlevel_i_; lexer->errorlevel_i_ = 0; - } ; @@ -392,12 +393,21 @@ init_music_chord: /* MUSIC */ -music: - music_voice { $$ = $1; } - | music_chord { $$ = $1; } + + + +transposed_music_voice: + steno_melodic_req music_voice { + $$ = $2; + $$->transpose(*$1); + delete $1; + } ; music_voice: '{' music_voice_body '}' { $$ = $2; } + | TRANSPOSE '{' transposed_music_voice '}' { + $$ = $3; + } ; music_voice_body: @@ -412,13 +422,17 @@ music_voice_body: } | music_voice_body voice_command { } - | music_voice_body music { + | music_voice_body music_chord { $$->add($2); } + | music_voice_body CONCAT music_voice { + $$->add($3);/* niet echt */ + } | music_voice_body error { } | music_voice_body '>' { - error("Confused by earlier errors: bailing out"); + fatal_error_i = 1; + yyerror("Confused by errors: bailing out"); }; music_chord: '<' music_chord_body '>' { $$ = $2; } @@ -434,14 +448,15 @@ music_chord_body: | MULTIVOICE { $$ = new Multi_voice_chord; } - | music_chord_body music { + | music_chord_body music_voice { $$->add($2); } | music_chord_body full_element { $$ ->add_elt($2); } | music_chord_body '}' { - error("Confused by earlier errors: bailing out"); + fatal_error_i = 1; + yyerror("Confused by errors: bailing out"); } | music_chord_body error { } @@ -571,23 +586,30 @@ octave_quotes: /* URG!! */ -steno_note_req: +steno_melodic_req: MELODIC_REQUEST_IDENTIFIER { - $$ = new Note_req; - * (Melodic_req *) $$ = *$1->request(false)->melodic(); + $$ = $1->request(false)->clone()->melodic(); $$->octave_i_ += lexer->prefs.default_octave_i_; } - | steno_note_req '\'' { + | steno_melodic_req '\'' { $$-> octave_i_ ++; } - | '`' steno_note_req { + | '`' steno_melodic_req { $$ = $2; $2-> octave_i_ --; } - + ; + +steno_note_req: + steno_melodic_req { + $$ = new Note_req; + * (Melodic_req *) $$ = *$1; + delete $1; + } | steno_note_req '!' { $$->forceacc_b_ = ! $$->forceacc_b_; } + /* have to duration here. */ ; melodic_request: @@ -781,6 +803,8 @@ default_duration: voice_elt: steno_note_req notemode_duration { + if (!lexer->note_state_b()) + yyerror("have to be in Note mode for notes"); $$ = get_note_element($1, $2); } | RESTNAME notemode_duration { @@ -791,7 +815,10 @@ voice_elt: lyrics_elt: mudela_text notemode_duration { + if (!lexer->lyric_state_b()) + yyerror("Have to be in Lyric mode for lyrics"); $$ = get_word_element($1, $2); + }; /* @@ -809,7 +836,7 @@ int: real { $$ = int($1); if ( distance($1,Real(int($$)) ) > 1e-8) - error( "integer expected", lexer->here_ch_c_l() ); + yyerror( "integer expected" ); } ; @@ -916,29 +943,30 @@ void parse_file(String init, String s) { *mlog << "Parsing ... "; - lexer = new My_flex_lexer; + lexer = new My_lily_lexer; #ifndef NPRINT yydebug = !monitor->silence("InitParser") && check_debug; lexer->set_debug( !monitor->silence("InitLexer") && check_debug); #endif - + init_parse_b = true; lexer->new_input(init); yyparse(); #ifndef NPRINT if (!monitor->silence("InitDeclarations") && check_debug) - lexer->print_declarations(); + lexer->print_init_declarations(); yydebug = !monitor->silence("Parser") && check_debug; lexer->set_debug( !monitor->silence("Lexer") && check_debug); #endif - + init_parse_b = false; lexer->new_input(s); yyparse(); + #ifdef NPRINT if (!monitor->silence("Declarations") && check_debug) - lexer->print_declarations(); + lexer->print_user_declarations(); #endif delete lexer; lexer = 0; @@ -951,7 +979,7 @@ Paper_def* default_paper() { return new Paper_def( - lexer->lookup_identifier("defaulttable")->lookup(true)); + lexer->lookup_identifier("default_table")->lookup(true)); } diff --git a/lily/voice-elt.cc b/lily/voice-elt.cc index f244327c5f..5b59242c75 100644 --- a/lily/voice-elt.cc +++ b/lily/voice-elt.cc @@ -1,5 +1,5 @@ /* - voiceelt.cc -- implement Voice_element + voice-elt.cc -- implement Voice_element source file of the LilyPond music typesetter @@ -15,6 +15,14 @@ #include "command-request.hh" +void +Voice_element::transpose(Melodic_req const&d)const +{ + for (iter_top(reqs,i); i.ok(); i++) { + i->transpose(d); + } +} + void Voice_element::print() const { diff --git a/lily/voice.cc b/lily/voice.cc index 47e9e28378..2294d57b2e 100644 --- a/lily/voice.cc +++ b/lily/voice.cc @@ -16,6 +16,13 @@ #include "midi-stream.hh" #include "voice-element.hh" +void +Voice::transpose(Melodic_req const & d)const +{ + for (iter_bot(elts, i); i.ok(); i--) + i->transpose(d); +} + void Voice::set_default_group(String s) { diff --git a/lily/warn.cc b/lily/warn.cc index 0db10f848e..4fe33452cc 100644 --- a/lily/warn.cc +++ b/lily/warn.cc @@ -1,7 +1,7 @@ #include "proto.hh" #include "plist.hh" #include "debug.hh" -#include "lexer.hh" +#include "my-lily-lexer.hh" #include "moment.hh" #include "time-description.hh" #include "source-file.hh" diff --git a/make/Variables.make b/make/Variables.make index 7e8ff5a830..8c54e9fba0 100644 --- a/make/Variables.make +++ b/make/Variables.make @@ -53,6 +53,9 @@ BUILD = $(shell cat $(build)) INCREASE_BUILD = echo `expr \`cat $(build)\` + 1` > .b; mv .b $(build) # +# ugh, for win32 make +export CXX + # the version: # VERSION=$(MAJOR_VERSION).$(MINOR_VERSION).$(PATCH_LEVEL)$(MY_PATCH_LEVEL) -- 2.39.5