]> git.donarmstrong.com Git - lilypond.git/commitdiff
lilypond-1.3.2
authorfred <fred>
Tue, 26 Mar 2002 22:43:02 +0000 (22:43 +0000)
committerfred <fred>
Tue, 26 Mar 2002 22:43:02 +0000 (22:43 +0000)
TODO
VERSION
input/test/script-horizontal.ly
lily/chord-name-engraver.cc
lily/lookup.cc
lily/parser.yy

diff --git a/TODO b/TODO
index 771ea60f80e6d3542d52a8fc2573a3a18a98aef6..813dcad6e050ed99338e91f73e6e22db06c1a470 100644 (file)
--- a/TODO
+++ b/TODO
@@ -17,11 +17,9 @@ Grep -i for TODO, FIXME and ugh/ugr/urg.
        ctor_dict["Score_element"]->clone_func (orig);
        ctor_dict["Score_element"]->create_func ();
 
-
+. * acc at tied note after linebreak.
 . * note head on stem err msg in dutch.
 . *  why need to run -C mf twice?
-. * fix interstaff stuff
-. * junk BLURB files.
 . * setting indent to 0 with \shape fails
 . * here's no difference at all in output. When either is jacked up to 7.0,
 everything works and matches up; when either is set just a bit above the
@@ -37,6 +35,7 @@ John
 . * rerun profile
 . * fix or replace feta-accordion.mf
 . * script engraver
+. * bracket pdf hack
 . * Chords:
 .  * Bass/inversion pitch when not part of Chord
 Sometimes a series of changing chords will be blocked out over a static tone
@@ -92,10 +91,7 @@ melismatic.
 . * make all Feta (including dynamics) available to the user in
     textual scripts. Examples: "D.S. al \coda", "\mf espress.".
  
-. * ?  -Q, --find-old-relative show all changes in relative syntax
-What's old about absolute to relative conversion?  Could maybe use for
-abc2ly, midi2ly?
-
+. * Write scritp that uses --find-old-relative to do auto relativization.
 . * Junk shared cruft (duration, moment) in lib/
 
 
diff --git a/VERSION b/VERSION
index 26233811a99f7fb4fdab876fe645114faed7fedf..af709f691860b2ab9b32abda71ba35c72fa22102 100644 (file)
--- a/VERSION
+++ b/VERSION
@@ -1,7 +1,7 @@
 PACKAGE_NAME=LilyPond
 MAJOR_VERSION=1
 MINOR_VERSION=3
-PATCH_LEVEL=1
+PATCH_LEVEL=2
 MY_PATCH_LEVEL=
 
 # use the above to send patches: MY_PATCH_LEVEL is always empty for a
index d541d25640987c4d832678b0180774be1a508550..a0090ba8e84f9d78ba151cf4db27839478ad6b68 100644 (file)
@@ -1,10 +1,44 @@
 
+
+%{
+
+Please don't use this Scheme hacking unless you have a good reason.
+Support for the \property textExtraOffset will not go into LilyPond in
+this form.
+
+I think extra-offset will stay - but perhaps I'll change the name
+
+%}
+
+
+#(set! generic-thread-properties
+       (append!
+        generic-thread-properties
+        (list
+         (cons "Text_item"
+          (list
+           (list 'textExtraOffset pair? 'extra-offset)
+          )
+         )
+         (cons "Script"
+          (list
+           (list 'scriptExtraOffset pair? 'extra-offset)
+          )
+         )
+        )
+))
+       
+
+       
 \score {
 
        \notes \context Voice <
                \context Thread = TA { c'4_1 }
-               \context Thread = TB { \property Thread.scriptHorizontal = "1"
-               e'4-2-\trill }
+               \context Thread = TB {
+                       \property Thread.scriptHorizontal = ##t
+                       \property Thread.textExtraOffset = #'(-0.5 . -0.5)
+                       \property Thread.scriptExtraOffset = #'(2.25 . -0.5)
+               e'4-2^\prall }
                \context Thread = TC { g'4^4 }
        >
        
@@ -16,6 +50,7 @@
                }
                \translator {
                \ThreadContext
+               Generic_property_list = #generic-thread-properties
                \consists Script_engraver;
                \consists Text_engraver;                
                }
index 08d397b6f380e27d6df7f37c3712d3d17b7c7a59..4c57efac7ed3628ef990829fa371b6c795b67b32 100644 (file)
@@ -21,6 +21,7 @@ ADD_THIS_TRANSLATOR (Chord_name_engraver);
 Chord_name_engraver::Chord_name_engraver ()
 {
   tonic_req_ = 0;
+  //  bass_req_ = 0;
 }
 
 void
@@ -43,6 +44,14 @@ Chord_name_engraver::do_try_music (Music* m)
       tonic_req_ = t;
       return true;
     }
+#if 0
+  if (Bass_req* b = dynamic_cast<Bass_req*> (m))
+    {
+      bass_req_ = b;
+      return true;
+    }
+#endif
+  
   return false;
 }
 
index 1181e03925052b1f0f3b374dac7c2f358cb150ef..1b7c19e11640de37682c28053ac6199de3a33161 100644 (file)
@@ -111,12 +111,12 @@ Lookup::afm_find (String s, bool warn) const
     {
       /*
        don't want people relying on this kind of dimension. 
-       */
+      */
       m.set_empty (false);
       return m;
     }
   
-  Atom at (gh_list (char_scm_sym,
+  Atom at (gh_list (gh_symbol2scm ("char"),
                    gh_int2scm (cm.code ()),
                    SCM_UNDEFINED));
   at.font_ = ly_symbol (font_name_.ch_C());
@@ -161,7 +161,7 @@ Molecule
 Lookup::bar (String str, Real h, Paper_def *paper_l) const
 {
   if (str == "bracket")
-    return staff_bracket (h);
+    return staff_bracket (h, paper_l);
   else if (str == "brace")
     {
       Real staffht  = paper_l->get_var ("staffheight");
@@ -241,11 +241,11 @@ Lookup::beam (Real slope, Real width, Real thick) const
   
   Molecule m;
   Atom at
-     (gh_list (beam_scm_sym,
-                               gh_double2scm (width),
-                               gh_double2scm (slope),
-                               gh_double2scm (thick),
-                               SCM_UNDEFINED));
+    (gh_list (gh_symbol2scm ("beam"),
+             gh_double2scm (width),
+             gh_double2scm (slope),
+             gh_double2scm (thick),
+             SCM_UNDEFINED));
 
   m.dim_[X_AXIS] = Interval (0, width);
   m.dim_[Y_AXIS] = Interval (min_y, max_y);
@@ -288,7 +288,7 @@ Lookup::dashed_slur (Array<Offset> controls, Real thick, Real dash) const
     }
 
   Atom at
-    (gh_list (ly_symbol ("dashed-slur"),
+    (gh_list (gh_symbol2scm ("dashed-slur"),
              gh_double2scm (thick), 
              gh_double2scm (dash),
              ly_quote_scm (array_to_list (sc, 4)),
@@ -346,7 +346,7 @@ Lookup::filledbox (Box b ) const
 {
   Molecule m;
   
-  Atom at  (gh_list (filledbox_scm_sym,
+  Atom at  (gh_list (gh_symbol2scm ("filledbox"),
                     gh_double2scm (-b[X_AXIS][LEFT]),
                     gh_double2scm (b[X_AXIS][RIGHT]),                 
                     gh_double2scm (-b[Y_AXIS][DOWN]),
@@ -398,7 +398,7 @@ Lookup::text (String style, String text, Paper_def *paper_l) const
   SCM l = ly_ch_C_eval_scm (("(style-to-cmr \"" + style + "\")").ch_C());
   if (l != SCM_BOOL_F)
     {
-      style = ly_scm2string (SCM_CDR(l)) +to_str  ((int)font_h);
+      style = ly_scm2string (gh_cdr(l)) +to_str  ((int)font_h);
     }
 
   Real w = 0;
@@ -454,8 +454,8 @@ Lookup::text (String style, String text, Paper_def *paper_l) const
   m.dim_.y () = ydims;
 
   
-  Atom at  (gh_list (text_scm_sym,
-                    ly_ch_C_to_scm (text.ch_C()),
+  Atom at  (gh_list (gh_symbol2scm ("text"),
+                    ly_str02scm (text.ch_C()),
                     SCM_UNDEFINED));
   at.font_ = ly_symbol (style);
   at.magn_ = gh_int2scm (font_mag);
@@ -492,15 +492,15 @@ Lookup::staff_brace (Real y, int staff_size) const
 {
   Molecule m;
   /*
-  (define (pianobrace y staffht)
+    (define (pianobrace y staffht)
     (let* ((step 1.0)
-          (minht (* 2 staffht))
-          (maxht (* 7 minht))
-          )
-      (string-append
-       (select-font (string-append "feta-braces" (number->string (inexact->exact staffht))) 0)
-       (char (max 0 (/  (- (min y (- maxht step)) minht) step))))
-      )
+    (minht (* 2 staffht))
+    (maxht (* 7 minht))
+    )
+    (string-append
+    (select-font (string-append "feta-braces" (number->string (inexact->exact staffht))) 0)
+    (char (max 0 (/  (- (min y (- maxht step)) minht) step))))
+    )
     )
   */
 
@@ -511,7 +511,7 @@ Lookup::staff_brace (Real y, int staff_size) const
   idx = idx >? 0;
   
   SCM f =  ly_symbol (String ("feta-braces" + to_str (staff_size)));
-  SCM e =gh_list (char_scm_sym, gh_int2scm (idx), SCM_UNDEFINED);
+  SCM e =gh_list (gh_symbol2scm ("char"), gh_int2scm (idx), SCM_UNDEFINED);
   Atom at  (e);
   at.font_ = f;
   
@@ -541,12 +541,13 @@ Lookup::hairpin (Real width, Real height, Real thick, bool decresc, bool continu
 }
 
 Molecule
-Lookup::tuplet_bracket (Real dy , Real dx, Real thick, Real gap, Real interline_f, Direction dir) const
+Lookup::tuplet_bracket (Real dy , Real dx, Real thick, Real gap,
+                       Real height, Direction dir) const
 {
   Molecule m;
 
-  Atom at  (gh_list(tuplet_scm_sym,
-                   gh_double2scm (interline_f),
+  Atom at  (gh_list(gh_symbol2scm ("tuplet"),
+                   gh_double2scm (height),
                    gh_double2scm (gap),
                    gh_double2scm (dx),
                    gh_double2scm (dy),
@@ -586,14 +587,21 @@ Lookup::slur (Array<Offset> controls, Real linethick) const
 }
 
 Molecule
-Lookup::staff_bracket (Real y) const
+Lookup::staff_bracket (Real height, Paper_def* paper_l) const
 {
-  Molecule m; 
-  Atom at  ( gh_list (bracket_scm_sym,
-                     gh_double2scm (y),
-                     SCM_UNDEFINED));
+  Molecule m;
+  Atom at  ( gh_list (gh_symbol2scm ("bracket"),
+                     gh_double2scm (paper_l->get_var("bracket_arch_angle")),
+                     gh_double2scm (paper_l->get_var("bracket_arch_width")),
+                     gh_double2scm (paper_l->get_var("bracket_arch_height")),
+                     gh_double2scm (paper_l->get_var("bracket_width")),
+                     gh_double2scm (height),
+                     gh_double2scm (paper_l->get_var("bracket_arch_thick")),
+                     gh_double2scm (paper_l->get_var("bracket_thick")),
+                     SCM_UNDEFINED));
+  
   m.add_atom (&at);                             
-  m.dim_[Y_AXIS] = Interval (-y/2,y/2);
+  m.dim_[Y_AXIS] = Interval (-height/2,height/2);
   m.dim_[X_AXIS] = Interval (0,4 PT);
 
   m.translate_axis (- 4. / 3. * m.dim_[X_AXIS].length (), X_AXIS);
@@ -605,7 +613,7 @@ Lookup::volta (Real h, Real w, Real thick, bool vert_start, bool vert_end) const
 {
   Molecule m; 
 
-  Atom at  (gh_list (volta_scm_sym,
+  Atom at  (gh_list (gh_symbol2scm ("volta"),
                     gh_double2scm (h),
                     gh_double2scm (w),
                     gh_double2scm (thick),
@@ -817,3 +825,4 @@ Lookup::accordion (SCM s, Real interline_f) const
     }
   return m;  
 }
+
index fb8e92a65e9ac18fc6dee40f4c2b6bf990b01faf..f6c73ca83a1ab183394ce0b60b17d21c07a37941 100644 (file)
@@ -447,7 +447,7 @@ translator_spec_body:
                int_identifier *i = dynamic_cast<int_identifier*> (id);
        
                SCM v;
-               if (s) v = ly_ch_C_to_scm (s->access_content_String (false)->ch_C());
+               if (s) v = ly_str02scm (s->access_content_String (false)->ch_C());
                if (i) v = gh_int2scm (*i->access_content_int (false));
                if (r) v = gh_double2scm (*r->access_content_Real (false));
                if (!s && !i && !r)
@@ -558,6 +558,12 @@ paper_def_body:
                else
                        $$->default_properties_[$2] = $4;
        }
+       | paper_def_body SCM_T '=' real semicolon {
+               if (!gh_symbol_p ($2))
+                       THIS->parser_error ("expect a symbol as lvalue");
+               else
+                       $$->default_properties_[$2] = gh_double2scm ($4);
+       }
        | paper_def_body translator_spec_block {
                $$->assign_translator ($2);
        }
@@ -1577,7 +1583,7 @@ string:
                $$ = $1;
        }
        | STRING_IDENTIFIER     {
-               $$ = ly_ch_C_to_scm ($1->access_content_String (true)->ch_C ());
+               $$ = ly_str02scm ($1->access_content_String (true)->ch_C ());
        }
        | string '+' string {
                $$ = scm_string_append (scm_listify ($1, $3, SCM_UNDEFINED));