]> git.donarmstrong.com Git - lilypond.git/commitdiff
patch::: 1.1.18.mb1: Re: LilyPond 1.1.18
authorMats Bengtsson <mats.bengtsson@s3.kth.se>
Thu, 7 Jan 1999 00:09:35 +0000 (18:09 -0600)
committerMats Bengtsson <mats.bengtsson@s3.kth.se>
Thu, 7 Jan 1999 00:09:35 +0000 (18:09 -0600)
pl 18.mb1
        - \mark now works, using G_staff_side_item.
- Improved layout of multi-bar rests, including a new
  font symbol.

---
Generated by (address unknown) using package-diff 0.62,
>From = lilypond-1.1.18, To = lilypond-1.1.18.mb1

usage

    cd lilypond-source-dir; patch -E -p1 < lilypond-1.1.18.mb1.diff

Patches do not contain automatically generated files
or (urg) empty directories,
i.e., you should rerun autoconf, configure
and possibly make outdirs.

--state
1.1.18
1.1.18.mb1
++state

NEWS
VERSION
lily/include/mark-engraver.hh
lily/mark-engraver.cc
lily/multi-measure-rest.cc
mf/feta-eindelijk.mf
scm/lily.scm

diff --git a/NEWS b/NEWS
index 71c59972677c19cebc8fb6b0459519d6033a2ed5..3535d0226f6d3dfd0311436ef592ededbaa9c32b 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -1,4 +1,14 @@
-pl 18.jcn5
+--- ../lilypond-1.1.18/NEWS    Mon Jan  4 10:25:45 1999
+++ b/NEWS      Wed Jan  6 01:43:24 1999
+@@ -1,3 +1,8 @@
+pl 18.mb1
+        - \mark now works, using G_staff_side_item.
+       - Improved layout of multi-bar rests, including a new
+         font symbol.
+
+ pl 17.jbr2
+         - Documentation/README-W32: Brought my stuff up to date
+         - Documentation/ntweb: updated for realeasepl 18.jcn5
        - bf: beamtrend
        - bf: vv-duet
 
diff --git a/VERSION b/VERSION
index 251089a8fbcdbb76d943043decae2e3c72947e2a..2f84d93c8655ae42ae35dcc3c67bd956a1ab1305 100644 (file)
--- a/VERSION
+++ b/VERSION
@@ -2,7 +2,7 @@ PACKAGE_NAME=LilyPond
 MAJOR_VERSION=1
 MINOR_VERSION=1
 PATCH_LEVEL=18
-MY_PATCH_LEVEL=jcn5
+MY_PATCH_LEVEL=mb1
 
 # use the above to send patches: MY_PATCH_LEVEL is always empty for a
 # released version.
index 4f37566fac8ee25397dab2d13c7f3ea67e9d7ead..f498b34f5c4611d5c61db832b49f9d29063fcf83 100644 (file)
@@ -12,6 +12,9 @@
 
 #include "engraver.hh"
 
+class G_staff_side_item;
+class G_text_item;
+
 /**
   */
 class Mark_engraver : public Engraver 
@@ -26,10 +29,12 @@ protected:
   virtual bool do_try_music (Music *req_l);
   virtual void do_process_requests ();
   virtual void do_pre_move_processing ();
+  virtual void acknowledge_element (Score_element_info);
 
 private:
   Mark_req * mark_req_l_;
-  Script* script_p_;
+  G_staff_side_item* staff_side_p_;
+  G_text_item* text_p_;
 };
 
 #endif // MARK_ENGRAVER_HH
index d3c736e96b34b8b3f67ceeb9bafb6faeaccc9120..891215abe5624cb89c286519230ea042484deda9 100644 (file)
 #include "command-request.hh"
 #include "time-description.hh"
 #include "engraver-group.hh"
-
+#include "staff-sym.hh"
+#include "g-text-item.hh"
+#include "g-staff-side.hh"
+#include "stem.hh"
+#include "rhythmic-head.hh"
 
 ADD_THIS_TRANSLATOR (Mark_engraver);
 
 Mark_engraver::Mark_engraver ()
 {
   mark_req_l_ = 0;
-  script_p_ = 0;
+  staff_side_p_ = 0;
+  text_p_ = 0;
 }
 
 bool
@@ -37,47 +42,71 @@ Mark_engraver::do_try_music (Music* r_l)
 void
 Mark_engraver::do_process_requests ()
 {  
-  if (!mark_req_l_ || script_p_)
+  if (!mark_req_l_ || staff_side_p_)
     return;
 
-  script_p_ = new Script;
-  script_p_->breakable_b_ = true;
+  staff_side_p_ = new G_staff_side_item;
 
-  Text_def *td_p = new Text_def;
+  text_p_ = new G_text_item;
 
-  td_p->text_str_ = mark_req_l_->str_;
-  td_p->align_dir_ = CENTER;
+  text_p_->text_str_ = mark_req_l_->str_;
+  //  text_p_->align_dir_ = CENTER;
 
-  td_p->style_str_ = td_p->text_str_.index_any_i ("0123456789") >= 0 
+  text_p_->style_str_ = text_p_->text_str_.index_any_i ("0123456789") >= 0 
     ? "mark" : "Large";
 
-  script_p_->dir_ = LEFT;
-  script_p_->specs_p_ = td_p->clone ();
-  script_p_->postbreak_only_b_ = true;
-  
-  Scalar padding = get_property ("markScriptPadding", 0);
-  if (padding.length_i() && padding.isnum_b ())
+  Scalar prop = get_property ("markdir", 0);
+  if (prop.isnum_b ())
     {
-      script_p_->padding_f_ = Real(padding);
+      staff_side_p_->dir_ = (Direction) (int) prop;
     }
-  Scalar break_priority = get_property ("markBreakPriority", 0);
-  if (break_priority.length_i() && break_priority.isnum_b ())
+  else 
     {
-      script_p_->break_priority_i_ = int(break_priority);
+      staff_side_p_->dir_ = UP;
     }
 
+  staff_side_p_->set_victim(text_p_);
   
-  announce_element (Score_element_info (script_p_, mark_req_l_));
+  //  Scalar padding = get_property ("markScriptPadding", 0);
+  //  if (padding.length_i() && padding.isnum_b ())
+  //    {
+  //      script_p_->padding_f_ = Real(padding);
+  //    }
+  //  Scalar break_priority = get_property ("markBreakPriority", 0);
+  //  if (break_priority.length_i() && break_priority.isnum_b ())
+  //    {
+  //      staff_side_p_->break_priority_i_ = int(break_priority);
+  //    }
+
+  
+  announce_element (Score_element_info (text_p_, mark_req_l_));
+  announce_element (Score_element_info (staff_side_p_, mark_req_l_));
 }
 
 void 
 Mark_engraver::do_pre_move_processing ()
 {
-  if (script_p_) 
+  if (staff_side_p_) 
     {
-      typeset_element (script_p_);
-      script_p_ = 0;
+      Staff_symbol* s_l = get_staff_info().staff_sym_l_;
+      staff_side_p_->add_support (s_l);
+      typeset_element (text_p_);
+      typeset_element (staff_side_p_);
+      text_p_ = 0;
+      staff_side_p_ = 0;
       mark_req_l_ = 0;
     }
 }
 
+void
+Mark_engraver::acknowledge_element (Score_element_info i)
+{
+  if (staff_side_p_) 
+    {
+      if (dynamic_cast<Stem *> (i.elem_l_) ||
+         dynamic_cast<Rhythmic_head *> (i.elem_l_))
+       {
+         staff_side_p_->add_support (i.elem_l_);
+       }
+    }
+}
index a6144ffc0df7d15fc296b593c31eb2fcc9cc1aaf..6bb3a5a6e48f868dabe74595a3f989a44514ebbe 100644 (file)
@@ -15,7 +15,7 @@
 #include "script.hh"
 #include "text-def.hh"
 #include "molecule.hh"
-
+#include "misc.hh"
 
 
 Multi_measure_rest::Multi_measure_rest ()
@@ -37,17 +37,28 @@ Multi_measure_rest::do_brew_molecule_p () const
      * make real multi-measure rest symbol: |---|
      * make two,four,eight-measure-rest symbols
    */
-
-  Atom s (lookup_l ()->rest (0, 0));
+  Atom s;
+  if (measures_i_ == 1 || measures_i_ == 2 || measures_i_ == 4) 
+    {
+      s = (lookup_l ()->rest (- intlog2(measures_i_), 0));
+    }
+  else 
+    {
+      s = (lookup_l ()->rest (-4, 0));
+    }
   Molecule* mol_p = new Molecule ( Atom (s));
   Real interline_f = paper ()->interline_f ();
-  mol_p->translate_axis (interline_f, Y_AXIS);
+  if (measures_i_ == 1)
+    {
+      mol_p->translate_axis (interline_f, Y_AXIS);
+    }
 
   if (measures_i_ > 1)
     {
       Text_def text;
       text.text_str_ = to_str (measures_i_);
       text.style_str_ = "number";
+      text.align_dir_ = CENTER;
       Atom s = text.get_atom (paper (), UP);
       s.translate_axis (3.0 * interline_f, Y_AXIS);
       mol_p->add_atom (s);
index f3c26b669bac6454bf2f4678185ba9ae10bb3195..e8b5d28f891088a72a6eb0aec382c274d5cb19c4 100644 (file)
@@ -92,8 +92,10 @@ save breve_rest_y, breve_rest_x;
 
 breve_rest_y# =  interline#;
 breve_rest_x# = 3/5 interline#;
+multi_rest_x# = 2 interline#;
+multi_rest_y# = 1/3 interline#;
 
-define_pixels(breve_rest_y, breve_rest_x);
+define_pixels(breve_rest_y, breve_rest_x, multi_rest_x, multi_rest_y);
 
 fet_beginchar("breve rest", "-1", "breverest");
        set_char_box(0, breve_rest_x#, 0, breve_rest_y#);
@@ -105,6 +107,16 @@ fet_beginchar("longa rest", "-2", "longarest");
        draw_block ((0,-breve_rest_y), (breve_rest_x, breve_rest_y));
 fet_endchar;
 
+fet_beginchar("multi rest", "-4", "multirest");
+       set_char_box(multi_rest_x#, multi_rest_x#,
+                    breve_rest_y#, breve_rest_y#);
+       draw_block ((-multi_rest_x, -multi_rest_y),
+                  (multi_rest_x, multi_rest_y));
+       draw_block ((-multi_rest_x,-breve_rest_y),
+                  (rthin-multi_rest_x, breve_rest_y));
+       draw_block ((multi_rest_x-rthin,-breve_rest_y),
+                  (multi_rest_x, breve_rest_y));
+fet_endchar;
 
 fet_beginchar("Quarter rest","2","quartrest");
        save alpha;
index 2b7c61bb4619b3bfb11f4f7378765da6cde883c6..44c2eb1bcbd7d1637a3ba359564ca17f017891d7 100644 (file)
@@ -78,6 +78,9 @@
 (define (settypewriter s) (text "typewriter" s))
 (define (setnumber s) (text "number" s))
 (define (setbold s) (text "bold" s))
+(define (setlarge s) (text "large" s))
+(define (setLarge s) (text "Large" s))
+(define (setmark s) (text "mark" s))
 (define (setfinger s) (text "finger" s))
 (define (setitalic s) (text "italic" s))
 (define (setnumber-1 s) (text "numberj" s))