]> git.donarmstrong.com Git - lilypond.git/commitdiff
small fixes
authorHan-Wen Nienhuys <hanwen@xs4all.nl>
Mon, 20 May 2002 11:48:55 +0000 (11:48 +0000)
committerHan-Wen Nienhuys <hanwen@xs4all.nl>
Mon, 20 May 2002 11:48:55 +0000 (11:48 +0000)
ChangeLog
input/regression/mensural.ly
lily/note-collision.cc
lily/note-head.cc
lily/spacing-spanner.cc
lily/time-signature.cc
scripts/lilypond-book.py

index b02422671483112224b3e68d443e91520742ebc0..2ff2c6424076a4e1ca5ce6cc85b02a7118ddda36 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2002-05-20  Han-Wen  <hanwen@cs.uu.nl>
+
+       * lily/note-head.cc (internal_brew_molecule): warn if note head
+       not found.
+
+       * lily/time-signature.cc (special_time_signature): remove warning
+       about time signature. 
+
+       * lily/spacing-spanner.cc (musical_column_spacing): Prevent
+       reverse springs by limiting fixed-note space.
+
 2002-05-19  Jan Nieuwenhuizen  <janneke@gnu.org>
 
        * stepmake/aclocal.m4: Bugfix: complain if program not found.
index 4f4162e0b1f4b95675325a9ca958b4cb1964cc97..981630cf311b26ca40db5dd7264467ce8b5fb945 100644 (file)
@@ -1,10 +1,16 @@
 \version "1.3.146"
 \header {
-texidoc = "There is limited support for mensural notation: note head shapes are available. Mensural stems are centered on the note heads, both for up and down stems."
+    
+texidoc = "There is limited support for mensural notation: note head
+shapes are available. Mensural stems are centered on the note heads,
+both for up and down stems."
+
 }
 
+
 \score {\notes { \context Voice { 
-\property Voice.NoteHead \override #'style = #'mensural
+    \property Voice.NoteHead \set #'font-family = #'ancient
+    \property Voice.NoteHead \override #'style = #'mensural
 \transpose d''' {  c4 c2 c8  c16 c16  c1 c\breve c\longa }
 \transpose c'' { c4 c2 c8  c16 c16  c1 c\breve c\longa }
 }}}
index fa977fda00bfaa57df9d7414d745639f7271d986..8dcbae3d2c06c075ffceb67c9ec707b8cca247b6 100644 (file)
@@ -426,6 +426,6 @@ ADD_INTERFACE (Note_collision_interface, "note-collision-interface",
   "An object that handles collisions between notes with different stem
 directions and horizontal shifts. Most of the interesting properties
 are to be set in @ref{note-column-interface}: these are
-@code{force-hshift} and @{horizontal-shift}.
+@code{force-hshift} and @code{horizontal-shift}.
 ",
   "merge-differently-dotted merge-differently-headed collision-done");
index 1967691f0e2247424072ea50b570e3691cae8b49..2b2983be9223d6261a7ebfa14a5959faad0afa09 100644 (file)
@@ -81,13 +81,8 @@ Note_head::brew_ledger_lines (Grob *me,
                  +0.5*(ledgerlinethickness));
       Box ledger_line (x_extent, y_extent);
 
-#if 1
       Molecule proto_ledger_line =
        Lookup::roundfilledbox (ledger_line, blotdiameter);
-#else
-      Molecule proto_ledger_line = // if you like it the old way
-       Lookup::filledbox (ledger_line);
-#endif
       
       if (!take_space)
         proto_ledger_line.set_empty (true);
@@ -127,7 +122,11 @@ internal_brew_molecule (Grob *me,  bool ledger_take_space)
                        SCM_UNDEFINED);
   String name = "noteheads-" + ly_scm2string (scm_primitive_eval (exp));
   Molecule out = Font_interface::get_default_font (me)->find_by_name (name);
-
+  if (out.empty_b())
+    {
+      warning (_f("Symbol not found, ", name.ch_C()));
+    }
+  
   int interspaces = Staff_symbol_referencer::line_count (me)-1;
   int pos = (int)rint (Staff_symbol_referencer::position_f (me));
   if (abs (pos) - interspaces > 1)
index 57c2a1f4b5e2a5613068729ed2fa2eeeec192718..2d5204918c05a6173ed56048b888805d4263bd1f 100644 (file)
@@ -508,7 +508,8 @@ Spacing_spanner::do_measure (Rational shortest, Grob*me, Link_array<Grob> *cols)
 
 
 /*
-  Generate the space between two musical columns LC and RC, given spacing parameters INCR and SHORTEST.
+  Generate the space between two musical columns LC and RC, given
+  spacing parameters INCR and SHORTEST.
  */
 void
 Spacing_spanner::musical_column_spacing (Grob *me, Item * lc, Item *rc, Real increment, Rational shortest)
@@ -552,10 +553,20 @@ Spacing_spanner::musical_column_spacing (Grob *me, Item * lc, Item *rc, Real inc
   if (max_note_space < 0)
     {
       max_note_space = base_note_space;
-      max_fixed_note_space = increment;
+      max_fixed_note_space =  increment;
     }
 
   bool ragged = to_boolean (me->paper_l ()->get_scmvar ("raggedright"));
+
+  /*
+    Whatever we do, the fixed space is smaller than the real
+    space.
+
+    TODO: this criterion is discontinuous in the derivative.
+    Maybe it should be continuous?
+  */
+  max_fixed_note_space = max_fixed_note_space <?  max_note_space;
+  
   Real strength = (ragged) ? 1.0 : 1 / (max_note_space - max_fixed_note_space);
   Real distance = (ragged) ? max_fixed_note_space : max_note_space;
   //  Spaceable_grob::add_spring (lc, rc, distance, strength, expand_only);
@@ -563,6 +574,11 @@ Spacing_spanner::musical_column_spacing (Grob *me, Item * lc, Item *rc, Real inc
   Spaceable_grob::add_spring (lc, rc, distance, strength, false);  
 }
 
+
+/*
+  The one-size-fits all spacing. It doesn't take into account
+  different spacing wishes from one to the next column.
+ */
 void
 Spacing_spanner::standard_breakable_column_spacing (Grob * me, Item*l, Item*r,
                                   Real * fixed, Real * space,
@@ -634,10 +650,21 @@ Spacing_spanner::breakable_column_spacing (Grob*me, Item* l, Item *r,Moment shor
 
   
   
-
+    
   if (isinf (max_space))
     {
-      programming_error ("No pref spacing found");
+    /*
+      One situation where this can happen is when there is a column
+      that only serves as a spanning point for a short staff-symbol.
+
+     ===============X===
+
+         |=======Y
+
+
+      (here no StaffSpacing from Y to X is found.)
+    */      
+      programming_error ("No StaffSpacing wishes found");
       max_space = 2.0;
       max_fixed = 1.0;
     }
index 0513157775d69f8b79b9ffe3856460b0091d85ac..892baf6950a0af041792ab26a02ac9795a210929 100644 (file)
@@ -82,12 +82,10 @@ Time_signature::special_time_signature (Grob*me, String s, int n, int d)
   if (!m.empty_b ()) 
     return m;
 
-  String message =
-      "unknown time signature `" + s +
-      "'; resorting to default layout with numbers";
-  warning (_ (message.ch_C ()));
-
-  // Resort to default layout with numbers
+  /*
+    If there is no such symbol, we default without warning to the
+    numbered style.
+   */
   return time_signature (me, n, d);
 }
 
index aaa1f5737031b95f84f508127bec5c911af0ffad..49c20ecfdab72da47b6c66bee51871ef8618c451 100644 (file)
@@ -1453,15 +1453,6 @@ def fix_epswidth (chunks):
 ##docme: why global?
 foutn=""
 def do_file(input_filename):
-       global foutn
-       file_settings = {}
-       if outname:
-               my_outname = outname
-       elif input_filename == '-' or input_filename == "/dev/stdin":
-               my_outname = '-'
-       else:
-               my_outname = os.path.basename (os.path.splitext(input_filename)[0]) + '.' + format
-       my_depname = my_outname + '.dep'                
 
        chunks = read_doc_file(input_filename)
        chunks = chop_chunks(chunks, 'lilypond', make_lilypond, 1)
@@ -1486,6 +1477,18 @@ def do_file(input_filename):
 
        x = 0
        chunks = completize_preamble (chunks)
+
+
+       global foutn
+
+       if outname:
+               my_outname = outname
+       elif input_filename == '-' or input_filename == "/dev/stdin":
+               my_outname = '-'
+       else:
+               my_outname = os.path.basename (os.path.splitext(input_filename)[0]) + '.' + format
+       my_depname = my_outname + '.dep'                
+       
        if my_outname == '-' or my_outname == '/dev/stdout':
                fout = sys.stdout
                foutn = "<stdout>"