]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/new-dynamic-engraver.cc
Merge commit 'origin' into beamlets2
[lilypond.git] / lily / new-dynamic-engraver.cc
index 990dba04a0486ea91b844730930545f3f07f6dda..be395fa2d1059dee50845a8fff526321d08c6aec 100644 (file)
 
 #include "engraver.hh"
 
+#include "hairpin.hh"
+#include "international.hh"
 #include "item.hh"
-#include "pointer-group-interface.hh"
-#include "text-interface.hh"
 #include "note-column.hh"
+#include "pointer-group-interface.hh"
 #include "self-alignment-interface.hh"
 #include "spanner.hh"
 #include "stream-event.hh"
+#include "text-interface.hh"
 
 #include "translator.icc"
 
@@ -122,9 +124,9 @@ New_dynamic_engraver::process_music ()
          if (cresc_type != ly_symbol2scm ("hairpin"))
            {
              // Fixme: should put value in error message.
-             ly_display_scm (cresc_type);
+             string as_string = ly_scm_write_string (cresc_type);
              current_span_event_
-               ->origin()->warning ("unknown crescendo style; defaulting to hairpin.");
+               ->origin()->warning (_f ("unknown crescendo style: %s\ndefaulting to hairpin.", as_string.c_str()));
            }
          current_spanner_ = make_spanner ("Hairpin",
                                           current_span_event_->self_scm ());
@@ -152,12 +154,14 @@ New_dynamic_engraver::process_music ()
       if (current_spanner_)
        {
          current_spanner_->set_bound (LEFT, script_);
-         set_nested_property (current_spanner_,
-                              scm_list_3 (ly_symbol2scm ("bound-details"),
-                                          ly_symbol2scm ("left"),
-                                          ly_symbol2scm ("attach-dir")
-                                          ),
-                              scm_from_int (RIGHT));
+
+         if (!Hairpin::has_interface (current_spanner_))
+           set_nested_property (current_spanner_,
+                                scm_list_3 (ly_symbol2scm ("bound-details"),
+                                            ly_symbol2scm ("left"),
+                                            ly_symbol2scm ("attach-dir")
+                                            ),
+                                scm_from_int (RIGHT));
 
        }
     }
@@ -216,7 +220,11 @@ ADD_TRANSLATOR (New_dynamic_engraver,
                "TextSpanner ",
 
                /* read */
-               "currentMusicalColumn ",
+               "crescendoSpanner "
+               "crescendoText "
+               "currentMusicalColumn "
+               "decrescendoSpanner "
+               "decrescendoText ",
 
                /* write */
                ""