]> git.donarmstrong.com Git - lilypond.git/commitdiff
patch::: 1.3.18.jcn2
authorJan Nieuwenhuizen <janneke@gnu.org>
Tue, 28 Dec 1999 15:16:40 +0000 (16:16 +0100)
committerJan Nieuwenhuizen <janneke@gnu.org>
Tue, 28 Dec 1999 15:16:40 +0000 (16:16 +0100)
1.3.18.jcn2
===========

* try at getting glyph property from mudela

CHANGES
VERSION
input/test/no-span.ly [new file with mode: 0644]
lily/bar.cc
lily/base-span-bar-engraver.cc
lily/include/bar.hh
lily/span-score-bar-engraver.cc
scm/generic-property.scm

diff --git a/CHANGES b/CHANGES
index 5936819e7c69f40d7300a72d779a0e0eebc04dce..12163a631bcdda9d5822c3288ff7887e6d6e1979 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,8 @@
+1.3.18.jcn2
+===========
+
+* try at getting glyph property from mudela
+
 1.3.18.jcn1
 ===========
 
diff --git a/VERSION b/VERSION
index 9df66aa37d37b203d16855cae31ac0b91a0c3866..2a45430e42948ccc3816f82b1d7a3ad441763ba5 100644 (file)
--- a/VERSION
+++ b/VERSION
@@ -2,7 +2,7 @@ PACKAGE_NAME=LilyPond
 MAJOR_VERSION=1
 MINOR_VERSION=3
 PATCH_LEVEL=18
-MY_PATCH_LEVEL=jcn1
+MY_PATCH_LEVEL=jcn2
 
 # use the above to send patches: MY_PATCH_LEVEL is always empty for a
 # released version.
diff --git a/input/test/no-span.ly b/input/test/no-span.ly
new file mode 100644 (file)
index 0000000..e027434
--- /dev/null
@@ -0,0 +1,56 @@
+\header {
+  filename =  "pa.ly";
+  title =    "Wachet auf, ruft uns die Stimme";
+  opus =    "BWV";
+  composer =  "Johann Sebastian Bach 1685-1750 ";
+  enteredby =  "JCN";
+  copyright =  "public domain";
+}
+
+%% ?
+#(define Span_bar_engraver-visibility #f)
+#(define Staff_group_bar_engraver-visibility #f)
+#(define Span_score_bar_engraver-visability #f)
+
+
+% these should be two separate scores...
+\score{
+  \context Score <
+   \context StaffGroup<
+   \context PianoStaff <
+    \context Staff = treble {
+     \property Score.midiInstrument = "church organ"
+     <
+     \context Voice=i \notes\relative c { c c c c }
+     >
+    }
+    \context Staff = bass \notes\relative c { c c c c }
+   > 
+   \context Staff = pedal \notes\relative c { c c c c }
+   >
+  >
+\paper {
+  textheight = 280.0 \mm;
+%{
+  \translator { 
+    \OrchestralScoreContext 
+    minVerticalAlign = 4.0*\staffheight;
+    maxVerticalAlign = 4.0*\staffheight;
+   }
+%}
+  \translator { 
+    \StaffGroupContext
+    minVerticalAlign = 4.0*\staffheight;
+    maxVerticalAlign = 4.0*\staffheight;
+    glyph = "brace";
+   }
+   \translator { 
+    \PianoStaffContext
+       minVerticalAlign = 2.5*\staffheight;
+       maxVerticalAlign = 2.5*\staffheight;
+   }
+  }
+  \midi {
+   \tempo 4 = 69;
+  }
+}
index 1fea0a1b3e25fbebee5221b26c905eb7e14a97ce..c3dc7684b8fa3cf5ab8adfd4695e90fb860ee154 100644 (file)
@@ -44,7 +44,14 @@ Bar::do_brew_molecule_p () const
 void
 Bar::do_pre_processing ()
 {
+  SCM def = remove_elt_property ("default-glyph");
   SCM g = get_elt_property ("glyph");
+  if (!gh_string_p (g) && gh_string_p (def))
+    {
+      set_elt_property ("glyph", def);
+      g = get_elt_property ("glyph");
+    }
+
   SCM breakdir = gh_int2scm (break_status_dir ());
   
   if (gh_string_p (g))
index 880d458988ad0d9afae739db64bf13e52151f0d0..9ef6b8fc1a18ea47aae654a3bae9b8b7b37fabe5 100644 (file)
@@ -51,7 +51,7 @@ Base_span_bar_engraver::acknowledge_element (Score_element_info i)
          --hwn
         */
        {
-         spanbar_p_ = get_span_bar_p();
+         spanbar_p_ = get_span_bar_p ();
          spanbar_p_->set_parent (bar_l_arr_[0], Y_AXIS);
          String visnam =  String(name()) + "-visibility";
          
@@ -68,9 +68,25 @@ Base_span_bar_engraver::acknowledge_element (Score_element_info i)
            }
          
          announce_element (Score_element_info (spanbar_p_,0));
+
+#if 0
+         
+         // urg, elt-properties are not set until pre_processing (property-engraver)
+         if (!gh_string_p (spanbar_p_->get_elt_property ("glyph"))
+             && !gh_string_p (spanbar_p_->get_elt_property ("default-glyph")))
+           spanbar_p_-> set_elt_property ("default-glyph",
+                                          bar_l_arr_[0]->get_elt_property ("glyph"));
+#else
+
+         if (!gh_string_p (spanbar_p_->get_elt_property ("glyph"))
+             && gh_string_p (spanbar_p_->get_elt_property ("default-glyph")))
+           spanbar_p_-> set_elt_property ("glyph", spanbar_p_->get_elt_property ("default-glyph"));
+           
          if (!gh_string_p (spanbar_p_->get_elt_property ("glyph")))
            spanbar_p_-> set_elt_property ("glyph",
                                           bar_l_arr_[0]->get_elt_property ("glyph"));
+
+#endif
        }
     }
 }
index e884883fa77be20c6ae68c0c12065693a4306123..a517fc4cdc7e4a136430c7f87206e15476e4bc74 100644 (file)
@@ -15,6 +15,7 @@ class Bar:public Item {
 public:
   VIRTUAL_COPY_CONS(Score_element);
   Bar();
+
 protected:
   virtual void do_pre_processing ();
   virtual Molecule* do_brew_molecule_p () const;
index f2409d339185560fc7d085d852f4e091f0022e34..cda87205a004418b0a83767274cafc759a5991d9 100644 (file)
@@ -20,13 +20,12 @@ Span_bar*
 Span_score_bar_engraver::get_span_bar_p () const
 {
   Span_bar*s =  new Span_bar;
-  s->set_elt_property ("glyph",  gh_str02scm ("scorebar"));
+  s->set_elt_property ("default-glyph",  gh_str02scm ("scorebar"));
   s->set_elt_property ("break-aligned",SCM_BOOL_T);
 
   return s;
 }
 
-
 Span_score_bar_engraver::Span_score_bar_engraver ()
 {
   use_priority_b_ = true;
@@ -37,7 +36,7 @@ Piano_bar_engraver::get_span_bar_p () const
 {
   Span_bar *s= new Span_bar;
   s->set_empty (X_AXIS);
-  s->set_elt_property ("glyph", gh_str02scm ("brace"));
+  s->set_elt_property ("default-glyph", gh_str02scm ("brace"));
   return s;
 }
 
@@ -46,7 +45,7 @@ Staff_group_bar_engraver::get_span_bar_p () const
 {
   Span_bar *s= new Span_bar;
   s->set_empty (X_AXIS);
-  s->set_elt_property ("glyph",  gh_str02scm ("bracket"));
+  s->set_elt_property ("default-glyph",  gh_str02scm ("bracket"));
   return s;
 }
 
index 5c33765f146618d017d3c8a95cb265c08e68284a..498f05bc4aee589fbd45117ce297d8ad49e9352e 100644 (file)
@@ -61,7 +61,9 @@
   
 (define generic-bar-properties
   (cons "Staff_bar" (list
-                    (list 'barSize number? 'bar-size))
+                    (list 'barSize number? 'bar-size)
+                    ;(list 'glyph symbol? 'glyph)
+                    )
        )
   )