]> git.donarmstrong.com Git - lilypond.git/commitdiff
lilypond-1.3.52
authorfred <fred>
Tue, 26 Mar 2002 23:21:57 +0000 (23:21 +0000)
committerfred <fred>
Tue, 26 Mar 2002 23:21:57 +0000 (23:21 +0000)
Documentation/regression-test.tely
input/bugs/auto-beam-tuplets.ly [new file with mode: 0644]
input/test/keys.ly
input/test/orchestscore.ly
lily/include/key-engraver.hh
lily/include/system-start-delimiter.hh
lily/key-engraver.cc
lily/system-start-delimiter.cc
ly/engraver.ly

index 3aa78440419e6c66c16993f80b2dc4709ddfbbd2..d2b24987f6b9bcfdaf32656d37d606bcb298d2c3 100644 (file)
@@ -348,8 +348,17 @@ way, so this is fragile as well.
 
 @mudelafile{clefs.ly}
 
+
+Key signatures appear on key  changes. They may also
+appear without barlines.  The restoration accidentals are not printed at
+the start of the line. If @code{createKeyOnClefChange} is set, they're
+also created on a clef change.
+
+@mudelafile{keys.ly}
+
 @ignore
 @c the input file is too long and does not test for specific bugs
+
 By default, time signatures are written with two numbers. With style
 ``C'', 4/4 and 2/2 are written with their corresponding symbols and
 with style ``old'', 2/2, 3/2, 2/4, 3/4, 4/4, 6/4, 9/4, 4/8, 6/8 and
@@ -360,6 +369,8 @@ signatures.
 \mu delafile{time.ly}
 @end ignore
 
+
+
 @section Hacks and Features
 
 As a last resort, the placement of items can be adjusted manually.
diff --git a/input/bugs/auto-beam-tuplets.ly b/input/bugs/auto-beam-tuplets.ly
new file mode 100644 (file)
index 0000000..3af118f
--- /dev/null
@@ -0,0 +1,10 @@
+\score { \notes {
+       \property Voice.tupletSpannerDuration = #(make-moment 1 4)
+  \property Voice.tupletNumberVisibility = #'if-no-beam
+  \property Voice.tupletBracketVisibility = #'if-no-beam
+  %  Gm7  /  F    |  A7   /  Dm   | 
+  \times 2/3 {
+  [f,8 bes, d] [g d bes,] [f, a, c] [f c a,] | e, a, cis e cis a, d, f, a, d a, f, |
+  %  Db           |
+  des, aes, des f des aes, des, aes, des f des aes, | }
+}}
index 0d49507e5f21834a4ca0582876409cd84d9ed7ca..98ddbe08b0087b5e6460e37cd768fa7692a75795 100644 (file)
@@ -1,13 +1,11 @@
 \version "1.3.42";
 
-%{
-test key itemv breaking
-%}
 \score {
   \notes \relative c''
   {
+       \property Staff. createKeyOnClefChange = ##t  
     \key bes; c2 \key c \minor;  c2
     \break
-    \key bes \major; c1 \key d;\break c1
+    \key bes \major; c2 \clef alto; c2   \key d; c1
   }
 }
index d13b04c84a63493e84feb1dc7d813e6075eb5136..ccf4d926e1c532e9670bb39d33b3b0cdfdc79a60 100644 (file)
@@ -1,6 +1,7 @@
 \version "1.3.42";
 
 m = \notes \relative c''{
+
 c1 | c2 c | c c | c c | \break c c | c c | c c | c c | 
 }
 
@@ -89,7 +90,8 @@ c1 | c2 c | c c | c c | \break c c | c c | c c | c c |
     \translator {
        \OrchestralScoreContext
        barNumberScriptPadding = 10;
-        minVerticalAlign = 2.2*\staffheight; 
+        minVerticalAlign = 2.2*\staffheight;
+
     }
     \translator { \StaffContext
        \consists "Instrument_name_engraver";
index f91f7eea8bb422f60d731e38e4cbe244f376a6d1..171ef13e9e11410a18e0ec7e2c68416f3ebb5a99 100644 (file)
@@ -18,7 +18,7 @@
   Make the key signature.
  */
 class Key_engraver : public Engraver {
-  void create_key();
+  void create_key(bool);
   void read_req (Key_change_req const * r);
 
 public:
@@ -32,6 +32,7 @@ public:
   Key key_;
   Key_change_req * keyreq_l_;
   Key_item * item_p_;
+
   Array<Musical_pitch> accidental_idx_arr_;
   Array<Musical_pitch> old_accidental_idx_arr_;
 
index 7d7b5c697711ff81880cb58e587259190ede4eff..d594c7ff876668de2f5f950e0340ce27b43d1fdd 100644 (file)
@@ -21,6 +21,7 @@ public:
   System_start_delimiter ();
   VIRTUAL_COPY_CONS (Score_element);
 protected:
+  virtual void after_line_breaking();
   virtual  Molecule do_brew_molecule () const;
   Molecule staff_bracket (Real) const;
   Molecule staff_brace (Real) const;
index 6d01fb2b6de72d73ec96049f9890a9a362314933..e4b76f68d8145b5669ffb743e3fbf2f592e42825 100644 (file)
@@ -29,7 +29,7 @@ Key_engraver::key_changed_b () const
 }
 
 void
-Key_engraver::create_key ()
+Key_engraver::create_key (bool def)
 {
   if (!item_p_) 
     {
@@ -65,6 +65,12 @@ Key_engraver::create_key ()
            item_p_->add_old (m_l.notename_i_, a);
        }
     }
+
+
+  if (!def)
+      item_p_->set_elt_property ("visibility-lambda",
+                                scm_eval (ly_symbol2scm  ("all-visible")));
+
 }      
 
 
@@ -89,12 +95,15 @@ Key_engraver::acknowledge_element (Score_element_info info)
     {
       SCM c =  get_property ("createKeyOnClefChange");
       if (to_boolean (c))
-       create_key ();
+       {
+         create_key (false);
+      
+       }
     }
   else if (dynamic_cast<Bar *> (info.elem_l_)
           && accidental_idx_arr_.size ()) 
     {
-      create_key ();
+      create_key (true);
     }
 
 }
@@ -104,7 +113,7 @@ Key_engraver::do_process_music ()
 {
   if (keyreq_l_) 
     {
-      create_key ();
+      create_key (false);
     }
 }
 
@@ -113,10 +122,6 @@ Key_engraver::do_pre_move_processing ()
 { 
   if (item_p_) 
     {
-      if (keyreq_l_)
-       item_p_->set_elt_property ("visibility-lambda",
-                                  scm_eval (ly_symbol2scm  ("all-visible")));
-      
       typeset_element (item_p_);
       item_p_ = 0;
     }
index 130a6328fc9e50f5ef3c5e950a578eb4e8940bb9..be44c6c6e210d1bced0afa42507149f65365f59a 100644 (file)
@@ -51,7 +51,19 @@ System_start_delimiter::simple_bar (Real h) const
   Real w = paper_l ()->get_var ("barthick_score");
   return lookup_l ()->filledbox (Box (Interval(0,w), Interval(-h/2, h/2)));
 }
-   
+
+void
+System_start_delimiter::after_line_breaking ()
+{
+  SCM   gl = get_elt_property ("glyph");
+  
+  if (scm_ilength (get_elt_property ("elements")) <=  1 && gl == ly_symbol2scm ("bar-line"))
+    {
+      set_elt_property ("transparent", SCM_BOOL_T);
+      set_extent_callback (0, X_AXIS);
+      set_extent_callback (0, Y_AXIS);
+    }
+}
 
 Molecule
 System_start_delimiter::do_brew_molecule ()const
@@ -72,11 +84,14 @@ System_start_delimiter::do_brew_molecule ()const
 
   
   s = get_elt_property ("glyph");
-  if (gh_symbol_p (s) && s == ly_symbol2scm ("bracket"))
+  if (!gh_symbol_p(s))
+    return m;
+  
+  if (s == ly_symbol2scm ("bracket"))
     m = staff_bracket (l);
-  else if (gh_symbol_p (s) && s == ly_symbol2scm ("brace"))
+  else if ( s == ly_symbol2scm ("brace"))
     m =  staff_brace (l);
-  else
+  else if (s == ly_symbol2scm ("bar-line"))
     m = simple_bar (l);
   
   
index 68e35d82bcab51af7ae7f162972d9c4b1206d71f..f52fb942b471dbf018b85fae66fce74dbfa34592 100644 (file)
@@ -376,6 +376,8 @@ ScoreContext = \translator {
        alignmentReference = \down;
        defaultClef = #"treble"
        defaultBarType = #"|"
+       systemStartDelimiterGlyph = #'bar-line
+
        \accepts "Staff";
        \accepts "StaffGroup";
        \accepts "RhythmicStaff";