]> git.donarmstrong.com Git - lilypond.git/commitdiff
2002-09-04 Han-Wen Nienhuys <hanwen@cs.uu.nl>
authorHan-Wen Nienhuys <hanwen@xs4all.nl>
Wed, 4 Sep 2002 21:57:27 +0000 (21:57 +0000)
committerHan-Wen Nienhuys <hanwen@xs4all.nl>
Wed, 4 Sep 2002 21:57:27 +0000 (21:57 +0000)
* input/test/clef-end-of-line.ly: new file.

* lily/stem-engraver.cc (acknowledge_grob): warn about too long
tremolos. Thanks to Erik Sandberg

* input/trip.ly (fugaIIPedal): small cleanups.

* lily/grob-pq-engraver.cc: more helpful message.
(stop_translation_timestep): use scm_merge_x for merging the lists.

* Documentation/user/appendices.itely: switch off parmesan listing

ChangeLog
Documentation/user/appendices.itely
Documentation/user/refman.itely
THANKS
input/test/clef-end-of-line.ly [new file with mode: 0644]
input/trip.ly
lily/grob-pq-engraver.cc
lily/staff-spacing.cc
lily/stem-engraver.cc
scm/grob-description.scm

index 1af96a0d54daa14f364068faaae48e7ccc876da6..c058e4ffba8269836d1f2efd1008e0cd2d47d64c 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,17 @@
+2002-09-04  Han-Wen Nienhuys  <hanwen@cs.uu.nl>
+
+       * input/test/clef-end-of-line.ly: new file.
+
+       * lily/stem-engraver.cc (acknowledge_grob): warn about too long
+       tremolos. Thanks to Erik Sandberg
+
+       * input/trip.ly (fugaIIPedal): small cleanups.
+
+       * lily/grob-pq-engraver.cc: more helpful message.
+       (stop_translation_timestep): use scm_merge_x for merging the lists.
+
+       * Documentation/user/appendices.itely: switch off parmesan listing
+
 2002-09-01  Juergen Reuter  <reuter@ipd.uka.de>
 
        * input/test/ancient-font.ly, input/test/ancient-time.ly,
index 444219144d64d14c36abff7f5a29ddec334c1fb4..fc1e7726f5e5e1f2d711fb20ea72fc6772d24eb2 100644 (file)
@@ -210,6 +210,7 @@ accessed directly using text markup such as
 
 @lilypondfile{feta16list.ly}
 
+@c parmesan is too big. Apparently pythons re's choke on this.
+@c @lil ypondfile{parmesan16list.ly}
 
-@lilypondfile{parmesan16list.ly}
 
index e0acc8c5589bbbf0df28650f58ad37969d763db2..cce9320f130c7468192b936270706b13a44571fa 100644 (file)
@@ -2019,6 +2019,8 @@ is to put the grace notes before a phantom ``space note'', e.g.
 
 @refbugs
 
+Grace notes can not be used in the smallest size (@file{paper11.ly}).
+
 Grace note synchronization can also lead to surprises. Staff notation,
 such as key signatures, barlines, etc. are also synchronized. Take
 care when you mix staffs with grace notes and staffs without.
@@ -2033,14 +2035,7 @@ expressions.  Nesting, juxtaposing, or ending sequential music with a
 grace section is not supported, and might produce crashes or other
 errors.
 
-@menu
-* Glissando ::                  
-* Dynamics::                    
-@end menu
-
-
 
-@c .   {Glissando}
 @node Glissando 
 @subsection Glissando
 @cindex Glissando 
diff --git a/THANKS b/THANKS
index aa960dff5ae34ab7a091153eaa38fe25be7f5461..6ef18f9bb0a68d85892f1cb747c11fcbc960392c 100644 (file)
--- a/THANKS
+++ b/THANKS
@@ -9,5 +9,5 @@ BUG HUNTERS
 Karl-Johan Karlsson 
 Karl Berry
 Jeremie Lumbroso
-
+Erik Sandberg
 
diff --git a/input/test/clef-end-of-line.ly b/input/test/clef-end-of-line.ly
new file mode 100644 (file)
index 0000000..d0245f7
--- /dev/null
@@ -0,0 +1,32 @@
+\header {
+
+    texidoc = "Scales, but with clef and key signature at the end of the line."
+
+}
+
+\score {
+    \notes \transpose c'' {
+       \property Staff.Clef \set #'break-visibility = #end-of-line-visible
+       \property Staff.KeySignature \set #'break-visibility = #end-of-line-visible
+       \property Staff.explicitClefVisibility = #end-of-line-visible
+       \property Staff.explicitKeySignatureVisibility = #end-of-line-visible
+
+       % We want the time sig to take space, otherwise there is not
+       % enough white at the start of the line.
+       %
+       
+       \property Staff.TimeSignature \set #'transparent = ##t
+       \property Score.defaultBarType = #"empty"
+       
+       c1 d e f g a b c
+       \key d \major
+       \break
+
+       % see above.
+       \time 4/4
+       
+       d e fis g a b cis d 
+       \key g \major
+       \break
+       \time 4/4    
+} }
index 8f49d5babd9737f72b2ebd9b11b92d0f5ae9d44f..5d9d2047ed646b27839ca4c1cefc793015491f1d 100644 (file)
@@ -198,7 +198,6 @@ fugaIIPedal =  \notes \relative c {
   %13
     \property Staff.PhrasingSlur \override #'dashed = #5.0
     c4 \( ( d ) e\) f
-
 %    r4 fis,4-\ltoe e4.-\lheel e'8-\rheel | 
 
 % tie accs: 2nd should get no acc
@@ -219,20 +218,7 @@ fis8-\rtoe fis4-\rtoe [e8-\ltoe a-\rtoe] |
       
     >
   >
-
-  \paper {
-
-       \translator {
-               \OrchestralScoreContext
-       }
-       \translator { \PianoStaffContext
-               \consists "Instrument_name_engraver"
-       }
-       \translator { \StaffContext
-               \consists "Instrument_name_engraver"
-       }
-  }
-
+\paper {}
   \midi {
     \tempo 4 =96 }
 }
index 0dfe3f78286b0b1706f23e9f17d0ad50e7491cff..3d1d350e0abb6b7d4d859715f50d7446aa49c57e 100644 (file)
@@ -28,6 +28,7 @@ int compare  (Grob_mom const &a, Grob_mom const &b)
   return Moment::compare (a.end_, b.end_);
 }
 
+
 class Grob_pq_engraver: public Engraver
 {
 public:
@@ -76,59 +77,41 @@ Grob_pq_engraver::acknowledge_grob (Grob_info gi)
     }
 }
 
+LY_DEFINE(ly_grob_pq_less_p, 
+         "ly-grob-pq-less?", 2 , 0 ,0, (SCM a, SCM b), 
+         "Compare 2 Grob PQ entries. Internal")
+{
+  if ( Moment::compare (*unsmob_moment (gh_car (a)),
+                                     *unsmob_moment (gh_car (b))) < 0)
+    return SCM_BOOL_T;
+  else
+    return SCM_BOOL_F;
+}
+         
+
 void
 Grob_pq_engraver::stop_translation_timestep ()
 {
   Moment now = now_mom();
 
   current_grobs_.sort (&compare);
-
+  SCM current_list = SCM_EOL;
+  for (int i = current_grobs_.size(); i--;)
+    current_list = scm_cons (scm_cons (current_grobs_[i].end_.smobbed_copy(), 
+                                      current_grobs_[i].grob_->self_scm ()), current_list);
+
+  /*
+    We generate some garbage here.
+   */
   SCM busy = get_property ("busyGrobs");
   while (gh_pair_p (busy) && *unsmob_moment (gh_caar (busy)) == now)
     {
       busy = gh_cdr (busy);
     }
   
-  SCM start = busy;
-  SCM * current_cell = &start;
-
-  int  i = 0; 
-  while (i  < current_grobs_.size ())
-    {
-      Moment stop;
-      stop.set_infinite (1);
-      
-      if (gh_pair_p (busy))
-       {
-         SCM h = gh_car (busy);
-         stop = *unsmob_moment (gh_car (h));
-       }
-
-      Moment current_stop = current_grobs_[i].end_;
-      if (current_stop <= stop)
-       {
-         SCM new_entry = gh_cons (current_stop.smobbed_copy(),
-                                  current_grobs_[i].grob_->self_scm ());
-
-         /*
-           Insert before BUSY.
-          */
-         i ++;
-         *current_cell = gh_cons (new_entry, busy);
-         current_cell = SCM_CDRLOC(*current_cell);
-       }
-      else
-       {
-         /*
-           if current_stop > stop, then stop != infty, and we
-           apparently have a next entry */
-         busy = gh_cdr (busy);
-         current_cell = SCM_CDRLOC(*current_cell);
-       }
-    }
-
+  busy = scm_merge_x (current_list, busy, ly_grob_pq_less_p_proc);
   current_grobs_.clear ();
-  daddy_trans_->set_property ("busyGrobs", start);
+  daddy_trans_->set_property ("busyGrobs", busy);
 }
 
 void
@@ -140,7 +123,11 @@ Grob_pq_engraver::start_translation_timestep ()
   SCM busy = start_busy;
   while (gh_pair_p (busy) && *unsmob_moment (gh_caar (busy)) < now)
     {
-      programming_error ("Skipped something ?!");
+      /*
+       Todo: do something sensible. The grob-pq-engraver is not water
+       tight, and stuff like tupletSpannerDuration confuses it.
+       */
+      programming_error (_f("Skipped something?\nGrob %s ended before I expected it to end.", unsmob_grob (gh_cdar (busy))->name().to_str0()));
       
       busy = gh_cdr (busy);
     }
@@ -152,7 +139,8 @@ Grob_pq_engraver::start_translation_timestep ()
 
 
 ENTER_DESCRIPTION(Grob_pq_engraver,
-/* descr */       "Administrate when certain grobs (eg. note heads) stop playing.
+/* descr */       "Administrate when certain grobs (eg. note heads) stop playing; this
+engraver is a sort-of a failure, since it doesn't handle all sorts of borderline cases very well.
 ",
 /* creats*/       "",
 /* acks  */       "grob-interface",
index cf931c2f23bbf18798f0b789cdcbacb77476a594..bc95433a78e8fc0a07d7021d7f616dbf6ec30fc7 100644 (file)
@@ -203,6 +203,13 @@ Staff_spacing::get_spacing_params (Grob *me, Real * space, Real * fixed)
                                                 &last_ext);
   if (!last_grob)
     {
+      /*
+       TODO:
+       
+       Should  insert a adjustable space here? For excercises, you might want to
+       use a staff without a clef in the beginning. 
+       */
+      
       /*
        we used to have a warning here, but itgenerates a lot of
        spurious error messages.
index 07ff23e07eafa14633e9da1fe9276265cc0b8059..25c5f019542159e7215b3ffae917d0aba0075a0f 100644 (file)
@@ -79,7 +79,11 @@ Stem_engraver::acknowledge_grob (Grob_info i)
                the first and last (quarter) note bothe get one tremolo flag.
               */
              int requested_type = gh_scm2int (tremolo_req_->get_mus_property ("tremolo-type"));
-             
+             if (requested_type <= 8)
+               {
+                 tremolo_req_->origin()->warning (_("tremolo duration is too long"));
+                 requested_type = 0;
+               }
              SCM f = get_property ("tremoloFlags");
              if (!requested_type && gh_number_p (f))
                requested_type = gh_scm2int (f);
index 542c52141e7d6e53b4096549ea190ced09594f9b..9b412c4df5e9ac0e811b7bf883876f00231914de 100644 (file)
                        (staff-bar . (extra-space . 0.0))
                        (breathing-sign . (minimum-space  . 0.0))
                        (clef . (extra-space . 1.0))
-                       (first-note . (extra-space . 0.0))
+                       (first-note . (extra-space . 1.0))
                        (key-signature . (extra-space . 0.0))
                        ))
        (meta . ((interfaces . (break-aligned-interface item-interface ))))