]> git.donarmstrong.com Git - lilypond.git/commitdiff
* lily/script-engraver.cc (make_script_from_event): don't crash on
authorHan-Wen Nienhuys <hanwen@xs4all.nl>
Thu, 25 Sep 2003 09:05:46 +0000 (09:05 +0000)
committerHan-Wen Nienhuys <hanwen@xs4all.nl>
Thu, 25 Sep 2003 09:05:46 +0000 (09:05 +0000)
non-string articulation-type.

* lily/new-fingering-engraver.cc (add_script): don't crash on
0 scripts
(acknowledge_grob): warn about text script events.

ChangeLog
lily/new-fingering-engraver.cc
lily/script-engraver.cc
lily/spacing-spanner.cc

index 9b44584e0c0bf49f05679b1bc42227dcfc095375..29cd7463e70b8ffee85e3741fed9863b60ccacea 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2003-09-25  Han-Wen Nienhuys  <hanwen@cs.uu.nl>
+
+       * lily/script-engraver.cc (make_script_from_event): don't crash on
+       non-string articulation-type.
+
+       * lily/new-fingering-engraver.cc (add_script): don't crash on
+       0 scripts 
+       (acknowledge_grob): warn about text script events.
+
 2003-09-24  Heikki Junes  <hjunes@cc.hut.fi>
 
        * buildscript/lilypond.words: fix path for drums.scm.
index 10f5a7d6b22b14ccd37603e3dad36c02cca481de..a468aea0a17f8fb4e6bbdfcf44b7318b75083f0f 100644 (file)
@@ -79,6 +79,10 @@ New_fingering_engraver::acknowledge_grob (Grob_info inf)
            {
              add_fingering (inf.grob_ , m, note_ev);
            }
+         else if (m->is_mus_type ("text-script-event"))
+           {
+             m->origin ()->warning ("Can not add text scripts to individual note heads");
+           }
          else if (m->is_mus_type ("script-event"))
            {
              add_script (inf.grob_, m, note_ev);
@@ -94,7 +98,7 @@ New_fingering_engraver::acknowledge_grob (Grob_info inf)
 }
 
 extern Grob *make_script_from_event (SCM * descr, Translator_group*tg, Music * event,
-                             int index);
+                                    int index);
 void
 New_fingering_engraver::add_script (Grob * head,
                                    Music * event,
@@ -102,15 +106,18 @@ New_fingering_engraver::add_script (Grob * head,
 {
   Finger_tuple ft ;
 
-  ft.script_ =make_script_from_event (&ft.description_, daddy_trans_, event, 0);
-
-  articulations_.push (ft);
-  announce_grob (ft.script_, event->self_scm ());
+  Grob * g=  make_script_from_event (&ft.description_, daddy_trans_, event, 0);
+  if (g)
+    {
+      ft.script_ =g ;
+      
+      articulations_.push (ft);
+      announce_grob (g, event->self_scm ());
   
  
-  ft.script_->set_parent (head, X_AXIS);
-}
-                                   
+      ft.script_->set_parent (head, X_AXIS);
+    }
+}                                  
                                    
 
 void
index 4a55c1e634c4265155dbe012237aecb24e151ce7..3defd89c8d298c77dbc051320748097393f329d2 100644 (file)
@@ -82,12 +82,14 @@ Grob *make_script_from_event (SCM * descr, Translator_group*tg, Music * event,
                              int index)
 {
   SCM alist = tg->get_property ("scriptDefinitions");
-  SCM art = scm_assoc (event->get_mus_property ("articulation-type"), alist);
+  SCM art_type= event->get_mus_property ("articulation-type");
+  SCM art = scm_assoc (art_type, alist);
 
   if (art == SCM_BOOL_F)
     {
-      String a = ly_scm2string (event->get_mus_property ("articulation-type"));
-      event->origin ()->warning (_f ("Don't know how to interpret articulation `%s'", a.to_str0 ()));
+      event->origin ()->warning (_("Don't know how to interpret articulation:"));
+      event->origin ()->warning (_("Scheme encoding: "));
+      scm_write (art_type, scm_current_error_port ());
       return 0 ;
     }
 
index 996d2caf80d9e4705f1b5dd12b7533495cc381b6..83902679d2d19dfa25611759373f15d2b1c0fdd9 100644 (file)
@@ -873,6 +873,27 @@ Spacing_spanner::note_spacing (Grob*me, Grob *lc, Grob *rc,
        when toying with mmrests, it is possible to have musical
        column on the left and non-musical on the right, spanning
        several measures.
+
+       In 2.0.1, this still fucks up in an interesting way:
+
+       
+\score {
+{      \property Score.skipBars = ##t
+       \context Staff = clarinet
+           { 
+               \notes {
+               \time 3/4 \mark "72"
+<< s1*0^"all"          R4*3*11 >>
+               \mark "73"
+               R4*3*11 \mark "74"
+       d2 r4
+
+
+               }}}
+    \paper { raggedright = ##t }
+}
+
+       
        */
       
       Moment *dt = unsmob_moment (rc->get_grob_property ("measure-length"));