]> git.donarmstrong.com Git - lilypond.git/commitdiff
patch::: 1.1.52.mb2
authorMats Bengtsson <mats.bengtsson@s3.kth.se>
Sat, 3 Jul 1999 21:11:12 +0000 (23:11 +0200)
committerMats Bengtsson <mats.bengtsson@s3.kth.se>
Sat, 3 Jul 1999 21:11:12 +0000 (23:11 +0200)
pl 52.mb2
- Added \repetitions: prints symbol for repeated bars.
  Same syntax as multi-measure rests!
- Added \segno and \wheel script symbols

---
Hi,

I did some metafont hacking and implemented a \segno and
a \wheel (what is the proper english nomenclature?) script.
I also did a bar repetition sign and implemented this using
the same mechanism and syntax as multi-measure rests.
Try input/test/repeatbar.fly. I have to think of where
to add the documentation in the Reference manual.

Several people have requested a reintroduction of the
textAlignment property. I thought it would be simple
to implement but I failed, since I'm not sure about
how to add an alignment feature to Text_item.
Can Han-Wen or Jan help?

   /Mats

--------- The patch -----------------
Generated by (address unknown) using package-diff 0.62,
From = lilypond-1.1.52.mb1, To = lilypond-1.1.52.mb2

usage

    cd lilypond-source-dir; patch -E -p1 < lilypond-1.1.52.mb2.diff

Patches do not contain automatically generated files
or (urg) empty directories,
i.e., you should rerun autoconf, configure --state
1.1.52.mb1
1.1.52.mb2
++state

17 files changed:
Documentation/tex/feta.tex
Documentation/tex/refman.yo
NEWS
VERSION
input/test/font-body.ly
input/test/repeatbar.fly [new file with mode: 0644]
lily/include/ly-symbols.hh
lily/include/multi-measure-rest-engraver.hh
lily/include/musical-request.hh
lily/multi-measure-rest-engraver.cc
lily/multi-measure-rest.cc
lily/my-lily-lexer.cc
lily/parser.yy
ly/script.ly
mf/feta-banier.mf
mf/feta-schrift.mf
scm/script.scm

index c713e128af6ceed4b2d97f45c62c38c51461a76e..296fddc14336dfab6504639658b7d803e915f16f 100644 (file)
@@ -42,7 +42,7 @@
 
 \vskip5mm
 
-\listfont{\fetatwenty}{0}{123}
+\listfont{\fetatwenty}{0}{102}
 % urg
 \vskip-\charheight
 \listfont{\fetanumber}{48}{58}
index 8b1259b003f21d79313417efefff4dd741efdd06..719770e081448cfa8f8d70c9453ddc3f1f24d1e9 100644 (file)
@@ -575,12 +575,13 @@ mudela()(
           c''-\open  c''-\flageolet  c''-\reverseturn 
           c''-\trill
           c''-\prall c''-\mordent c''-\prallprall  c''-\prallmordent
-          c''-\upprall c''-\downprall c''-\thumb }
+          c''-\upprall c''-\downprall c''-\thumb c''-\segno c''-\wheel}
   \context Lyrics \lyrics{  
         accent__ marcato__ staccatissimo__ fermata stopped__
         staccato__ tenuto__ upbow downbow__ lheel__ rheel__ ltoe
         rtoe__ turn__ open__ flageolet reverseturn__ trill__ prall__
-        mordent prallprall__ prallmordent__ uprall__ downprall thumb }
+        mordent prallprall__ prallmordent__ uprall__ downprall thumb 
+       segno wheel}
   >
   \paper{ linewidth = 5.875\in;          
           indent = 0.0;        }
diff --git a/NEWS b/NEWS
index 2ab931ebe5cdd03eada2c0e0525f65fee81b3e57..8b17eca67967f6679a608a0753e993e3a143ddeb 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -1,4 +1,14 @@
-pl 52.gp1
+--- ../lilypond-1.1.52.mb1/NEWS        Thu Jul  1 00:53:02 1999
+++ b/NEWS      Sat Jul  3 23:11:12 1999
+@@ -1,3 +1,8 @@
+pl 52.mb2
+       - Added \repetitions: prints symbol for repeated bars.
+         Same syntax as multi-measure rests!
+       - Added \segno and \wheel script symbols
+
+ pl 52.mb1
+       - clean-fonts using kpsepath
+       - bf: volta brackets broken over several lines get open end.pl 52.gp1
        - bf: make doc++ corrected to only include *.h and *.hh files.
 ************
 pl 51.uu2
diff --git a/VERSION b/VERSION
index d80cfa0a64c3113dde9f213d6e1ecfd1ea8166a4..c0bc37e1b05fd2d1c88f5539b137d84094120f4b 100644 (file)
--- a/VERSION
+++ b/VERSION
@@ -2,7 +2,7 @@ PACKAGE_NAME=LilyPond
 MAJOR_VERSION=1
 MINOR_VERSION=1
 PATCH_LEVEL=52
-MY_PATCH_LEVEL=gp1
+MY_PATCH_LEVEL=mb2
 
 # use the above to send patches: MY_PATCH_LEVEL is always empty for a
 # released version.
index ad8d70d77c0e6a49009a3c3326f6cf049f384ac8..277d1acc5825096057ce595268d1a122447018f7 100644 (file)
@@ -14,7 +14,7 @@ FontBody=     \notes\transpose c''{
                a\mf_\fermata a\f-\stopped a\ff-\open a\fff^\trill|
                a\fp-\reverseturn a4.\sf a4.\sfz |  a4\fz % a\rf
                [c8-\prall c-\mordent] [a'-\prallmordent a'-\prallprall]
-               [c8-\upprall a'8-\downprall] [a' c] |
+               [c8-\upprall a'8-\downprall] [a'-\segno c-\wheel] |
                [c \< d e f] [as' ges' f' e']
                [cis' dis' c' des'] [cisis' disis' \! ceses' deses'] |
                \clef "bass";
diff --git a/input/test/repeatbar.fly b/input/test/repeatbar.fly
new file mode 100644 (file)
index 0000000..0829b73
--- /dev/null
@@ -0,0 +1,3 @@
+c'' d e f | \repetitions1*3 | 
+\time 3/4;
+g4 a b | R2.*2 |
index dee6c5f0aa72457f732487d46254254a40d85722..07890e4c105ea77fdaa63bf9bda1f9152a4f7616 100644 (file)
@@ -16,6 +16,7 @@
 #define DECLARE_LY_SYMBOL(a) extern SCM a ## _scm_sym
 #endif
 
+DECLARE_LY_SYMBOL(alt_symbol);
 DECLARE_LY_SYMBOL(at_line_start);
 DECLARE_LY_SYMBOL(beam);
 DECLARE_LY_SYMBOL(beam_thickness);
index 43732df92fd5d58725e1c675cbb557921fdcfb1d..aa36e00edf6e198ce266d515e0847e8f24f441fc 100644 (file)
@@ -32,7 +32,7 @@ private:
   Drul_array<Moment> rest_moments_;
   
   int start_measure_i_;
-  Multi_measure_rest_req* multi_measure_req_l_;
+  Rhythmic_req* multi_measure_req_l_;
   Multi_measure_rest* mmrest_p_;
   Multi_measure_rest* lastrest_p_;
 };
index 28ce7bf4cd4f04266a54b9a284c9801314f6d662..2c220138a9c384e636d31e17a40f1ee6e5612191 100644 (file)
@@ -124,13 +124,21 @@ public:
 
 /**
  Part: typeset a measure with the number of measures rest
- Score: typeset all individual measures ass full rests
+ Score: typeset all individual measures as full rests
  */
 class Multi_measure_rest_req : public Rhythmic_req  {
 public:
   VIRTUAL_COPY_CONS(Music);
 };
 
+/**
+ Typeset a repetition sign in each bar.
+ */
+class Repetitions_req : public Rhythmic_req  {
+public:
+  VIRTUAL_COPY_CONS(Music);
+};
+
 /// an extender line
 class Extender_req : public Request  {
 public:
index 37e3baa7ac9137f263629ad329952f0fc68db521..00fd9118c15c4de6e8efd260c24592c0154525dc 100644 (file)
@@ -42,20 +42,28 @@ Multi_measure_rest_engraver::acknowledge_element (Score_element_info i)
 bool
 Multi_measure_rest_engraver::do_try_music (Music* req_l)
 {
- if (Multi_measure_rest_req *mr = dynamic_cast<Multi_measure_rest_req *> (req_l))
-   {
-     if (multi_measure_req_l_)
-       if (!multi_measure_req_l_->equal_b (mr)
-          || rest_moments_[START] != now_mom ())
-        return false;
-  
-     multi_measure_req_l_ = mr;
-     rest_moments_[START] = now_mom ();
-     
-     rest_moments_[STOP] = rest_moments_[START] + multi_measure_req_l_->duration_.length_mom ();
-     return true;
-   }
- return false;
+  Rhythmic_req *r=0;
+  if (Multi_measure_rest_req *mr = 
+      dynamic_cast<Multi_measure_rest_req *> (req_l))
+    r=mr;
+  else if (Repetitions_req *rr = 
+          dynamic_cast<Repetitions_req *> (req_l))
+    r=rr;
+  if (r)
+    {
+      if (multi_measure_req_l_)
+       if (!multi_measure_req_l_->equal_b (r)
+           || rest_moments_[START] != now_mom ())
+         return false;
+      
+      multi_measure_req_l_ = r;
+      rest_moments_[START] = now_mom ();
+      
+      rest_moments_[STOP] = rest_moments_[START] +
+       multi_measure_req_l_->duration_.length_mom ();
+      return true;
+    }
+  return false;
 }
 
 void
@@ -65,6 +73,9 @@ Multi_measure_rest_engraver::do_process_requests ()
     {
       Time_description const *time = get_staff_info().time_C_;
       mmrest_p_ = new Multi_measure_rest;
+      if(dynamic_cast<Repetitions_req *> (multi_measure_req_l_))
+       mmrest_p_->set_elt_property (alt_symbol_scm_sym, 
+                                    gh_str02scm("scripts-repeatsign"));
       announce_element (Score_element_info (mmrest_p_, multi_measure_req_l_));
       start_measure_i_ = time->bars_i_;
     }
index 26e55b17706db6149843b0af3411d52d61959419..5c604e317644c65d121e1da3a4cde8b8bee81f6e 100644 (file)
@@ -75,7 +75,14 @@ Multi_measure_rest::do_brew_molecule_p () const
 
   
   Molecule s;
-  if (measures_i_ == 1 || measures_i_ == 2 || measures_i_ == 4) 
+  bool rest_symbol=true;
+  SCM alt_symbol_sym =get_elt_property (alt_symbol_scm_sym);
+  if (alt_symbol_sym != SCM_BOOL_F)
+    {
+      s = lookup_l () -> afm_find (ly_scm2string (SCM_CDR(alt_symbol_sym)));
+      rest_symbol = false;
+    }
+  else if (measures_i_ == 1 || measures_i_ == 2 || measures_i_ == 4) 
     {
       s = lookup_l ()->rest (- intlog2(measures_i_), 0, "");
       s.translate_axis (-s.extent ()[X_AXIS].length () / 2, X_AXIS);
@@ -86,7 +93,7 @@ Multi_measure_rest::do_brew_molecule_p () const
     }
   mol_p->add_molecule (s);
   Real interline_f = staff_line_leading_f ();
-  if (measures_i_ == 1)
+  if (measures_i_ == 1 && rest_symbol)
     {
       mol_p->translate_axis (interline_f, Y_AXIS);
     }
@@ -97,7 +104,6 @@ Multi_measure_rest::do_brew_molecule_p () const
       s.translate_axis (3.0 * interline_f, Y_AXIS);
       mol_p->add_molecule (s);
     }
-
   mol_p->translate_axis (x_off, X_AXIS);
   return mol_p;
 }
index 048dd1856b1e589f29c71562b1492518be987514..8fd2081c208f3870223e660b60920f01c967a42f 100644 (file)
@@ -60,6 +60,7 @@ static Keyword_ent the_key_tab[]={
   {"relative", RELATIVE},
   {"remove", REMOVE},
   {"repeat", REPEAT},
+  {"repetitions", REPETITIONS},
   {"scm", SCM_T},
   {"scmfile", SCMFILE},
   {"score", SCORE},
index adc565e244b46f20b4a68cf9bbf9179355a9c9b0..78815d1cd2af7aca5b5e289f379cc77e9e870d2d 100644 (file)
@@ -173,6 +173,7 @@ yylex (YYSTYPE *s,  void * v_l)
 %token RELATIVE
 %token REMOVE
 %token REPEAT
+%token REPETITIONS
 %token SCM_T
 %token SCMFILE
 %token SCORE
@@ -1377,6 +1378,16 @@ simple_element:
                velt_p->add_music (m);
                $$ = velt_p;
        }
+       | REPETITIONS notemode_duration         {
+               Repetitions_req* r = new Repetitions_req;
+               r->duration_ = *$2;
+               delete $2;
+
+               Simultaneous_music*velt_p = new Request_chord;
+               velt_p->set_spot (THIS->here_input ());
+               velt_p->add_music (r);
+               $$ = velt_p;
+       }
        | STRING notemode_duration                      {
                if (!THIS->lexer_p_->lyric_state_b ())
                        THIS->parser_error (_ ("have to be in Lyric mode for lyrics"));
index eea258c9d1a4f84c701a0825d0fa7d892452f01c..cbd3225c8e2778eb7b7b78b0499e31af79d91ff8 100644 (file)
@@ -43,3 +43,5 @@ prallprall = \script "prallprall"
 prallmordent = \script "prallmordent"
 upprall = \script "upprall"
 downprall = \script "downprall"
+segno = \script "segno"
+wheel = \script "wheel"
\ No newline at end of file
index 91ccd66bf5ee080fb0c023718638866712d00b76..64a289c86ef1d2b25e41856b637a1c67c13bbe3c 100644 (file)
@@ -252,7 +252,7 @@ fet_beginchar("grace 8th Flag (up)", "u3grace", "graceeighthflag")
                (hip_width, foot_depth), 
                hip_depth_ratio, foot_width_ratio, hip_thickness, foot_thickness);
 
-       pickup pencircle scaled stemthickness;
+       pickup pencircle scaled 1.5 stemthickness;
        draw (0, 0) .. (0,-2 interline);
        draw (-b ,-foot_depth * hip_depth_ratio) ..
          (w, -flare);
@@ -440,7 +440,7 @@ fet_beginchar("grace 8th (down)", "d3grace", "dgraceeighthflag")
                hip_depth_ratio,foot_width_ratio, hip_thickness, foot_thickness);
 
 
-       pickup pencircle scaled stemthickness;
+       pickup pencircle scaled 1.5 stemthickness;
        draw (0, 0) .. (0,-2 interline);
        draw (-b, -foot_depth * hip_depth_ratio) .. (w,-flare);
        y_mirror_char;
index 9d5983726a3146b96b9acff314e53e432f1c9069..0ce139e2dd36da413706e040be062fdc7e2f605e 100644 (file)
@@ -374,7 +374,7 @@ fet_beginchar("Turn","turn","turn")
        draw_turn;
                
        penlabels(5,6,7);
-       penlabels(2,3,4);
+       penlabels(1,2,3,4);
 fet_endchar;
 
 
@@ -586,6 +586,118 @@ fet_beginchar("Flageolet", "flageolet", "flageolet")
        draw z1..z2..z3..z4..cycle;
 fet_endchar;
 
+fet_beginchar("Repeatsign", "repeatsign", "repeatsign")
+       set_char_box(interline#, interline#, interline#, interline#);
+
+       save dot_diam;
+       2 dot_diam# = interline# - stafflinethickness#;
+       define_pixels(dot_diam);
+
+       penpos1(dot_diam,0);
+       z1l=(-b,-d);
+       penpos2(dot_diam,0);
+       z2r=(w,h);
+       filldraw z1l--z2l{right}--z2r{down}--z1r{right}--cycle;
+        penlabels (1,2);
+
+       pickup pencircle scaled dot_diam;
+        draw (-interline/2, interline/2);
+        draw (interline/2, -interline/2);
+fet_endchar;
+
+fet_beginchar("Segno", "segno", "segno")
+       save thin, thick, ball_diam, darkness, pointheight;
+       save wd, ht, thick_nibangle, ball_nib_thick;
+       save turndir;
+       pair turndir;
+
+       ht# = 3 interline#;
+       wd# = 2 interline#;
+       darkness = 1.20 stafflinethickness;
+
+       set_char_box(wd#/2, wd#/2, ht#/2, ht#/2);       
+
+       thick_nibangle = 30;
+       thick = 3 darkness;
+       thin = darkness;
+       ball_nib_thick = 2.7 darkness;
+       ball_diam = ball_nib_thick + (w - ball_nib_thick) / 10;
+       pointheight = 2 stafflinethickness;
+       
+       y3l = h;
+       2 x3 = x2 + x4;
+       x4 = 0;
+       y4 = y2;
+       y2l = .6 h;
+       x2l = -b;
+       z1 = (0,0);
+
+       penpos1(thick, 2 thick_nibangle);
+       penpos2(thick, thick_nibangle);
+       penpos3(thin, -90);
+       penpos4(ball_nib_thick, 180-thick_nibangle);
+
+       path swoosh, ploop;
+       swoosh :=  z1l{curl 0} .. z2l .. z3l{right} .. {down}z4l 
+         -- z4r .. z3r{left} .. z2r{down} ;
+       fill swoosh .. (swoosh scaled -1) .. cycle;
+       penlabels(1,2,3,4);
+
+       y5r = y4;
+       x5r = x4l - ball_diam /2;
+       z6r = z5r;
+
+       penpos5(1.6 ball_diam/2, 100);
+       penpos6(ball_diam/2, 240);
+
+       ploop := z4l{down} .. z5l .. z6l -- cycle;
+       fill ploop;
+       fill ploop scaled -1;
+       penlabels(4,5,6);
+
+       penpos7(2 thin,0);
+       z7l=(-b,-d);
+       penpos8(2 thin,0);
+       z8r=(w,h);
+       filldraw z7l--z8l{right}--z8r{down}--z7r{right}--cycle;
+       pickup pencircle scaled 2 thin;
+       draw (-x2r,pointheight);
+       draw (x2r,-pointheight);
+fet_endchar;
+
+fet_beginchar("Wheel", "wheel", "wheel")
+       save thin, thick, wheelwidth, wheelheight;
+       thin# = 1.2 stafflinethickness#;
+       thick# = 3.5 stafflinethickness#;
+       wheelwidth# = 2/3 interline#;
+       wheelheight# = 1 interline#;
+       define_pixels(thin, thick, wheelwidth, wheelheight);
+
+       set_char_box(wheelwidth#+thick#, wheelwidth#+thick#,
+               wheelheight#+thick#, wheelheight#+thick#);
+
+       penpos1(thick,0);
+       penpos2(thin,-90);
+       penpos3(thick,180);
+       x1l=-wheelwidth;
+       y2l=wheelheight;
+       y1=0;
+       x2=0;
+       z3 = - z1;
+       penlabels(1,2,3);
+
+       path halfwheel;
+       halfwheel := z1l{up} .. z2l{right} .. z3l{down} -- 
+               z3r{up} .. z2r{left} .. z1r{down} .. cycle;
+       fill halfwheel;
+       fill (halfwheel scaled -1);
+
+       pickup pencircle scaled thin;
+       draw (0,-h) -- (0,h);
+       draw (-w,0) -- (w,0);
+
+fet_endchar;
+
 input feta-slag;
 input feta-accordion;
 
index 3ab041ac90266c1d53c12152a3d4a3e1025b1580..fbeeae8615c8a1c7aaf2b03723e90ff4971bff7b 100644 (file)
@@ -33,7 +33,9 @@
        ("prallprall" . ((feta . ("prallprall" . "prallprall")) #f 0 1 0))
        ("prallmordent" . ((feta . ("prallmordent" . "prallmordent")) #f 0 1 0))
        ("upprall" . ((feta . ("upprall" . "upprall")) #f 0 1 0))
-       ("downprall" . ((feta . ("downprall" . "downprall")) #f 0 1 0)))
+       ("downprall" . ((feta . ("downprall" . "downprall")) #f 0 1 0))
+       ("segno" . ((feta . ("segno" . "segno")) #f 0 1 0))
+       ("wheel" . ((feta . ("wheel" . "wheel")) #f 0 1 0)))
       script-alist)
       )