From: fred Date: Tue, 26 Mar 2002 21:27:25 +0000 (+0000) Subject: lilypond-1.0.15 X-Git-Tag: release/1.5.59~2842 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=60df312691d7c93183f2ba7706bad2c1a766be33;p=lilypond.git lilypond-1.0.15 --- diff --git a/Documentation/tex/refman.yo b/Documentation/tex/refman.yo index 7bd5053e33..96983f7f35 100644 --- a/Documentation/tex/refman.yo +++ b/Documentation/tex/refman.yo @@ -289,10 +289,10 @@ code(\notes). In Note mode, words can only contain alphabetic characters. If code(word) is encountered, LilyPond first checks for a notename of code(word). If no notename is found, then code(word) is treated as a string. If you mistype a notename, the parser will most -likely complain that you should be in code(\lyric) mode to do lyrics. +likely complain that you should be in code(\lyrics) mode to do lyrics. dit(Lyric mode) Lyrics mode is introduced by the keyword -code(\lyric). This mode is has rules that make it easy to include +code(\lyrics). This mode is has rules that make it easy to include punctuation and diacritical marks in words. A word in Lyrics mode begins with: an alphabetic character, code(_), code(?), code(!), code(:), code('), @@ -513,7 +513,7 @@ mudela()( c''-\trill c''-\prall c''-\mordent c''-\prallprall c''-\prallmordent c''-\upprall c''-\downprall } - \type Lyrics \lyric{ + \type Lyrics \lyrics{ accent marcato staccatissimo fermata stopped staccato tenuto upbow downbow lheel rheel ltoe rtoe turn open flageolet reverseturn @@ -676,7 +676,7 @@ See Section ref(modes) for a description of what is interpreted as a lyric. In order to instruct LilyPond to write lyrics underneath the staff, you must enter the lyrics context with code(\type Lyrics). -Lyrics should be entered in lyrics mode which is entered with code(\lyric). +Lyrics should be entered in lyrics mode which is entered with code(\lyrics). Spaces can be introduced into a lyric either by using quotes (code(")) or by using an underscore without quotes: code(He_could4 not4). All @@ -684,7 +684,7 @@ unquoted underscores are converted to spaces. Here is a full example: mudela(verbatim)(\score{ < \notes \transpose c'' {c d e c | c d e c | e f g'2 | e'4 f g'2 \bar "|."; } - \type Lyrics \lyric { + \type Lyrics \lyrics { DOEXPAND(Fr\)`e-4 re Ja- que DOEXPAND(Fr\)`e- re Ja- que Dor- mez vous?2 Dor-4 mez vous?2 } > @@ -939,7 +939,7 @@ dit(code(\keysignature) var(pitchseq);) Specify an arbitrary key signature. The pitches from var(pitch) will be printed in the key signature in the order that they appear on the list. -dit(code(\lyric) var(lyriclist)) Parse var(lyriclist) in lyrics mode. +dit(code(\lyrics) var(lyriclist)) Parse var(lyriclist) in lyrics mode. dit(code(\maininput)) Internal command. This command is used for creating init files like file(init.fly) that read the user file into the middle of another diff --git a/Documentation/tex/tutorial.yo b/Documentation/tex/tutorial.yo index b213777cb9..02bdaaf9a3 100644 --- a/Documentation/tex/tutorial.yo +++ b/Documentation/tex/tutorial.yo @@ -1297,12 +1297,12 @@ Lyrics consist of syllables, which are strings together with durations. Previously we only entered note names, so for entering lyrics we have to instruct LilyPond that what we enter are not note names but words---or rather: strings. This instruction is the keyword -code(\lyric). After entering this keyword you can enter a musical +code(\lyrics). After entering this keyword you can enter a musical construct---sequential music, simultaneous music, code(\type) entries, etc.--- but with syllables in stead of pitches. For example: -verb( \lyric { 'got8 me on my knees4, Le-8 lie! }) +verb( \lyrics { 'got8 me on my knees4, Le-8 lie! }) -The effect of code(\lyric) can be compared with the effect of the +The effect of code(\lyrics) can be compared with the effect of the doublequote character, code("), for it also changes the lexical meaning of spaces and characters. This mode is another example of a handy input feature of the language. @@ -1316,14 +1316,14 @@ by a context called code(Lyrics). You can select this context with the code(\type) keyword. Here is a simple example: mudela(fragment,verbatim)( - \type Lyrics \lyric { 'got8 me on my knees,4 Le-8 lie! }) + \type Lyrics \lyrics { 'got8 me on my knees,4 Le-8 lie! }) The result is technically more or less correct, but without a melody it just doesn't work, so let's add a blob of cream: mudela(fragment,verbatim)( < \type Staff { c''8. c''16 bes'8. a'16 g'4 f'8 g'4. } - \type Lyrics \lyric { 'got8. me16 on8. my16 knees,4 Le-8 lie!4. } + \type Lyrics \lyrics { 'got8. me16 on8. my16 knees,4 Le-8 lie!4. } > ) @@ -1340,13 +1340,13 @@ underscore instead of a space. All these tricks are demonstrated in the following example: COMMENT( urg -\type Lyrics \lyric { 'got_m\textbf{e}4 on8. m$\cal_Y$16 knees,4 Le-8 lie!4.} -\type Lyrics \lyric { 'got_m{\bf e}4 on8. m$\cal_Y$16 knees,4 Le-8 lie!4.} +\type Lyrics \lyrics { 'got_m\textbf{e}4 on8. m$\cal_Y$16 knees,4 Le-8 lie!4.} +\type Lyrics \lyrics { 'got_m{\bf e}4 on8. m$\cal_Y$16 knees,4 Le-8 lie!4.} ) mudela(fragment,verbatim)(< \type Staff { c''8. c''16 bes'8. a'16 g'4 f'8 g'4. } - \type Lyrics \lyric { 'got_me4 on8. m$\cal_Y$16 "3s,"4 Le-8 lie!4.} + \type Lyrics \lyrics { 'got_me4 on8. m$\cal_Y$16 "3s,"4 Le-8 lie!4.} > ) @@ -1396,7 +1396,7 @@ code(\paper) definition is copied from a default definition The paper part also contains the definition of the contexts. -The keyword code(\notes) is analogous to the code(\lyric) keyword. It +The keyword code(\notes) is analogous to the code(\lyrics) keyword. It will switch the tokenizer into a mode that interprets plain words as note names. If it can't recognize the words as a note name, it will assume that they are strings. That is the reason why you can write diff --git a/TODO b/TODO index 275774c463..8adbc8d1da 100644 --- a/TODO +++ b/TODO @@ -9,23 +9,17 @@ grep for TODO and ugh/ugr/urg BUGS: + + + * formatting of input stuff. - + - > \notes{ a \< b \cr } - > - > work but - > - > \notes{ a \< b \! } - > - > give a parse error? + * use real RTTI iso access_Stuff. + * \notes{ a \< b \cr } vs \notes{ a \< b \! } * if possible, it might be nice for a warning to appear if someone does - > \translator with no name and without assigning it to an -identifier. possible, it might be nice for a warning to appear if -someone does - > \translator with no name and without assigning it to an -identifier. + \translator with no name and without assigning it to an + identifier. * space after bars? @@ -33,21 +27,18 @@ identifier. * I see that \prallprall and \prallmordent are identical. I think this is a mistake, that \prallprall should not have the vertical line. - This can be fixex by removing the line - > draw_mordent(twidth-0.5toverlap); + This can be fixed by removing the line + draw_mordent(twidth-0.5toverlap); from the definition of \prallprall in mf/feta-slag.mf (see below) * fix singleStaffBracket * repeat bars: need distance after ":|" and before "|:" - - The time signature warnings still remain, will be fixed later. - - * fix \n after proccing + * The time signature warnings still remain, will be fixed later. - Summary of minor spelling irregularities: -> capitalization/use of underscores in property names -> \lyric vs \notes \lyric vs \type Lyrics (\lyric should have an -s) + Summary of minor spelling irregularities: + - capitalization/use of underscores in property names * fix Score.skipBars @@ -57,30 +48,22 @@ identifier. * fix marks/barnumbers/marginal notes -**** - - > lbheel = \script { "bheel" 0 0 -1 0 0 } -> rbheel = \script { "bheel" 0 0 1 0 0 } -> lbtoe = \script { "btoe" 0 0 -1 0 0 } -> rbtoe = \script { "btoe" 0 0 1 0 0 } -> lfheel = \script { "fheel" 0 0 -1 0 0 } -> rfheel = \script { "fheel" 0 0 1 0 0 } -> lftoe = \script { "ftoe" 0 0 -1 0 0 } -> rftoe = \script { "ftoe" 0 0 1 0 0 } -> -> and also -> -> portato= \script { "portato" 0 -1 0 1 0 } + * broken scripts: + lbheel = \script { "bheel" 0 0 -1 0 0 } + rbheel = \script { "bheel" 0 0 1 0 0 } + lbtoe = \script { "btoe" 0 0 -1 0 0 } + rbtoe = \script { "btoe" 0 0 1 0 0 } + lfheel = \script { "fheel" 0 0 -1 0 0 } + rfheel = \script { "fheel" 0 0 1 0 0 } + lftoe = \script { "ftoe" 0 0 -1 0 0 } + rftoe = \script { "ftoe" 0 0 1 0 0 } + + and also + + portato= \script { "portato" 0 -1 0 1 0 } * MIDI spelling. - * foo = 1 - - \score{ - \notes { a } - \paper{ foo = \translator{ \StaffContext}; } - } - * Align_element::padding ? * uniformise property names. @@ -89,8 +72,6 @@ identifier. * typo checks on property names? - * egcs-1.1 support - * make engraver hacking robust. * use streambufs and iostream @@ -102,7 +83,7 @@ identifier. * zip target for binary windows dist (JBR) - * text continuationss + * text continuations * revise documentation @@ -111,14 +92,6 @@ identifier. * junking \skip req in lyrics * Language: - - general plet mechanism. - - \plet 2/3 { c8 c8 c8 } - - ie. - - Music: PLET int '/' int Music - - \type -> \context ? - \translator -> ? - fix \partial diff --git a/buildscripts/lilypond-profile.sh b/buildscripts/lilypond-profile.sh new file mode 100644 index 0000000000..2cbd3e1115 --- /dev/null +++ b/buildscripts/lilypond-profile.sh @@ -0,0 +1,16 @@ +#!/bin/sh + + +# set environment for LilyPond. To be installed in /etc/profile.d/ + +LILYINCLUDE="@datadir@/ly" +MFINPUTS="@datadir@/mf:"${MFINPUTS:=":"} +TEXINPUTS="@datadir@/tex:"${TEXINPUTS:=":"} + +# todo: GS stuff + +export LILYINCLUDE MFINPUTS TEXINPUTS + +# echo $LILYINCLUDE $MFINPUTS $TEXINPUTS + + diff --git a/configure.in b/configure.in index 275a9cae64..0774dcc824 100644 --- a/configure.in +++ b/configure.in @@ -34,13 +34,13 @@ AC_STEPMAKE_LIB AC_STEPMAKE_LOCALE AC_STEPMAKE_GETTEXT AC_STEPMAKE_MSGFMT -AC_STEPMAKE_TEXMF +# AC_STEPMAKE_TEXMF AC_STEPMAKE_YODL dnl should check out -print dnl huh? -AC_CHECK_SEARCH_RESULT($FIND, find, Please use --enable-tex-dir) +dnl AC_CHECK_SEARCH_RESULT($FIND, find, Please use --enable-tex-dir) AC_FUNC_MEMCMP AC_FUNC_VPRINTF diff --git a/flower/include/cursor.hh b/flower/include/cursor.hh index 7aea72d334..a7e5a1836d 100644 --- a/flower/include/cursor.hh +++ b/flower/include/cursor.hh @@ -21,10 +21,6 @@ public: /** create cursor, set at top. The const part isn't true, actually, #list# surely isn't const, but I get tired of the warning messages. */ Cursor (const List& list, Link* pointer = 0); - /** - Create an invalid cursor (pointing to nothing, associated with no list.) - */ - Cursor(); Cursor (const Cursor& cursor); T& thing(); @@ -94,12 +90,14 @@ public: void del(); /// access the list this came from - List& list() const ; + List* list_l() const ; Link* pointer(); static int compare (Cursor a,Cursorb) { return a-b; } + private: - List& list_; + Link* pointer_; + List* list_l_; }; diff --git a/flower/include/cursor.icc b/flower/include/cursor.icc index 416faa52e8..ee1f23f2bb 100644 --- a/flower/include/cursor.icc +++ b/flower/include/cursor.icc @@ -4,6 +4,7 @@ source file of the Flower Library (c) 1997--1998 Han-Wen Nienhuys + Jan Nieuwenhuizen */ @@ -14,32 +15,27 @@ #include -// untested +/** + Initialisation of Cursor.. Set pointer and list fields. + */ template inline -Cursor::Cursor() - : list_(*(List *)0) // ugh -{ - pointer_ = 0; -} - - -template -inline -Cursor::Cursor (const List& list, Link* pointer) : - list_((List&) list) +Cursor::Cursor (const List & list, Link* p ) { + list_l_ = (List *) &list; // damn const if (list.size()) - pointer_ = pointer ? pointer : list.top_; + pointer_ = p ? p : list.top_; else - pointer_ = pointer; + pointer_ = p; } + + template inline -Cursor::Cursor (const Cursor& cursor) : - list_(cursor.list_) +Cursor::Cursor (const Cursor& cursor) { + list_l_= cursor.list_l_; pointer_ = cursor.pointer_; } @@ -55,7 +51,7 @@ template Cursor Cursor::operator =(const Cursor& c) { - assert (&list_ == &c.list_); + assert (list_l_ == c.list_l_); pointer_ = c.pointer_; return *this; } @@ -64,21 +60,21 @@ template inline void Cursor::add (const T& th) { - list_.add (th, *this); + list_l_->add (th, *this); } template inline void Cursor::insert (const T& th) { - list_.insert (th, *this); + list_l_->insert (th, *this); } template -inline List& -Cursor::list() const +inline List * +Cursor::list_l() const { - return list_; + return list_l_; // ugh! } template diff --git a/flower/include/cursor.tcc b/flower/include/cursor.tcc index ea204e1dc6..42b0c52f3c 100644 --- a/flower/include/cursor.tcc +++ b/flower/include/cursor.tcc @@ -5,23 +5,23 @@ #include template - void +void Cursor::backspace() { Cursor c (*this); if (c.ok()) - c--; - list_.remove (*this); + c--; + list_l_->remove (*this); } template - void +void Cursor::del() { Cursor c (*this); if (c.ok()) - c++; - list_.remove (*this); + c++; + list_l_->remove (*this); *this = c; } @@ -31,7 +31,7 @@ Cursor Cursor::operator -=(int j) { while (j--) - (*this)--; + (*this)--; return *this; } template @@ -39,7 +39,7 @@ Cursor Cursor::operator +=(int j) { while (j++) - (*this)++; + (*this)++; return *this; } @@ -50,10 +50,10 @@ Cursor::operator +(int i) const Cursor r = *this; if (i<0) - return r -(-i); + return r -(-i); while (i--) - r++; + r++; return r; } @@ -64,10 +64,10 @@ Cursor::operator -(int i) const { Cursor r = *this; if (i<0) - return r +(-i); + return r +(-i); while (i--) - r--; + r--; return r; } @@ -79,31 +79,31 @@ template int Cursor::operator-(Cursor rhs) const { - assert (&rhs.list_ == &list_); + assert (rhs.list_l_ == list_l_); int dif = 0; // search from *this on further up (positive difference) Cursor c (*this); while (c.ok() && c.pointer_ != rhs.pointer_) { - c--; - dif++; + c--; + dif++; } if (c.ok()) - goto gotcha; // so, sue me. + goto gotcha; // so, sue me. // search in direction of bottom. (negative diff) dif =0; c=*this; while (c.ok() && c.pointer_ !=rhs.pointer_) { - dif --; - c++; + dif --; + c++; } assert (c.ok()); -gotcha: + gotcha: assert ((*this - dif).pointer_ == c.pointer_); return dif; } diff --git a/flower/include/pcursor.hh b/flower/include/pcursor.hh index 981b43a10f..9e7959f8a1 100644 --- a/flower/include/pcursor.hh +++ b/flower/include/pcursor.hh @@ -39,15 +39,15 @@ public: return remove_p(); } - Link_list &list() { return (Link_list&)Cursor::list (); } + Link_list *list_l() { return (Link_list *)Cursor::list_l (); } PCursor operator++(int) { return Cursor::operator++(0);} PCursor operator--(int) { return Cursor::operator--(0); } PCursor operator+=(int i) { return Cursor::operator+=(i);} PCursor operator-=(int i) { return Cursor::operator-=(i); } PCursor operator -(int no) const { return Cursor::operator-(no);} int operator -(PCursor op) const { return Cursor::operator-(op);} - PCursor operator +(int no) const {return Cursor::operator+(no);} PCursor (const Link_list & l) : Cursor (l) {} - PCursor() : Cursor () {} + PCursor operator +(int no) const {return Cursor::operator+(no);} + PCursor (const Link_list & l) : Cursor (l) {} PCursor (const Cursor& cursor) : Cursor(cursor) { } void* vptr() const { return *((Cursor &) *this); } diff --git a/flower/include/pcursor.tcc b/flower/include/pcursor.tcc index c2b459a267..a1f706b8a2 100644 --- a/flower/include/pcursor.tcc +++ b/flower/include/pcursor.tcc @@ -5,12 +5,12 @@ void PCursor::junk() { #if !defined (NDEBUG) && defined (PARANOID) - list().OK(); + list_l()->OK(); #endif delete ptr(); #if !defined (NDEBUG)&&defined (PARANOID) thing() = 0; - list().OK(); + list_l()->OK(); #endif } diff --git a/flower/include/rational.hh b/flower/include/rational.hh index 115d5f85c7..7394af6aa5 100644 --- a/flower/include/rational.hh +++ b/flower/include/rational.hh @@ -20,7 +20,18 @@ #include "arithmetic-operator.hh" #include "fproto.hh" +/** + Rational numbers. Included is support for + and - infinity. + */ class Rational { + /** + Sign of rational. + -2, .. 2 + + -2,2 is - and + infinity. + -1,1 is negative and positive. + 0 if *this is zero. + */ int sign_; unsigned int num_, den_; void normalise (); @@ -32,12 +43,17 @@ public: void invert (); int num () const { return sign_ * num_; } int den () const { return den_; } + int num_i () const { return sign_ * num_; } + int den_i () const { return den_; } Rational truncated () const; void negate (); operator bool () const; operator int () const; operator double () const; Rational operator - () const; + /** + Initialize to 0. + */ Rational (); Rational (int, int =1); Rational (double); @@ -45,9 +61,9 @@ public: Rational &operator = (Rational const &); Rational &operator *= (Rational); - Rational &operator /= (Rational); - Rational &operator += (Rational); - Rational &operator -= (Rational); + Rational &operator /= (Rational); + Rational &operator += (Rational); + Rational &operator -= (Rational); static int compare (Rational const&, Rational const&); int sign () const; String str () const; diff --git a/flower/rational.cc b/flower/rational.cc index 10b3bc9c2c..cf99657acb 100644 --- a/flower/rational.cc +++ b/flower/rational.cc @@ -41,7 +41,7 @@ Rational::truncated () const Rational::Rational () { - sign_ = 1; + sign_ = 0; num_ = den_ = 1; } @@ -53,6 +53,10 @@ Rational::Rational (int n, int d) normalise (); } +Rational::Rational (Rational const &r) +{ + copy (r); +} static int gcd (int a, int b) @@ -252,11 +256,6 @@ Rational::operator = (Rational const &r) return *this; } -Rational::Rational (Rational const &r) -{ - copy (r); -} - String Rational::str () const { diff --git a/init/GNUmakefile b/init/GNUmakefile index 00000cc6c6..a9a23da2da 100644 --- a/init/GNUmakefile +++ b/init/GNUmakefile @@ -5,7 +5,7 @@ depth = .. INI_FILES = $(FLY_FILES) $(LY_FILES) # DIST_FILES = Makefile $(INI_FILES) -INSTALLATION_DIR=$(datadir) +INSTALLATION_DIR=$(datadir)/ly/ INSTALLATION_FILES=$(INI_FILES) LOCALSTEPMAKE_TEMPLATES=mutopia diff --git a/init/book-fragment.ly b/init/book-fragment.ly index 0aa5267045..f8b283faf4 100644 --- a/init/book-fragment.ly +++ b/init/book-fragment.ly @@ -1,6 +1,6 @@ % Toplevel initialisation file. -\version "1.0.6"; +\version "1.0.7"; \include "declarations.ly" diff --git a/init/book-init.ly b/init/book-init.ly index 42f06c1a1d..e2744aa352 100644 --- a/init/book-init.ly +++ b/init/book-init.ly @@ -1,6 +1,6 @@ % Toplevel initialisation file. -\version "1.0.6"; +\version "1.0.7"; \include "declarations.ly"; diff --git a/init/center-fragment.ly b/init/center-fragment.ly index 6c26e3840d..4bf04f5963 100644 --- a/init/center-fragment.ly +++ b/init/center-fragment.ly @@ -1,7 +1,7 @@ % Toplevel initialisation file. -\version "1.0.6"; +\version "1.0.7"; \include "declarations.ly" diff --git a/init/center.ly b/init/center.ly index 441f9c0182..5fddea855e 100644 --- a/init/center.ly +++ b/init/center.ly @@ -1,6 +1,6 @@ % Toplevel initialisation file. -\version "1.0.6"; +\version "1.0.7"; \include "declarations.ly" diff --git a/init/engraver.ly b/init/engraver.ly index be32475668..54c737dd61 100644 --- a/init/engraver.ly +++ b/init/engraver.ly @@ -23,6 +23,7 @@ StaffContext=\translator { \consists "Staff_sym_engraver"; \consists "Collision_engraver"; \consists "Rest_collision_engraver"; + \consists "Tuplet_engraver"; %{ Uncomment to get bar numbers on single staff systems: diff --git a/init/fragment.ly b/init/fragment.ly index b80b83d735..0de947cf26 100644 --- a/init/fragment.ly +++ b/init/fragment.ly @@ -1,6 +1,6 @@ % Toplevel initialisation file. -\version "1.0.6"; +\version "1.0.7"; \include "declarations.ly" diff --git a/init/init.fly b/init/init.fly index 1ab82d8016..d3d0c5294c 100644 --- a/init/init.fly +++ b/init/init.fly @@ -1,6 +1,6 @@ % Toplevel initialisation file. -\version "1.0.6"; +\version "1.0.7"; \include "declarations.ly" diff --git a/init/init.ly b/init/init.ly index f3622d278d..3627b7e864 100644 --- a/init/init.ly +++ b/init/init.ly @@ -1,6 +1,6 @@ % Toplevel initialisation file. -\version "1.0.6"; +\version "1.0.7"; \include "declarations.ly"; diff --git a/init/paper16.ly b/init/paper16.ly index ea7a7a0529..c7f7352521 100644 --- a/init/paper16.ly +++ b/init/paper16.ly @@ -6,7 +6,7 @@ -\version "1.0.6"; +\version "1.0.7"; paper_sixteen = \paper { staffheight = 16.0\pt; diff --git a/init/paper20.ly b/init/paper20.ly index b73b3817bf..c8bf25b35b 100644 --- a/init/paper20.ly +++ b/init/paper20.ly @@ -5,7 +5,7 @@ \include "table13.ly"; \include "table16.ly"; -\version "1.0.6"; +\version "1.0.7"; paper_twenty = \paper { staffheight = 20.0\pt; diff --git a/input/example-3.ly b/input/example-3.ly index dedefdc038..426d1e7809 100644 --- a/input/example-3.ly +++ b/input/example-3.ly @@ -1,4 +1,4 @@ -\version "1.0.6"; +\version "1.0.7"; one = \notes\relative c{ c'' d e f diff --git a/input/keys.ly b/input/keys.ly index d5f945ffab..bdc719a5d4 100644 --- a/input/keys.ly +++ b/input/keys.ly @@ -1,4 +1,4 @@ -\version "1.0.6"; +\version "1.0.7"; blah = \notes { diff --git a/input/kortjakje.ly b/input/kortjakje.ly index aeeaa4f93a..c327f45d81 100644 --- a/input/kortjakje.ly +++ b/input/kortjakje.ly @@ -10,7 +10,7 @@ copyright = "public domain"; Tested Features: example file with comments %} -\version "1.0.6"; +\version "1.0.7"; % the % is a comment. diff --git a/input/part.ly b/input/part.ly index 40a62279be..ffcfe99695 100644 --- a/input/part.ly +++ b/input/part.ly @@ -1,4 +1,4 @@ -\version "1.0.6"; +\version "1.0.7"; part = \notes { c-1 c c c r1*3 diff --git a/input/pedal.ly b/input/pedal.ly index 3e466e4fcb..360902ce67 100644 --- a/input/pedal.ly +++ b/input/pedal.ly @@ -28,7 +28,7 @@ % \lbheel \lbheel \lfheel \lftoe % \rbheel \rbtoe \rfheel \rftoe -\version "1.0.6"; +\version "1.0.7"; \score{ \notes { diff --git a/input/praeludium-fuga-E.ly b/input/praeludium-fuga-E.ly index da3004548d..876299fdb4 100644 --- a/input/praeludium-fuga-E.ly +++ b/input/praeludium-fuga-E.ly @@ -23,7 +23,7 @@ * organ staff... %} -\version "1.0.6"; +\version "1.0.7"; diff --git a/input/rhythm.ly b/input/rhythm.ly index 197df1fda6..75558c339a 100644 --- a/input/rhythm.ly +++ b/input/rhythm.ly @@ -7,7 +7,7 @@ TestedFeatures = "multiple meters, beaming, unsynced bars, userdefd engravers"; -\version "1.0.6"; +\version "1.0.7"; ritme = \notes\transpose c'' { \time 4/4; diff --git a/input/scales.ly b/input/scales.ly index de9a2c496b..4992d6ad22 100644 --- a/input/scales.ly +++ b/input/scales.ly @@ -16,7 +16,7 @@ copyright = "public domain"; % scales with accents. % -\version "1.0.6"; +\version "1.0.7"; blah = \notes { \time 6/8; \transpose c { diff --git a/input/scripts.ly b/input/scripts.ly index 869836046b..797eb4f5df 100644 --- a/input/scripts.ly +++ b/input/scripts.ly @@ -1,5 +1,5 @@ -\version "1.0.6"; +\version "1.0.7"; blah = \notes{ \transpose c'' { diff --git a/input/test/abbrev.ly b/input/test/abbrev.ly index 6230a2acb0..d707a6c9a9 100644 --- a/input/test/abbrev.ly +++ b/input/test/abbrev.ly @@ -1,5 +1,5 @@ -\version "1.0.6"; +\version "1.0.7"; \score{ \notes \transpose c'''{ \stemup diff --git a/input/test/bar-scripts.ly b/input/test/bar-scripts.ly index 895c1b5b26..e12aab30f2 100644 --- a/input/test/bar-scripts.ly +++ b/input/test/bar-scripts.ly @@ -1,7 +1,7 @@ -\version "1.0.6"; +\version "1.0.7"; onestaff = \type Staff = foo\notes { \property Staff.instr = instr diff --git a/input/test/beam-chord.ly b/input/test/beam-chord.ly index fe5b0aa074..362c7232e2 100644 --- a/input/test/beam-chord.ly +++ b/input/test/beam-chord.ly @@ -1,4 +1,4 @@ -\version "1.0.4"; +\version "1.0.7"; \score{ \notes\transpose c'{ diff --git a/input/test/beam-pos.ly b/input/test/beam-pos.ly index 41cdc2e5e4..a5148faa47 100644 --- a/input/test/beam-pos.ly +++ b/input/test/beam-pos.ly @@ -1,4 +1,4 @@ -\version "1.0.6"; +\version "1.0.7"; \score{ \notes\transpose c''{ diff --git a/input/test/beams.ly b/input/test/beams.ly index d961f90d86..dad9d23498 100644 --- a/input/test/beams.ly +++ b/input/test/beams.ly @@ -6,7 +6,7 @@ copyright = "PD"; TestedFeatures = "beams and beamflags"; } -\version "1.0.6"; +\version "1.0.7"; \score{ < diff --git a/input/test/broken.ly b/input/test/broken.ly index 7ac2085fc7..e18db38aff 100644 --- a/input/test/broken.ly +++ b/input/test/broken.ly @@ -5,7 +5,7 @@ TestedFeatures = "This file tests Feta embedded slurs" + "(Feta definitively is not an abbreviation of Font-En-TjA)"; } -\version "1.0.6"; +\version "1.0.7"; shortlong = \notes{ c4()c( c c | diff --git a/input/test/clefs.ly b/input/test/clefs.ly index 4e0ea68389..846cf62b42 100644 --- a/input/test/clefs.ly +++ b/input/test/clefs.ly @@ -1,4 +1,4 @@ -\version "1.0.6"; +\version "1.0.7"; \score { \notes{ diff --git a/input/test/collisions.ly b/input/test/collisions.ly index c545798657..cc84405cfb 100644 --- a/input/test/collisions.ly +++ b/input/test/collisions.ly @@ -5,7 +5,7 @@ enteredby = "HWN,JCN"; copyright = "public domain"; Tested = "test the Collision resolution "; } -\version "1.0.6"; +\version "1.0.7"; diff --git a/input/test/defaultbars.ly b/input/test/defaultbars.ly index c0654ac96d..ef013933d2 100644 --- a/input/test/defaultbars.ly +++ b/input/test/defaultbars.ly @@ -1,4 +1,4 @@ -\version "1.0.6"; +\version "1.0.7"; \score { diff --git a/input/test/denneboom.ly b/input/test/denneboom.ly index 3f06328cda..bdbf2ee191 100644 --- a/input/test/denneboom.ly +++ b/input/test/denneboom.ly @@ -7,9 +7,9 @@ TestedFeatures = "This file tests silly line shapes"; \include "paper20.ly" -\version "1.0.6"; +\version "1.0.7"; -oden = \lyric{ +oden = \lyrics{ O8 | den-8. ne-16 boom,4. o8 | den-8. ne-16 boom.4. Wat8 | @@ -17,7 +17,7 @@ oden = \lyric{ won-8. der-16 schoon4 _8 } -ikheb = \lyric{ +ikheb = \lyrics{ Ik8 | heb u laatst4. in_'t8 | bos8. zien16 staan4 _8 toen8 | @@ -25,7 +25,7 @@ ikheb = \lyric{ kaars-8. jes16 aan.4 _8 } -ugloeit = \lyric{ +ugloeit = \lyrics{ U8 | gloeit in bar-4. re8 | win-8. ter-16 tijd,4 r8 als8 | diff --git a/input/test/dotted-slur.ly b/input/test/dotted-slur.ly index 03db2071a0..29140d0b45 100644 --- a/input/test/dotted-slur.ly +++ b/input/test/dotted-slur.ly @@ -1,4 +1,4 @@ -\version "1.0.6"; +\version "1.0.7"; \score{ \notes{ diff --git a/input/test/find-quarts.ly b/input/test/find-quarts.ly index 91a236b2b5..6a1dedc89c 100644 --- a/input/test/find-quarts.ly +++ b/input/test/find-quarts.ly @@ -1,4 +1,4 @@ -\version "1.0.6"; +\version "1.0.7"; \score{ \notes \relative c { diff --git a/input/test/font-body.ly b/input/test/font-body.ly index d4c2e7c487..b7a5c7d520 100644 --- a/input/test/font-body.ly +++ b/input/test/font-body.ly @@ -1,4 +1,4 @@ -\version "1.0.6"; +\version "1.0.7"; FontBody= \notes\transpose c''{ \bar "|:"; diff --git a/input/test/font.ly b/input/test/font.ly index 9d38c7f5f3..7692b8c90b 100644 --- a/input/test/font.ly +++ b/input/test/font.ly @@ -7,7 +7,7 @@ description = "This file tests the Feta music font"; % "(Feta definitively is not an abbreviation of Font-En-TjA)"; } -\version "1.0.6"; +\version "1.0.7"; \include "font-body.ly" \score{ diff --git a/input/test/font16.ly b/input/test/font16.ly index 3b1364e181..2c32786c81 100644 --- a/input/test/font16.ly +++ b/input/test/font16.ly @@ -7,7 +7,7 @@ description = "This file tests the Feta music font"; % "(Feta definitively is not an abbreviation of Font-En-TjA)"; } -\version "1.0.6"; +\version "1.0.7"; \include "font-body.ly" \score{ diff --git a/input/test/gourlay.ly b/input/test/gourlay.ly index 38dd6faa52..62ca043229 100644 --- a/input/test/gourlay.ly +++ b/input/test/gourlay.ly @@ -4,7 +4,7 @@ copyright = "PD"; TestedFeatures = "This file tests some nasty Gourlay spacings"; } -\version "1.0.6"; +\version "1.0.7"; %{ diff --git a/input/test/grace.ly b/input/test/grace.ly index a769b569c5..81db2a8871 100644 --- a/input/test/grace.ly +++ b/input/test/grace.ly @@ -1,5 +1,5 @@ -\version "1.0.6"; +\version "1.0.7"; \include "table13.ly"; \include "table16.ly"; diff --git a/input/test/hara-kiri.ly b/input/test/hara-kiri.ly index 66a786342c..49af9b64fd 100644 --- a/input/test/hara-kiri.ly +++ b/input/test/hara-kiri.ly @@ -1,4 +1,4 @@ -\version "1.0.6"; +\version "1.0.7"; toeter_i = \notes\relative c { \property Staff.instrument = "Toeters" diff --git a/input/test/keys.ly b/input/test/keys.ly index e47814a6bc..211c7c1e20 100644 --- a/input/test/keys.ly +++ b/input/test/keys.ly @@ -1,4 +1,4 @@ -\version "1.0.6"; +\version "1.0.7"; %{ test key itemv breaking diff --git a/input/test/knee.ly b/input/test/knee.ly index ae746715e1..af9d114128 100644 --- a/input/test/knee.ly +++ b/input/test/knee.ly @@ -1,4 +1,4 @@ -\version "1.0.6"; +\version "1.0.7"; \score{ \notes\relative c'{ [c16 \stemdown c'' \stemboth c,, d] diff --git a/input/test/mark.ly b/input/test/mark.ly index 8feb99bfa4..f5e9deb060 100644 --- a/input/test/mark.ly +++ b/input/test/mark.ly @@ -1,4 +1,4 @@ -\version "1.0.6"; +\version "1.0.7"; global = \notes { s1 | \mark "A"; diff --git a/input/test/multi-rest.ly b/input/test/multi-rest.ly index 54bd95e755..ac055ef54f 100644 --- a/input/test/multi-rest.ly +++ b/input/test/multi-rest.ly @@ -1,4 +1,4 @@ -\version "1.0.6"; +\version "1.0.7"; voice_one = \notes\transpose c' { \stemup R1 * 2 | f'4-. r r2 | R1 * 3 | diff --git a/input/test/ossia.ly b/input/test/ossia.ly index 05d8229156..531b549afa 100644 --- a/input/test/ossia.ly +++ b/input/test/ossia.ly @@ -1,4 +1,4 @@ -\version "1.0.6"; +\version "1.0.7"; \score { diff --git a/input/test/score-bar-scripts.ly b/input/test/score-bar-scripts.ly index 102dfc59e6..72b545bc38 100644 --- a/input/test/score-bar-scripts.ly +++ b/input/test/score-bar-scripts.ly @@ -1,7 +1,7 @@ -\version "1.0.6"; +\version "1.0.7"; onestaff = \type Staff = foo\notes { \property Staff.instr = instr diff --git a/input/test/sleur.ly b/input/test/sleur.ly index 3a5ac5dce6..70f7cfb15a 100644 --- a/input/test/sleur.ly +++ b/input/test/sleur.ly @@ -5,7 +5,7 @@ TestedFeatures = "This file tests Feta embedded slurs" + "(Feta definitively is not an abbreviation of Font-En-TjA)"; } -\version "1.0.6"; +\version "1.0.7"; shortlong = \notes{ c4()c( c c | diff --git a/input/test/slur-bug.ly b/input/test/slur-bug.ly index edee54434d..10cf4bc782 100644 --- a/input/test/slur-bug.ly +++ b/input/test/slur-bug.ly @@ -1,4 +1,4 @@ -\version "1.0.6"; +\version "1.0.7"; % bug % excentric slur can't handle this ... diff --git a/input/test/slur-damping.ly b/input/test/slur-damping.ly index 43c422d38e..96f89df4c5 100644 --- a/input/test/slur-damping.ly +++ b/input/test/slur-damping.ly @@ -1,5 +1,5 @@ % test damping -\version "1.0.6"; +\version "1.0.7"; \score{ \notes\relative c'{ diff --git a/input/test/slur-swap.ly b/input/test/slur-swap.ly index 8b24a4e5a2..1cc9dbc7c4 100644 --- a/input/test/slur-swap.ly +++ b/input/test/slur-swap.ly @@ -1,4 +1,4 @@ -\version "1.0.6"; +\version "1.0.7"; % urg, the direction of the slur gets swapped! \score{ diff --git a/input/test/slurs.ly b/input/test/slurs.ly index 459ed7e48f..248f64ca9f 100644 --- a/input/test/slurs.ly +++ b/input/test/slurs.ly @@ -1,5 +1,5 @@ -\version "1.0.6"; +\version "1.0.7"; \score{ \notes\transpose c'{ diff --git a/input/test/spacing.ly b/input/test/spacing.ly index 6ba7255550..baf346b551 100644 --- a/input/test/spacing.ly +++ b/input/test/spacing.ly @@ -6,7 +6,7 @@ copyright = "public domain"; TestedFeatures = "This file tests various spacings"; } -\version "1.0.6"; +\version "1.0.7"; multipart = \notes{ \type StaffGroup < diff --git a/input/test/stem.ly b/input/test/stem.ly index 667be275d6..cf19937c7d 100644 --- a/input/test/stem.ly +++ b/input/test/stem.ly @@ -8,7 +8,7 @@ of beams"; } -\version "1.0.6"; +\version "1.0.7"; beamintervals = \notes{ \time 7/4; diff --git a/input/test/test-lyrics.ly b/input/test/test-lyrics.ly index 39eb2e13bc..01db413dbc 100644 --- a/input/test/test-lyrics.ly +++ b/input/test/test-lyrics.ly @@ -1,6 +1,6 @@ -\version "1.0.6"; +\version "1.0.7"; -$somewhat_long = \lyric{ +$somewhat_long = \lyrics{ \property Lyrics . textstyle = "roman" AaaaaaA2 BbbbbbB2 @@ -10,7 +10,7 @@ $somewhat_long = \lyric{ FfffffF2 } -$rather_long = \lyric{ +$rather_long = \lyrics{ \property Lyrics . textstyle = "roman" LLLLoooonggggg2 Syyllllaaabbble2 @@ -20,7 +20,7 @@ $rather_long = \lyric{ Syyyylllaaabbble2 } -$quite_long = \lyric{ +$quite_long = \lyrics{ \property Lyrics . textstyle = "roman" LLLLLLLLLooooongggggggg2 Syyyyyyyyyyyyylllllllaaaaaabbble2 diff --git a/input/test/tie-bug.ly b/input/test/tie-bug.ly index 1b21d5308b..e457a475e4 100644 --- a/input/test/tie-bug.ly +++ b/input/test/tie-bug.ly @@ -1,4 +1,4 @@ -\version "1.0.6"; +\version "1.0.7"; % middle tie is wrong diff --git a/input/test/tie.ly b/input/test/tie.ly index cddf1e9cc8..1d58f5ddcf 100644 --- a/input/test/tie.ly +++ b/input/test/tie.ly @@ -1,4 +1,4 @@ -\version "1.0.6"; +\version "1.0.7"; tie = \notes\transpose c''{ diff --git a/input/test/title.ly b/input/test/title.ly index ae1b5ee610..ff7c1b24cc 100644 --- a/input/test/title.ly +++ b/input/test/title.ly @@ -10,7 +10,7 @@ source = "urtext"; instrument= "Instrument"; } -\version "1.0.6"; +\version "1.0.7"; \score{ \notes diff --git a/input/test/transposition.ly b/input/test/transposition.ly index 8483b8735c..885feb994b 100644 --- a/input/test/transposition.ly +++ b/input/test/transposition.ly @@ -22,7 +22,7 @@ copyright = "public domain"; } -\version "1.0.6"; +\version "1.0.7"; vOne = \notes \relative c''{ \clef"violin"; diff --git a/input/test/vertical-align.ly b/input/test/vertical-align.ly index b74d873faf..ae4540940c 100644 --- a/input/test/vertical-align.ly +++ b/input/test/vertical-align.ly @@ -1,5 +1,5 @@ -\version "1.0.6"; +\version "1.0.7"; \score { \notes < diff --git a/input/tril.ly b/input/tril.ly index 1d3537747a..c2b72bcd57 100644 --- a/input/tril.ly +++ b/input/tril.ly @@ -5,7 +5,7 @@ TestedFeatures = "This file tests trills" + "(Feta definitively is not an abbreviation of Font-En-TjA)"; } -\version "1.0.6"; +\version "1.0.7"; \score{ \notes{ diff --git a/input/twinkle-pop.ly b/input/twinkle-pop.ly index b934bf900a..46c35973e3 100644 --- a/input/twinkle-pop.ly +++ b/input/twinkle-pop.ly @@ -12,7 +12,7 @@ copyright = "public domain"; Tested Features lyrics and chords %} -\version "1.0.6"; +\version "1.0.7"; melodie = \notes\relative c { \clef"violin"; @@ -26,7 +26,7 @@ melodie = \notes\relative c { f4^"F" f | e^"C" e | d^"G7" d | c2^"C" | } -text = \lyric{ +text = \lyrics{ \property Lyrics . textstyle = "italic" Ah!4 vous dir- ai_- je ma man2 @@ -40,7 +40,7 @@ text = \lyric{ \score { < \notes \type Staff \melodie - \lyric \type Lyrics \text + \lyrics \type Lyrics \text > \paper { } } diff --git a/input/twinkle.ly b/input/twinkle.ly index 739108a64a..1d1520f6af 100644 --- a/input/twinkle.ly +++ b/input/twinkle.ly @@ -20,7 +20,7 @@ traditional song in various languages. Tested Features: lyrics, interleaving lyrics and staffs %} -\version "1.0.6"; +\version "1.0.7"; melody = \notes \relative c'' { \clef violin; @@ -54,7 +54,7 @@ global = \notes { \bar ":|"; } -tekst = \lyric{ +tekst = \lyrics{ Al-4 tijd is Kort- jak- je ziek,2 midden4 in_de week maar s,_zon- dags niet.2 % ugly hack: insertion of empty syllables creates columns on extra @@ -74,7 +74,7 @@ Ja inderdaad. Dit is geen educatieve danwel muzikaal verantwoorde tekst. Mogen wij ook af en toe ergens op afgeven? %} -hegedraagjetekst = \lyric{ +hegedraagjetekst = \lyrics{ Al-4 tijd zuigt Bill Gates mijn piek,2 "\TeX"4 is slecht- ser dan mu- ziek.2 s,_Zon-4 dags gaat het door een raam,2 @@ -83,7 +83,7 @@ hegedraagjetekst = \lyric{ "\TeX"4 is slecht- ser dan mu- ziek.2 } -texte = \lyric{ +texte = \lyrics{ \property Lyrics . textstyle" = "italic" % \property Lyrics . textstyle" = "roman" Ah!4 vous dir- ai_- je ma- man2 @@ -94,7 +94,7 @@ texte = \lyric{ Va-4 lent mieux que la rai- son2 } -texti = \lyric{ +texti = \lyrics{ \property "Lyrics"."textstyle" = "roman" Twin-4 kle, twin- kle, lit- tle star,2 How4 I won- der what you are.2 @@ -104,7 +104,7 @@ texti = \lyric{ How4 I won- der what you are!2 } -textii = \lyric{ +textii = \lyrics{ When4 the bla- zing sun is gone,2 When4 he no- thing shines up- on,2 Then4 you show your lit- tle light,2 @@ -114,7 +114,7 @@ textii = \lyric{ } -textiii = \lyric{ +textiii = \lyrics{ Then4 the tra- veler in the dark2 Thanks4 you for your ti- ny spark;2 He_could4 not see which way to go,2 diff --git a/lib/duration.cc b/lib/duration.cc index 7bdf8d00dc..f65348ae6d 100644 --- a/lib/duration.cc +++ b/lib/duration.cc @@ -38,6 +38,13 @@ Duration::duration_type_b (int t) return t == Duration_convert::type2_i (Duration_convert::i2_type (t)); } +void +Duration::compress (Moment m) +{ + plet_.iso_i_ *= m.num_i (); + plet_.type_i_ *= m.den_i (); +} + // ugh, what's this? // i should be called "mom ()", ... or at least "length_mom ()" Moment diff --git a/lib/include/duration.hh b/lib/include/duration.hh index 367672ac4e..509a6d69d9 100644 --- a/lib/include/duration.hh +++ b/lib/include/duration.hh @@ -27,6 +27,7 @@ struct Duration { bool plet_b (); String str () const; void set_plet (int,int ); + void compress (Moment); static bool duration_type_b (int t); void set_ticks (int ticks_i ); diff --git a/lily/auto-plet-engraver.cc b/lily/auto-plet-engraver.cc new file mode 100644 index 0000000000..8812f6245c --- /dev/null +++ b/lily/auto-plet-engraver.cc @@ -0,0 +1,109 @@ +/* + auto-plet-engraver.cc -- implement Auto_plet_engraver + + source file of the GNU LilyPond music typesetter + + (c) 1998 Han-Wen Nienhuys + + */ + +#include "auto-plet-engraver.hh" +#include "command-request.hh" +#include "slur.hh" +#include "note-column.hh" + +bool +Tuplet_engraver::do_try_request (Request *r) +{ + Command_req * c = r->access_Command_req (); + if (!(c && + c->access_Bracket_req ())) + { + return false; + } + + Bracket_req * b = c->access_Bracket_req (); + bracket_req_arr_.push (b); + return true; +} + + +void +Tuplet_engraver::do_process_requests () +{ + int stopcount =0; + Link_array start_arr; + + for (int i=0; i < bracket_req_arr_.size (); i++) + { + if (bracket_req_arr_[i]->spantype == Span_req::STOP) + stopcount++; + if (bracket_req_arr_[i]->spantype == Span_req::START) + { + Slur *sp =new Slur; + start_arr.push (sp); + announce_element (Score_element_info (sp, bracket_req_arr_[i])); + } + } + + for (; stopcount--; ) + { + Slur *sp = started_span_p_arr_.pop (); + stop_now_span_p_arr_.push (sp); + } + + for (int i=0; i < start_arr.size (); i++) + started_span_p_arr_.push (start_arr.pop ()); +} + +void +Tuplet_engraver::acknowledge_element (Score_element_info i) +{ + if (i.elem_l_->is_type_b (Note_column::static_name ())) + { + Note_column *nc = (Note_column*)i.elem_l_->access_Item (); + for (int j =0; j add_column (nc); + } +} + +void +Tuplet_engraver::do_pre_move_processing () +{ + typeset_all (); +} + +void +Tuplet_engraver::typeset_all () +{ + for (int i=0; i < stop_now_span_p_arr_.size (); i++) + { + typeset_element (stop_now_span_p_arr_[i]); + } + + stop_now_span_p_arr_.clear (); +} + +void +Tuplet_engraver::do_removal_processing () +{ + typeset_all (); + for (int i=0; i < started_span_p_arr_.size (); i++) + { + typeset_element (started_span_p_arr_[i]); + } +} + +ADD_THIS_TRANSLATOR(Tuplet_engraver); +IMPLEMENT_IS_TYPE_B1(Tuplet_engraver, Engraver); + +Tuplet_engraver::Tuplet_engraver() +{ +} + + +void +Tuplet_engraver::do_post_move_processing () +{ + bracket_req_arr_.clear (); +} diff --git a/lily/change-iterator.cc b/lily/change-iterator.cc index d314f35385..b319c72089 100644 --- a/lily/change-iterator.cc +++ b/lily/change-iterator.cc @@ -11,37 +11,39 @@ #include "change-translator.hh" #include "debug.hh" -Change_iterator::Change_iterator (Change_translator *change_l) -{ - change_l_ = change_l; -} void Change_iterator::error (String reason) { - String to_type = change_l_->change_to_type_str_; - String to_id = change_l_->change_to_id_str_; + String to_type = change_l ()->change_to_type_str_; + String to_id = change_l ()->change_to_id_str_; String warn1 = _f ("can't change `%s\' to `%s\'", to_type, to_id) + ": " + reason; - String warn2= "Change_iterator::process_and_next (): " + String warn2= "Change_iterator::do_process_and_next (): " + report_to_l ()->type_str_ + " = `" + report_to_l ()->id_str_ + "\': "; warning (warn2); - change_l_->warning (warn1); + change_l ()->warning (warn1); +} + +Change_translator * +Change_iterator::change_l () +{ + return (Change_translator*) music_l_; } /* move to construct_children ? */ void -Change_iterator::process_and_next (Moment m) +Change_iterator::do_process_and_next (Moment m) { Translator_group * current = report_to_l (); Translator_group * last = 0; - String to_type = change_l_->change_to_type_str_; - String to_id = change_l_->change_to_id_str_; + String to_type = change_l ()->change_to_type_str_; + String to_id = change_l ()->change_to_id_str_; /* find the type of translator that we're changing. @@ -68,13 +70,13 @@ Change_iterator::process_and_next (Moment m) We could change the current translator's id, but that would make errors hard to catch - last->translator_id_str_ = change_l_->change_to_id_str_; + last->translator_id_str_ = change_l ()->change_to_id_str_; */ error ("I'm one myself"); } else error ("None of these in my family."); - Music_iterator::process_and_next (m); + Music_iterator::do_process_and_next (m); } IMPLEMENT_IS_TYPE_B1 (Change_iterator, Music_iterator); diff --git a/lily/chord-iterator.cc b/lily/chord-iterator.cc index 998ac40224..34c91c586c 100644 --- a/lily/chord-iterator.cc +++ b/lily/chord-iterator.cc @@ -13,27 +13,18 @@ #include "music-list.hh" -Simultaneous_music_iterator::~Simultaneous_music_iterator() -{ -} - -Simultaneous_music_iterator::Simultaneous_music_iterator (Simultaneous_music const *simultaneous_music_C) -{ - simultaneous_music_C_ = simultaneous_music_C; -} - void Simultaneous_music_iterator::construct_children() { int j = 0; - for (PCursor i (simultaneous_music_C_->music_p_list_p_->top()); + for (PCursor i (simultaneous_music_l ()->music_p_list_p_->top()); i.ok(); j++, i++) { Music_iterator * mi = get_iterator_p (i.ptr()); if (mi->ok()) { - if (simultaneous_music_C_->translator_type_str_.empty_b ()) - set_translator (mi->report_to_l()->ancestor_l (simultaneous_music_C_->multi_level_i_)); + if (simultaneous_music_l ()->translator_type_str_.empty_b ()) + set_translator (mi->report_to_l()->ancestor_l (simultaneous_music_l ()->multi_level_i_)); children_p_list_.bottom().add (mi); } else @@ -54,7 +45,7 @@ Simultaneous_music_iterator::do_print() const } void -Simultaneous_music_iterator::process_and_next (Moment until) +Simultaneous_music_iterator::do_process_and_next (Moment until) { for (PCursor i (children_p_list_.top()); i.ok ();) { @@ -67,7 +58,7 @@ Simultaneous_music_iterator::process_and_next (Moment until) else i++; } - Music_iterator::process_and_next (until); + Music_iterator::do_process_and_next (until); } @@ -90,3 +81,9 @@ Simultaneous_music_iterator::ok() const { return children_p_list_.size(); } + +Simultaneous_music* +Simultaneous_music_iterator::simultaneous_music_l ()const +{ + return ( Simultaneous_music *) music_l_; +} diff --git a/lily/command-request.cc b/lily/command-request.cc index 24f2fee50b..b32dc96ff4 100644 --- a/lily/command-request.cc +++ b/lily/command-request.cc @@ -54,12 +54,20 @@ Bar_req::do_equal_b (Request*r) const IMPLEMENT_IS_TYPE_B1(Bar_req,Command_req); +IMPLEMENT_IS_TYPE_B2(Bracket_req, Command_req, Span_req); + void Bar_req::do_print() const { DOUT << type_str_; } +void +Bracket_req::do_print () const +{ + Span_req::do_print (); +} + Bar_req::Bar_req (String s) { type_str_ = s; diff --git a/lily/compressed-music-iterator.cc b/lily/compressed-music-iterator.cc new file mode 100644 index 0000000000..c5c60acc78 --- /dev/null +++ b/lily/compressed-music-iterator.cc @@ -0,0 +1,68 @@ +/* + compressed-music-iterator.cc -- implement Compressed_music_iterator + + source file of the GNU LilyPond music typesetter + + (c) 1998 Han-Wen Nienhuys + + */ + +#include "compressed-music-iterator.hh" +#include "compressed-music.hh" +#include "musical-request.hh" +#include "translator-group.hh" +#include "command-request.hh" + +IMPLEMENT_IS_TYPE_B1(Compressed_music_iterator, Music_wrapper_iterator); + +Compressed_music_iterator::Compressed_music_iterator () +{ + Bracket_req pr; + pr.spantype = Span_req::START; + // pr.plet_i_ = 1; + start_req_p_ = new Bracket_req (pr); + pr.spantype = Span_req::STOP; + stop_req_p_ =new Bracket_req (pr); +} + +Compressed_music_iterator::~Compressed_music_iterator () +{ + delete start_req_p_; + delete stop_req_p_; +} + +Compressed_music * +Compressed_music_iterator::compressed_l () const +{ + return (Compressed_music*) music_l_; +} + +void +Compressed_music_iterator::construct_children () +{ + /* + start_req_p_->plet_i_ = compressed_l ()->den_i_; + stop_req_p_->plet_i_ = compressed_l ()->den_i_; + */ + Music_wrapper_iterator::construct_children (); +} + +void +Compressed_music_iterator::do_process_and_next (Moment m) +{ + if (first_b_) + { + bool success = report_to_l ()->try_request (start_req_p_); + if (!success) + music_l_->warning ( _("No one to print a tuplet start bracket")); + } + + Music_wrapper_iterator::do_process_and_next (m); + + if (!ok ()) + { + bool success = report_to_l ()->try_request (stop_req_p_); + if (!success) + music_l_->warning ( _("No one to print a tuplet stop bracket")); + } +} diff --git a/lily/compressed-music.cc b/lily/compressed-music.cc new file mode 100644 index 0000000000..5c03ef1649 --- /dev/null +++ b/lily/compressed-music.cc @@ -0,0 +1,23 @@ +/* + compressed-music.cc -- implement Compressed_music + + source file of the GNU LilyPond music typesetter + + (c) 1998 Han-Wen Nienhuys + + */ + +#include "compressed-music.hh" + + +Compressed_music::Compressed_music (int n, int d,Music *mp) + : Music_wrapper (mp) +{ + num_i_ = n; + den_i_ = d; + element_p_->compress (Moment (num_i_,den_i_)); +} + +IMPLEMENT_IS_TYPE_B1(Compressed_music, Music_wrapper); + + diff --git a/lily/include/auto-plet-engraver.hh b/lily/include/auto-plet-engraver.hh new file mode 100644 index 0000000000..a8cafb9c7c --- /dev/null +++ b/lily/include/auto-plet-engraver.hh @@ -0,0 +1,39 @@ +/* + auto-plet-engraver.hh -- declare Auto_plet_engraver + + source file of the GNU LilyPond music typesetter + + (c) 1998 Han-Wen Nienhuys + + */ + +#ifndef AUTO_PLET_ENGRAVER_HH +#define AUTO_PLET_ENGRAVER_HH + +#include "engraver.hh" + +class Tuplet_engraver : public Engraver +{ + void typeset_all (); +public: + Tuplet_engraver (); + DECLARE_MY_RUNTIME_TYPEINFO; + TRANSLATOR_CLONE(Tuplet_engraver); + +protected: + Link_array bracket_req_arr_; + + Link_array started_span_p_arr_; + Link_array stop_now_span_p_arr_; + + virtual void do_removal_processing (); + virtual void acknowledge_element (Score_element_info); + virtual void do_pre_move_processing (); + virtual bool do_try_request (Request*r); + virtual void do_process_requests (); + virtual void do_post_move_processing (); +}; + + + +#endif /* AUTO_PLET_ENGRAVER_HH */ diff --git a/lily/include/change-iterator.hh b/lily/include/change-iterator.hh index a4d435be5b..409b3a648d 100644 --- a/lily/include/change-iterator.hh +++ b/lily/include/change-iterator.hh @@ -15,15 +15,13 @@ class Change_iterator : public Music_iterator { - Change_translator *change_l_; - + Change_translator *change_l (); void error (String); public: DECLARE_MY_RUNTIME_TYPEINFO; - Change_iterator (Change_translator* prop_l); protected: - virtual void process_and_next (Moment); + virtual void do_process_and_next (Moment); }; #endif diff --git a/lily/include/chord-iterator.hh b/lily/include/chord-iterator.hh index be48f33572..0ce4d63a32 100644 --- a/lily/include/chord-iterator.hh +++ b/lily/include/chord-iterator.hh @@ -16,16 +16,14 @@ class Simultaneous_music_iterator : public Music_iterator { - const Simultaneous_music *simultaneous_music_C_; + Simultaneous_music *simultaneous_music_l() const; Pointer_list children_p_list_; public: - ~Simultaneous_music_iterator(); - Simultaneous_music_iterator (Simultaneous_music const*); DECLARE_MY_RUNTIME_TYPEINFO; protected: virtual void do_print() const; virtual void construct_children(); - virtual void process_and_next (Moment); + virtual void do_process_and_next (Moment); virtual Moment next_moment() const; virtual bool ok() const; }; diff --git a/lily/include/clef-engraver.hh b/lily/include/clef-engraver.hh index 56c4fbc1d8..813a153393 100644 --- a/lily/include/clef-engraver.hh +++ b/lily/include/clef-engraver.hh @@ -37,7 +37,6 @@ public: Direction octave_dir_; String clef_type_str_; - /* ************** */ Clef_engraver(); DECLARE_MY_RUNTIME_TYPEINFO; diff --git a/lily/include/col-info.hh b/lily/include/col-info.hh index a01afd3c74..3b412a321f 100644 --- a/lily/include/col-info.hh +++ b/lily/include/col-info.hh @@ -34,7 +34,6 @@ struct Column_info { Drul_array< Array > rods_; - /* *************** */ Column_info(); Column_info (Paper_column *,Real const *); diff --git a/lily/include/colhpos.hh b/lily/include/colhpos.hh index e46991dc33..964933e2df 100644 --- a/lily/include/colhpos.hh +++ b/lily/include/colhpos.hh @@ -21,7 +21,6 @@ struct Column_x_positions { Real energy_f_; bool satisfies_constraints_b_; - /* ************** */ void OK() const; ~Column_x_positions(); void solve_line(); diff --git a/lily/include/command-request.hh b/lily/include/command-request.hh index 3e187487f3..a76a351861 100644 --- a/lily/include/command-request.hh +++ b/lily/include/command-request.hh @@ -32,6 +32,7 @@ public: DEFAULTACCESSOR(Command_script_req) DEFAULTACCESSOR(Break_req) DEFAULTACCESSOR(Mark_req) + DEFAULTACCESSOR(Bracket_req) }; @@ -170,4 +171,10 @@ public: REQUESTMETHODS(Clef_change_req); }; +class Bracket_req : public Span_req, public Command_req { + +public: + REQUESTMETHODS(Bracket_req); +}; + #endif // COMMANDREQUEST_HH diff --git a/lily/include/compressed-music-iterator.hh b/lily/include/compressed-music-iterator.hh new file mode 100644 index 0000000000..84b92abe3d --- /dev/null +++ b/lily/include/compressed-music-iterator.hh @@ -0,0 +1,30 @@ +/* + compressed-music-iterator.hh -- declare Compressed_music_iterator + + source file of the GNU LilyPond music typesetter + + (c) 1998 Han-Wen Nienhuys + + */ + +#ifndef COMPRESSED_MUSIC_ITERATOR_HH +#define COMPRESSED_MUSIC_ITERATOR_HH + +#include "music-wrapper-iterator.hh" + +class Compressed_music_iterator : public Music_wrapper_iterator +{ +public: + Bracket_req* start_req_p_; + Bracket_req* stop_req_p_; + DECLARE_MY_RUNTIME_TYPEINFO; + Compressed_music_iterator(); + ~Compressed_music_iterator (); + virtual void do_process_and_next (Moment); + virtual void construct_children (); + Compressed_music *compressed_l ()const; +}; + + +#endif /* COMPRESSED_MUSIC_ITERATOR_HH */ + diff --git a/lily/include/compressed-music.hh b/lily/include/compressed-music.hh new file mode 100644 index 0000000000..f234b7497b --- /dev/null +++ b/lily/include/compressed-music.hh @@ -0,0 +1,29 @@ +/* + compressed-music.hh -- declare Compressed_music + + source file of the GNU LilyPond music typesetter + + (c) 1998 Han-Wen Nienhuys + + */ + +#ifndef COMPRESSED_MUSIC_HH +#define COMPRESSED_MUSIC_HH + +#include "music-wrapper.hh" +/** + Tempo expansion or compression. + */ +class Compressed_music : public Music_wrapper +{ +public: + int num_i_; + int den_i_; + + Compressed_music (int, int, Music *); + DECLARE_MY_RUNTIME_TYPEINFO; + VIRTUAL_COPY_CONS (Compressed_music, Music); +}; + +#endif /* COMPRESSED_MUSIC_HH */ + diff --git a/lily/include/dynamic-engraver.hh b/lily/include/dynamic-engraver.hh index 1c2a574eff..d4add06755 100644 --- a/lily/include/dynamic-engraver.hh +++ b/lily/include/dynamic-engraver.hh @@ -19,7 +19,6 @@ class Dynamic_engraver : public Engraver { Crescendo * cresc_p_; Span_dynamic_req * cresc_req_l_; Array dynamic_req_l_arr_; - /* ************** */ public: TRANSLATOR_CLONE(Dynamic_engraver); Dynamic_engraver(); diff --git a/lily/include/file-results.hh b/lily/include/file-results.hh index f4cf779c17..5f4b221e1e 100644 --- a/lily/include/file-results.hh +++ b/lily/include/file-results.hh @@ -12,7 +12,7 @@ #include "fproto.hh" void do_one_file (String init_str, String file_str); -extern Header *header_global_p; +extern Scope *header_global_p; extern Array target_str_global_array; extern Array inclusion_global_array; extern Link_array score_global_array; diff --git a/lily/include/grouping.hh b/lily/include/grouping.hh index b0bff2363d..ada7b4ab5c 100644 --- a/lily/include/grouping.hh +++ b/lily/include/grouping.hh @@ -18,7 +18,6 @@ struct Rhythmic_grouping { Array children; MInterval *interval_; - /* *************** */ Array intervals(); MInterval interval() const; diff --git a/lily/include/header.hh b/lily/include/header.hh index 288ca7a671..e65d065e92 100644 --- a/lily/include/header.hh +++ b/lily/include/header.hh @@ -12,19 +12,12 @@ #include "string.hh" #include "dictionary.hh" +#include "scope.hh" /** Store bibliographical information. The information in the \header block is read into this struct. Lily does not process this information. */ -struct Header : Dictionary -{ - Header (); - - String tex_string () const; - String ps_string () const; - - String lily_id_str_; -}; +typedef Scope Header; #endif // HEADER_HH diff --git a/lily/include/identifier.hh b/lily/include/identifier.hh index 63083109f7..cb36305966 100644 --- a/lily/include/identifier.hh +++ b/lily/include/identifier.hh @@ -37,8 +37,6 @@ virtual Class ## _identifier * access_ ## Class ## _identifier () { return 0; } /** A declarable data structure in mudela. - - */ struct Identifier : public Input { bool init_b_; diff --git a/lily/include/lily-proto.hh b/lily/include/lily-proto.hh index 25682a4cc4..b7af83ec16 100644 --- a/lily/include/lily-proto.hh +++ b/lily/include/lily-proto.hh @@ -61,7 +61,8 @@ struct Collision; struct Collision_engraver; struct Command_req; struct Command_script_req; -struct Complex_music; +struct Compressed_music; +struct Compressed_music_iterator; struct Cresc_req; struct Crescendo ; struct Decresc_req; @@ -82,11 +83,10 @@ struct Music_output; struct Musical_pitch; struct Music_output_def; struct Global_translator; -struct Group_change_req; struct Hara_kiri_line_group_engraver; struct Hara_kiri_vertical_group_spanner; struct Head_column; -struct Header; + struct Horizontal_align_item; struct Horizontal_group_element; struct Horizontal_group_item; @@ -144,6 +144,7 @@ struct Multi_measure_rest_engraver; struct Musical_script_req; struct Music_list; struct Musical_req; +struct Musical_span_req; struct Music; struct Music_sequence; struct Music_wrapper_iterator; @@ -252,4 +253,6 @@ struct Sequential_music; struct Request_chord; typedef Rational Moment; +typedef Scope Header; + #endif // LILY_PROTO_HH diff --git a/lily/include/lookup.hh b/lily/include/lookup.hh index 40dc740c14..7efe60bb7e 100644 --- a/lily/include/lookup.hh +++ b/lily/include/lookup.hh @@ -48,7 +48,7 @@ public: virtual Atom hairpin (Real width, bool decresc, bool continued) const = 0; virtual Lookup* lookup_p (Lookup const&) const = 0; virtual Lookup* lookup_p (Symtables const&) const = 0; - virtual Paper_outputter* paper_outputter_p (Paper_stream*, Paper_def*, Header*, String) const = 0; + virtual Paper_outputter* paper_outputter_p (Paper_stream*, Paper_def*, Scope*, String) const = 0; virtual Paper_stream* paper_stream_p () const = 0; virtual Atom plet (Real dy, Real dx, Direction dir) const = 0; void print () const; diff --git a/lily/include/molecule.hh b/lily/include/molecule.hh index f8edc37c25..7907be0ae4 100644 --- a/lily/include/molecule.hh +++ b/lily/include/molecule.hh @@ -19,7 +19,6 @@ struct Molecule { Pointer_list atoms_; // change to List? - /* *************** */ Molecule() { } Molecule (Atom const &a); diff --git a/lily/include/music-iterator.hh b/lily/include/music-iterator.hh index f5e04126f8..e7bda4c554 100644 --- a/lily/include/music-iterator.hh +++ b/lily/include/music-iterator.hh @@ -21,25 +21,26 @@ class Music_iterator { void push_translator (Translator_group*); void pop_translator(); protected: + Music const * music_l_; bool first_b_; virtual void do_print() const; virtual Translator_group* get_req_translator_l(); - Music_iterator* get_iterator_p (Music*) const; + Music_iterator* get_iterator_p (Music const*) const; void set_translator (Translator_group*); - Music_iterator *daddy_iter_l_; - + virtual void do_process_and_next (Moment until); + void inherit_info (Music_iterator const *parent); public: Translator_group*report_to_l() const; DECLARE_MY_RUNTIME_TYPEINFO; - static Music_iterator* static_get_iterator_p (Music*,Translator_group*); + static Music_iterator* static_get_iterator_p (Music const*,Translator_group*); Music_iterator(); - virtual void process_and_next (Moment until); virtual Moment next_moment() const; virtual bool ok() const; virtual ~Music_iterator(); + void process_and_next (Moment until); /** Construct sub-iterators, and set the translator to diff --git a/lily/include/music-list.hh b/lily/include/music-list.hh index 05822a649f..6cdda3dc5b 100644 --- a/lily/include/music-list.hh +++ b/lily/include/music-list.hh @@ -29,17 +29,17 @@ public: */ class Music_sequence : public Music { - public: int multi_level_i_; Music_list * music_p_list_p_; - + Music_sequence (Music_sequence const&); Music_sequence (Music_list *l_p); DECLARE_MY_RUNTIME_TYPEINFO; VIRTUAL_COPY_CONS(Music_sequence,Music); virtual void transpose (Musical_pitch ); + virtual void compress (Moment); void add_music (Music *music_p); protected: virtual void do_print() const; @@ -51,13 +51,12 @@ protected: class Simultaneous_music : public Music_sequence { public: - Simultaneous_music(Music_list *); DECLARE_MY_RUNTIME_TYPEINFO; VIRTUAL_COPY_CONS(Simultaneous_music,Music); + Simultaneous_music(Music_list *); virtual Musical_pitch to_relative_octave (Musical_pitch); - virtual void translate (Moment dt); - virtual MInterval time_int() const; + virtual Moment duration () const; }; /** @@ -67,24 +66,22 @@ public: class Request_chord : public Simultaneous_music { public: + VIRTUAL_COPY_CONS(Request_chord, Music); DECLARE_MY_RUNTIME_TYPEINFO; virtual Musical_pitch to_relative_octave (Musical_pitch); Request_chord(); - VIRTUAL_COPY_CONS(Request_chord, Music); }; /** Sequential_music is a list of music-elements which are placed behind each other. */ class Sequential_music : public Music_sequence { - public: - Moment offset_mom_; - virtual Musical_pitch to_relative_octave (Musical_pitch); - Sequential_music(Music_list*); DECLARE_MY_RUNTIME_TYPEINFO; VIRTUAL_COPY_CONS(Sequential_music, Music); - virtual void translate (Moment dt); - virtual MInterval time_int() const; + + virtual Musical_pitch to_relative_octave (Musical_pitch); + Sequential_music(Music_list*); + virtual Moment duration () const; }; #endif // Music_sequence_HH diff --git a/lily/include/music-output.hh b/lily/include/music-output.hh index 04a16e5d8d..cf17d6a641 100644 --- a/lily/include/music-output.hh +++ b/lily/include/music-output.hh @@ -19,7 +19,7 @@ class Music_output { public: - Header * header_l_; + Scope * header_l_; String default_out_str_; String origin_str_; int errorlevel_i_; diff --git a/lily/include/music-wrapper-iterator.hh b/lily/include/music-wrapper-iterator.hh index 4437d461ed..114704e152 100644 --- a/lily/include/music-wrapper-iterator.hh +++ b/lily/include/music-wrapper-iterator.hh @@ -16,13 +16,13 @@ class Music_wrapper_iterator : public Music_iterator { Music_iterator *child_iter_p_; - Music_wrapper *music_l_; + Music_wrapper *music_wrapper_l(); public: - Music_wrapper_iterator (Music_wrapper*); + Music_wrapper_iterator (); ~Music_wrapper_iterator (); virtual void do_print () const; virtual void construct_children () ; - virtual void process_and_next (Moment) ; + virtual void do_process_and_next (Moment) ; virtual Moment next_moment () const; virtual bool ok () const; DECLARE_MY_RUNTIME_TYPEINFO; diff --git a/lily/include/music-wrapper.hh b/lily/include/music-wrapper.hh index cdecc0b5ba..7c60c91dda 100644 --- a/lily/include/music-wrapper.hh +++ b/lily/include/music-wrapper.hh @@ -23,11 +23,12 @@ public: DECLARE_MY_RUNTIME_TYPEINFO; VIRTUAL_COPY_CONS (Music_wrapper, Music); Music_wrapper (Music_wrapper const&); - virtual MInterval time_int () const; + virtual Moment duration () const; virtual ~Music_wrapper (); }; + #endif /* MUSIC_WRAPPER_HH */ diff --git a/lily/include/music.hh b/lily/include/music.hh index 9a7b6f2d97..b05bc0db19 100644 --- a/lily/include/music.hh +++ b/lily/include/music.hh @@ -42,11 +42,12 @@ public: String translator_id_str_; virtual Musical_pitch to_relative_octave (Musical_pitch); - virtual MInterval time_int() const; + virtual Moment duration () const; + virtual ~Music(){} void print() const; virtual void transpose (Musical_pitch ); - virtual void translate (Moment dt); + virtual void compress (Moment); VIRTUAL_COPY_CONS(Music,Music); DECLARE_MY_RUNTIME_TYPEINFO; Music(); diff --git a/lily/include/musical-request.hh b/lily/include/musical-request.hh index d7bce858fa..70e6467542 100644 --- a/lily/include/musical-request.hh +++ b/lily/include/musical-request.hh @@ -36,7 +36,8 @@ public: DEFAULTACCESSOR(Skip_req) DEFAULTACCESSOR(Dynamic_req) DEFAULTACCESSOR(Absolute_dynamic_req ) - DEFAULTACCESSOR(Tie_req ) + DEFAULTACCESSOR(Tie_req) + DEFAULTACCESSOR(Musical_span_req) DEFAULTACCESSOR(Plet_req) DEFAULTACCESSOR(Span_dynamic_req ) DEFAULTACCESSOR(Abbreviation_req) @@ -47,15 +48,14 @@ public: /** a request with a duration. - This request is used only a base class. + This request is used only used as a base class. */ class Rhythmic_req : public virtual Musical_req { public: Duration duration_; - /* *************** */ - void set_duration (Duration); bool do_equal_b (Request*) const; + void compress (Moment); virtual Moment duration() const; Rhythmic_req(); static int compare (Rhythmic_req const&,Rhythmic_req const&); @@ -71,7 +71,6 @@ struct Spacing_req :virtual Request { Moment next; Real distance; Real strength; - /* *************** */ Spacing_req(); REQUESTMETHODS(Spacing_req); }; @@ -95,7 +94,6 @@ public: /// the characteristics of the text Text_def *tdef_p_; - /* *************** */ Text_req (int d, Text_def*); ~Text_req(); Text_req (Text_req const&); @@ -155,27 +153,16 @@ public: }; -/** - Requests to start or stop something. - This type of request typically results in the creation of a #Spanner# -*/ -class Span_req : public virtual Musical_req { +class Musical_span_req : public Span_req, public virtual Musical_req +{ public: - /// should the spanner start or stop, or is it unwanted? - enum Spantype { - NOSPAN, START, STOP - } spantype; - bool do_equal_b (Request*) const; - REQUESTMETHODS(Span_req); - - Span_req(); + REQUESTMETHODS(Musical_span_req); }; /** Start / stop a beam at this note */ -class Beam_req : public Span_req { +class Beam_req : public Musical_span_req { public: - /* *************** */ REQUESTMETHODS(Beam_req); Beam_req(); @@ -184,7 +171,7 @@ public: /** Start / stop an abbreviation beam at this note. */ -class Abbreviation_beam_req : public Span_req { +class Abbreviation_beam_req : public Musical_span_req { public: REQUESTMETHODS (Abbreviation_beam_req); @@ -202,14 +189,14 @@ public: }; /// a slur -class Slur_req : public Span_req { +class Slur_req : public Musical_span_req { public: REQUESTMETHODS(Slur_req); }; /// a plet (bracket with) number -class Plet_req : public Span_req { +class Plet_req : public Musical_span_req { public: int plet_i_; @@ -247,7 +234,7 @@ public: REQUESTMETHODS(Absolute_dynamic_req); }; -class Span_dynamic_req : public Dynamic_req, public Span_req { +class Span_dynamic_req : public Dynamic_req, public Musical_span_req { public: virtual bool do_equal_b (Request*) const; /// Grow or shrink the volume: 1=cresc, -1 = decresc diff --git a/lily/include/my-lily-lexer.hh b/lily/include/my-lily-lexer.hh index 5b5d17c008..3030a09eb4 100644 --- a/lily/include/my-lily-lexer.hh +++ b/lily/include/my-lily-lexer.hh @@ -43,7 +43,6 @@ public: Keyword_table * keytable_p_; int errorlevel_i_; - /* *************** */ void start_main_input (); void set_notename_table(Notename_table*tab_p); diff --git a/lily/include/my-lily-parser.hh b/lily/include/my-lily-parser.hh index e68324ddcd..8024bb552e 100644 --- a/lily/include/my-lily-parser.hh +++ b/lily/include/my-lily-parser.hh @@ -40,7 +40,7 @@ public: int default_abbrev_i_; Duration default_duration_; Plet plet_; - Header *default_header_p_; + Scope *default_header_p_; bool first_b_; diff --git a/lily/include/p-col.hh b/lily/include/p-col.hh index 674139c149..a6061778a9 100644 --- a/lily/include/p-col.hh +++ b/lily/include/p-col.hh @@ -55,7 +55,6 @@ public: bool error_mark_b_; bool used_b_ ; // manual override.. - /* *************** */ /// which one (left =0) int rank_i() const; diff --git a/lily/include/property-iterator.hh b/lily/include/property-iterator.hh index ac0703dc29..ea429a36a4 100644 --- a/lily/include/property-iterator.hh +++ b/lily/include/property-iterator.hh @@ -14,13 +14,12 @@ class Property_iterator : public Music_iterator { - Translation_property *property_l_; + Translation_property *property_l() const; public: DECLARE_MY_RUNTIME_TYPEINFO; - Property_iterator (Translation_property* prop_l); protected: - virtual void process_and_next (Moment); + virtual void do_process_and_next (Moment); }; #endif // PROPERTY_ITERATOR_HH diff --git a/lily/include/ps-lookup.hh b/lily/include/ps-lookup.hh index 84f4abdcee..2eb9ed025a 100644 --- a/lily/include/ps-lookup.hh +++ b/lily/include/ps-lookup.hh @@ -26,7 +26,7 @@ public: virtual Atom hairpin (Real width, bool decresc, bool continued) const; virtual Lookup* lookup_p (Lookup const&) const; virtual Lookup* lookup_p (Symtables const&) const; - virtual Paper_outputter* paper_outputter_p (Paper_stream*, Paper_def*, Header*, String) const; + virtual Paper_outputter* paper_outputter_p (Paper_stream*, Paper_def*, Scope*, String) const; virtual Paper_stream* paper_stream_p () const; virtual Atom plet (Real dy , Real dx, Direction dir) const; virtual Atom ps_beam (Real slope, Real width, Real thick) const; diff --git a/lily/include/request-iterator.hh b/lily/include/request-iterator.hh index 15640ccd74..6d5cd95baf 100644 --- a/lily/include/request-iterator.hh +++ b/lily/include/request-iterator.hh @@ -12,16 +12,23 @@ #include "music-iterator.hh" +/** + Walk through a Request_chord + */ class Request_chord_iterator : public Music_iterator { - const Request_chord * elt_l_; + Request_chord * elt_l () const; + /** + cache elt_l ()->duration (). + */ Moment elt_duration_; bool last_b_; + public: - Request_chord_iterator (Request_chord*); + Request_chord_iterator (); DECLARE_MY_RUNTIME_TYPEINFO; protected: - virtual void process_and_next (Moment); + virtual void do_process_and_next (Moment); virtual Moment next_moment() const; virtual void construct_children(); virtual bool ok() const; diff --git a/lily/include/request.hh b/lily/include/request.hh index eab7b2d8b0..c45d5905e1 100644 --- a/lily/include/request.hh +++ b/lily/include/request.hh @@ -29,16 +29,11 @@ class Request : public Music { public: - /* *************** */ - virtual ~Request(){} DECLARE_MY_RUNTIME_TYPEINFO; VIRTUAL_COPY_CONS(Request,Music); - virtual MInterval time_int() const; - virtual Moment duration() const { return 0; } - /* accessors for children maybe checkout RTTI */ @@ -82,5 +77,22 @@ public: Script_req (Script_req const&); }; - + +/** + Requests to start or stop something. + This type of request typically results in the creation of a #Spanner# +*/ +class Span_req : public virtual Request { +public: + /// should the spanner start or stop, or is it unwanted? + enum Spantype { + NOSPAN, START, STOP + } spantype; + bool do_equal_b (Request*) const; + REQUESTMETHODS(Span_req); + + Span_req(); +}; + + #endif diff --git a/lily/include/score-column.hh b/lily/include/score-column.hh index 6f0d7a6cdf..dfe944c5a5 100644 --- a/lily/include/score-column.hh +++ b/lily/include/score-column.hh @@ -40,7 +40,6 @@ public: /// length of notes/rests in this column Array durations; - /* *************** */ Moment when() { return when_; } Score_column (Moment when); diff --git a/lily/include/score-element-info.hh b/lily/include/score-element-info.hh index 3e31b87057..95d69a0d48 100644 --- a/lily/include/score-element-info.hh +++ b/lily/include/score-element-info.hh @@ -22,7 +22,6 @@ struct Score_element_info { Request*req_l_; Array origin_grav_l_arr_; - /* *** */ Score_element_info (Score_element*, Request*); Score_element_info(); }; diff --git a/lily/include/score.hh b/lily/include/score.hh index 7817d7f891..e86b629a28 100644 --- a/lily/include/score.hh +++ b/lily/include/score.hh @@ -24,7 +24,7 @@ public: /// paper_, staffs_ and commands_ form the problem definition. Link_array def_p_arr_; Music * music_p_; - Header * header_p_; + Scope * header_p_; int errorlevel_i_; diff --git a/lily/include/stem.hh b/lily/include/stem.hh index 6bef757c91..a54b211849 100644 --- a/lily/include/stem.hh +++ b/lily/include/stem.hh @@ -78,7 +78,6 @@ public: /// direction of the beam Direction beam_dir_; - /* *************** */ Stem (); /// ensure that this Stem also encompasses the Notehead #n# diff --git a/lily/include/tex-lookup.hh b/lily/include/tex-lookup.hh index 24aadf1644..cdb9839fcc 100644 --- a/lily/include/tex-lookup.hh +++ b/lily/include/tex-lookup.hh @@ -28,7 +28,7 @@ public: virtual Atom hairpin (Real width, bool decresc, bool continued) const; virtual Lookup* lookup_p (Lookup const&) const; virtual Lookup* lookup_p (Symtables const&) const; - virtual Paper_outputter* paper_outputter_p (Paper_stream*, Paper_def*, Header*, String) const; + virtual Paper_outputter* paper_outputter_p (Paper_stream*, Paper_def*, Scope*, String) const; virtual Paper_stream* paper_stream_p () const; virtual Atom plet (Real dy , Real dx, Direction dir) const; virtual String print_dimen (Real) const; diff --git a/lily/include/text-item.hh b/lily/include/text-item.hh index 8c6ba84f69..b0ffa91f33 100644 --- a/lily/include/text-item.hh +++ b/lily/include/text-item.hh @@ -21,7 +21,6 @@ public: /// do I have width? bool fat_b_; - /* ***************/ Text_item (General_script_def* ,Direction dir=CENTER); virtual ~Text_item (); diff --git a/lily/include/time-description.hh b/lily/include/time-description.hh index f92b48ba79..5ac4e0330e 100644 --- a/lily/include/time-description.hh +++ b/lily/include/time-description.hh @@ -33,7 +33,6 @@ struct Time_description { /// idem int bars_i_; - /* *************** */ void set_cadenza (bool); Moment when_mom () const { return when_; } void OK() const; diff --git a/lily/include/voice-iterator.hh b/lily/include/voice-iterator.hh index d029496f41..97e905254f 100644 --- a/lily/include/voice-iterator.hh +++ b/lily/include/voice-iterator.hh @@ -14,23 +14,24 @@ #include "music-iterator.hh" #include "pcursor.hh" -class Sequential_music_iterator : private PCursor, public Music_iterator +class Sequential_music_iterator : public Music_iterator { Moment here_mom_; - const Sequential_music * sequential_music_C_; + PCursor *cursor_p_; Music_iterator * iter_p_; void start_next_element(); void leave_element(); void set_Sequential_music_translator(); - +protected: + Sequential_music * sequential_music_l() const; public: - Sequential_music_iterator (Sequential_music const*); + Sequential_music_iterator (); DECLARE_MY_RUNTIME_TYPEINFO; protected: virtual void do_print() const; virtual void construct_children(); ~Sequential_music_iterator(); - virtual void process_and_next (Moment); + virtual void do_process_and_next (Moment); virtual Moment next_moment() const; virtual bool ok() const; }; diff --git a/lily/music-iterator.cc b/lily/music-iterator.cc index 81622368a4..b19215f512 100644 --- a/lily/music-iterator.cc +++ b/lily/music-iterator.cc @@ -16,9 +16,11 @@ #include "translation-property.hh" #include "change-iterator.hh" #include "change-translator.hh" - #include "music-wrapper.hh" #include "music-wrapper-iterator.hh" +#include "compressed-music-iterator.hh" +#include "compressed-music.hh" + IMPLEMENT_IS_TYPE_B(Music_iterator); @@ -111,12 +113,18 @@ Music_iterator::next_moment() const return 0; } + void -Music_iterator::process_and_next (Moment) +Music_iterator::process_and_next (Moment m) { - first_b_ = false; + do_process_and_next (m); } +void +Music_iterator::do_process_and_next (Moment) +{ + first_b_ = false; +} bool Music_iterator::ok() const @@ -125,49 +133,55 @@ Music_iterator::ok() const } Music_iterator* -Music_iterator::static_get_iterator_p (Music *m, - Translator_group*report_l) +Music_iterator::static_get_iterator_p (Music const *m, Translator_group *report_l) { Music_iterator * p =0; if (m->is_type_b (Request_chord::static_name())) - p = new Request_chord_iterator ((Request_chord*) m); + p = new Request_chord_iterator; else if (m->is_type_b (Simultaneous_music::static_name())) - p = new Simultaneous_music_iterator ((Simultaneous_music*) m); + p = new Simultaneous_music_iterator; else if (m->is_type_b (Sequential_music::static_name())) - p = new Sequential_music_iterator ((Sequential_music*) m); + p = new Sequential_music_iterator; else if (m->is_type_b (Translation_property::static_name ())) - p = new Property_iterator((Translation_property *) m); + p = new Property_iterator; else if (m->is_type_b (Change_translator::static_name ())) - p = new Change_iterator((Change_translator*) m); + p = new Change_iterator; + else if (m->is_type_b (Compressed_music::static_name ())) + p = new Compressed_music_iterator; else if (m->is_type_b (Music_wrapper::static_name ())) - p = new Music_wrapper_iterator ((Music_wrapper *)m); - - - if (m -> translator_type_str_.length_i ()) + p = new Music_wrapper_iterator; + + p->music_l_ = m; + if (m->translator_type_str_.length_i ()) { Translator_group* a =report_l-> - find_create_translator_l (m-> translator_type_str_, m->translator_id_str_); + find_create_translator_l (m->translator_type_str_, m->translator_id_str_); p->set_translator (a); } if (! p->report_to_l()) p ->set_translator (report_l); + return p; } +void +Music_iterator::inherit_info(Music_iterator const *parent) +{ +} + Music_iterator* -Music_iterator::get_iterator_p (Music*m) const +Music_iterator::get_iterator_p (Music const*m) const { - Music_iterator*p = static_get_iterator_p (m,report_to_l()); - p->daddy_iter_l_ = (Music_iterator*)this; + Music_iterator*p = static_get_iterator_p (m, report_to_l()); + p->inherit_info (this); p->construct_children(); return p; } Music_iterator::Music_iterator() { - daddy_iter_l_ =0; first_b_ = true; } diff --git a/lily/music-list.cc b/lily/music-list.cc index b9b72ded25..8f29446699 100644 --- a/lily/music-list.cc +++ b/lily/music-list.cc @@ -17,21 +17,21 @@ IMPLEMENT_IS_TYPE_B1(Sequential_music,Music_sequence); IMPLEMENT_IS_TYPE_B1(Simultaneous_music,Music_sequence); -MInterval -Simultaneous_music::time_int() const +Moment +Simultaneous_music::duration () const { - MInterval m; + Moment dur = 0; for (iter (music_p_list_p_->top(), i); i.ok (); i++) - m.unite (i->time_int()); + dur = dur >? i->duration (); - return m; + return dur; } void -Simultaneous_music::translate (Moment m) +Music_sequence::compress (Moment m) { - for (iter (music_p_list_p_->top(), i); i.ok (); i++) - i->translate (m); + for (PCursor i(music_p_list_p_->top()); i.ok (); i++) + i->compress (m); } Simultaneous_music::Simultaneous_music(Music_list *p) @@ -43,24 +43,17 @@ Simultaneous_music::Simultaneous_music(Music_list *p) Sequential_music::Sequential_music(Music_list *p) : Music_sequence (p) { - offset_mom_ =0; } -MInterval -Sequential_music::time_int() const +Moment +Sequential_music::duration () const { Moment last=0; for (iter (music_p_list_p_->top(), i); i.ok (); i++) { - MInterval interval = i->time_int(); - - /* - c4 <> c4 - */ - if (!interval.empty_b()) - last += interval.length(); + last += i->duration (); } - return offset_mom_ + MInterval (0,last); + return last; } Musical_pitch @@ -75,14 +68,6 @@ Simultaneous_music::to_relative_octave (Musical_pitch p) return music_p_list_p_->do_relative_octave (p, true); } -void -Sequential_music::translate (Moment dt) -{ - offset_mom_ += dt; -} - - - Musical_pitch Music_list::do_relative_octave (Musical_pitch last, bool ret_first) diff --git a/lily/music-wrapper-iterator.cc b/lily/music-wrapper-iterator.cc index 13b2a90c31..4e0ca78ff7 100644 --- a/lily/music-wrapper-iterator.cc +++ b/lily/music-wrapper-iterator.cc @@ -1,5 +1,5 @@ /* - music-wrapper-iterator.cc -- implement + music-wrapper-iterator.cc -- implement Music_wrapper_iterator source file of the GNU LilyPond music typesetter @@ -11,10 +11,9 @@ #include "music-wrapper-iterator.hh" #include "music-wrapper.hh" -Music_wrapper_iterator::Music_wrapper_iterator (Music_wrapper *r) +Music_wrapper_iterator::Music_wrapper_iterator () { child_iter_p_ =0; - music_l_ = r; } IMPLEMENT_IS_TYPE_B1(Music_wrapper_iterator, Music_iterator); @@ -28,7 +27,7 @@ Music_wrapper_iterator::do_print () const void Music_wrapper_iterator::construct_children () { - child_iter_p_ = get_iterator_p (music_l_->element_p_); + child_iter_p_ = get_iterator_p (music_wrapper_l ()->element_p_); } Music_wrapper_iterator::~Music_wrapper_iterator () @@ -36,7 +35,11 @@ Music_wrapper_iterator::~Music_wrapper_iterator () delete child_iter_p_; } - +Music_wrapper* +Music_wrapper_iterator::music_wrapper_l () +{ + return (Music_wrapper*) music_l_; +} bool Music_wrapper_iterator::ok () const { @@ -44,10 +47,10 @@ Music_wrapper_iterator::ok () const } void -Music_wrapper_iterator::process_and_next (Moment m) +Music_wrapper_iterator::do_process_and_next (Moment m) { child_iter_p_->process_and_next (m); - Music_iterator::process_and_next (m); + Music_iterator::do_process_and_next (m); } Moment diff --git a/lily/music-wrapper.cc b/lily/music-wrapper.cc index b6f6618e79..1785b386d4 100644 --- a/lily/music-wrapper.cc +++ b/lily/music-wrapper.cc @@ -44,8 +44,8 @@ Music_wrapper::Music_wrapper(Music*p) IMPLEMENT_IS_TYPE_B1 (Music_wrapper, Music); -MInterval -Music_wrapper::time_int () const +Moment +Music_wrapper::duration () const { - return element_p_->time_int (); + return element_p_->duration (); } diff --git a/lily/music.cc b/lily/music.cc index 10ee1a3b3f..2127783d7b 100644 --- a/lily/music.cc +++ b/lily/music.cc @@ -12,10 +12,10 @@ #include "debug.hh" #include "musical-pitch.hh" -MInterval -Music::time_int() const +Moment +Music::duration () const { - return MInterval (0,0); + return 0; } void @@ -38,11 +38,6 @@ Music::transpose (Musical_pitch ) } -void -Music::translate (Moment) -{ -} - void Music::do_print() const { @@ -64,4 +59,7 @@ Music::to_relative_octave (Musical_pitch m) return m; } - +void +Music::compress (Moment) +{ +} diff --git a/lily/musical-request.cc b/lily/musical-request.cc index b1d5120fe8..3ee6004add 100644 --- a/lily/musical-request.cc +++ b/lily/musical-request.cc @@ -22,12 +22,17 @@ void Tie_req::do_print () const{} -/* *************** */ +IMPLEMENT_IS_TYPE_B1(Span_req,Request); +IMPLEMENT_IS_TYPE_B2(Musical_span_req, Span_req, Musical_span_req); - -IMPLEMENT_IS_TYPE_B1 (Span_req,Musical_req); +void +Musical_span_req::do_print () const +{ + Span_req::do_print (); +} + void Span_req::do_print () const @@ -77,7 +82,6 @@ Blank_req::do_print () const { Spacing_req::do_print (); } -/* *************** */ Melodic_req::Melodic_req () { @@ -116,7 +120,6 @@ Melodic_req::do_print () const pitch_.print (); } -/* *************** */ int Rhythmic_req::compare (Rhythmic_req const &r1, Rhythmic_req const &r2) { @@ -131,11 +134,6 @@ Rhythmic_req::do_equal_b (Request*r) const return !compare (*this, *rh); } -void -Rhythmic_req::set_duration (Duration d) -{ - duration_ = d; -} Rhythmic_req::Rhythmic_req () { @@ -158,7 +156,13 @@ Rhythmic_req::duration () const { return duration_.length (); } -/* *************** */ + +void +Rhythmic_req::compress (Moment m) +{ + duration_.compress (m); +} + @@ -170,7 +174,6 @@ Lyric_req::do_print () const Rhythmic_req::do_print (); } -/* *************** */ bool Note_req::do_equal_b (Request*r) const @@ -198,7 +201,6 @@ Note_req::do_print () const Rhythmic_req::do_print (); #endif } -/* *************** */ IMPLEMENT_IS_TYPE_B1 (Rest_req, Rhythmic_req); @@ -208,7 +210,6 @@ Rest_req::do_print () const Rhythmic_req::do_print (); } -/* *************** */ @@ -221,7 +222,6 @@ Multi_measure_rest_req::do_print () const } -/* *************** */ IMPLEMENT_IS_TYPE_B1 (Beam_req,Span_req); @@ -234,7 +234,6 @@ Beam_req::do_print () const { } -/* *************** */ IMPLEMENT_IS_TYPE_B1 (Abbreviation_beam_req, Span_req); @@ -266,7 +265,6 @@ Plet_req::do_print () const { } -/* *************** */ bool Span_req:: do_equal_b (Request*r) const @@ -280,7 +278,6 @@ Span_req::Span_req () spantype = NOSPAN; } -/* *************** */ Script_req::Script_req (Script_req const&s) { dir_ = s.dir_; @@ -332,7 +329,6 @@ Script_req::~Script_req () { delete scriptdef_p_; } -/* *************** */ Text_req::~Text_req () @@ -365,7 +361,6 @@ Text_req::do_print () const #endif } -/* *************** */ IMPLEMENT_IS_TYPE_B1 (Skip_req,Musical_req); diff --git a/lily/my-lily-lexer.cc b/lily/my-lily-lexer.cc index ee308432d9..82948a3067 100644 --- a/lily/my-lily-lexer.cc +++ b/lily/my-lily-lexer.cc @@ -35,12 +35,13 @@ static Keyword_ent the_key_tab[]={ {"grouping", GROUPING}, {"header", HEADER}, {"in", IN_T}, - {"lyric", LYRIC}, + {"lyrics", LYRICS}, {"key", KEY}, {"keysignature", KEYSIGNATURE}, {"mark", MARK}, {"musicalpitch", MUSICAL_PITCH}, {"time", TIME_T}, + {"times", TIMES}, {"midi", MIDI}, {"mm", MM_T}, {"name", NAME}, diff --git a/lily/my-lily-parser.cc b/lily/my-lily-parser.cc index ea2cbe6b5a..9f7e8c7fb3 100644 --- a/lily/my-lily-parser.cc +++ b/lily/my-lily-parser.cc @@ -14,7 +14,7 @@ #include "musical-request.hh" #include "command-request.hh" #include "parser.hh" -#include "header.hh" +#include "scope.hh" #include "file-results.hh" #include "midi-def.hh" #include "paper-def.hh" @@ -171,7 +171,7 @@ My_lily_parser::get_note_element (Note_req *rq, Duration * duration_p) assert (!duration_p->plet_b ()); duration_p->set_plet (1, 2); } - rq->set_duration (*duration_p); + rq->duration_ = *duration_p; rq->set_spot (here_input ()); delete duration_p ; return v; @@ -265,7 +265,7 @@ My_lily_parser::get_parens_request (int t) for (int i = 0; i < reqs.size (); i++) if (reqs[i]->access_Musical_req ()->access_Span_dynamic_req ()) { - Span_dynamic_req* s_l= (reqs[i]->access_Musical_req ()->access_Span_dynamic_req ()) ; + Span_dynamic_req* s_l= reqs[i]->access_Musical_req ()->access_Span_dynamic_req (); s_l->dynamic_dir_ = (t == '<') ? UP:DOWN; } diff --git a/lily/p-score.cc b/lily/p-score.cc index 25eaac2aa4..2dbc75925b 100644 --- a/lily/p-score.cc +++ b/lily/p-score.cc @@ -17,7 +17,7 @@ #include "p-col.hh" #include "p-score.hh" #include "p-col.hh" -#include "header.hh" +#include "scope.hh" #include "word-wrap.hh" #include "gourlay-breaking.hh" #include "paper-stream.hh" @@ -194,6 +194,8 @@ Paper_score::calc_breaking () return sol; } + + void Paper_score::process () { @@ -233,13 +235,14 @@ Paper_score::process () line_l->output_all (); *mlog << ']' << flush; remove_line (line_l); - } - + // huh? delete outputter_l_; delete paper_stream_p; outputter_l_ = 0; + + *mlog << '\n' << flush; } void diff --git a/lily/parser.yy b/lily/parser.yy index bc323e061f..428fff3c37 100644 --- a/lily/parser.yy +++ b/lily/parser.yy @@ -36,7 +36,6 @@ #include "translator-group.hh" #include "score.hh" #include "music-list.hh" -#include "header.hh" #include "duration-convert.hh" #include "change-translator.hh" #include "file-results.hh" @@ -44,10 +43,11 @@ #include "scope.hh" #include "relative-music.hh" #include "transposed-music.hh" +#include "compressed-music.hh" // mmm -Mudela_version oldest_version ("1.0.6"); -Mudela_version version ("1.0.6"); +Mudela_version oldest_version ("1.0.7"); +Mudela_version version ("1.0.8"); // needed for bison.simple's malloc() and free() @@ -63,6 +63,24 @@ int guess_plet_a[GUESS_PLET] = 4 }; +struct Assignment { + String *name_p_; + Identifier *id_p_; + ~Assignment () { + delete name_p_; + delete id_p_; + } + Assignment () { + name_p_ = 0; + id_p_ =0; + } + Assignment (Assignment const&s) + { + name_p_ = new String (*s.name_p_); + id_p_ = s.id_p_->clone (); + } +}; + Paper_def* current_paper = 0; #ifndef NDEBUG @@ -95,7 +113,7 @@ Paper_def* current_paper = 0; Music *music; Music_list *music_list; Score *score; - Header *header; + Scope *scope; Interval *interval; Musical_req* musreq; Music_output_def * outputdef; @@ -156,7 +174,7 @@ yylex (YYSTYPE *s, void * v_l) %token IN_T %token KEY %token KEYSIGNATURE -%token LYRIC +%token LYRICS %token MAEBTELP %token MARK %token MEASURES @@ -187,6 +205,7 @@ yylex (YYSTYPE *s, void * v_l) %token TELP %token TEMPO %token TIME_T +%token TIMES %token TRANSLATOR %token TRANSPOSE %token TYPE @@ -220,17 +239,17 @@ yylex (YYSTYPE *s, void * v_l) %type output_def -%type
mudela_header mudela_header_body +%type mudela_header mudela_header_body %type box %type open_request_parens close_request_parens %type open_abbrev_parens %type open_plet_parens close_plet_parens %type sub_quotes sup_quotes -%type simple_element request_chord command_element +%type simple_element request_chord command_element Simple_music Composite_music %type abbrev_type %type int unsigned %type script_dir -%type identifier_init simple_identifier_init +%type identifier_init simple_identifier_init block_identifier %type steno_duration notemode_duration %type entered_notemode_duration explicit_duration %type dinterval @@ -248,16 +267,13 @@ yylex (YYSTYPE *s, void * v_l) %type property_def translator_change %type Music_list %type paper_block paper_def_body -%type dim real -%type real_mult_expression real_primary -%type unit +%type real_expression real dimension %type abbrev_command_req %type post_request structured_post_request %type plet_fraction %type command_req verbose_command_req %type script_req dynamic_req %type string -%type string_primary %type score_block score_body %type shape_array %type