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
diff -urN ../lilypond-1.1.52.mb1/Documentation/tex/feta.tex 
./Documentation/tex/feta.tex
--- ../lilypond-1.1.52.mb1/Documentation/tex/feta.tex   Mon Mar 29 09:03:09 1999
+++ ./Documentation/tex/feta.tex        Sat Jul  3 20:25:38 1999
@@ -42,7 +42,7 @@
 
 \vskip5mm
 
-\listfont{\fetatwenty}{0}{123}
+\listfont{\fetatwenty}{0}{102}
 % urg
 \vskip-\charheight
 \listfont{\fetanumber}{48}{58}
diff -urN ../lilypond-1.1.52.mb1/Documentation/tex/refman.yo 
./Documentation/tex/refman.yo
--- ../lilypond-1.1.52.mb1/Documentation/tex/refman.yo  Tue Jun 22 11:03:18 1999
+++ ./Documentation/tex/refman.yo       Sat Jul  3 21:57:05 1999
@@ -575,12 +575,13 @@
           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 -urN ../lilypond-1.1.52.mb1/NEWS ./NEWS
--- ../lilypond-1.1.52.mb1/NEWS Thu Jul  1 00:53:02 1999
+++ ./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.
diff -urN ../lilypond-1.1.52.mb1/VERSION ./VERSION
--- ../lilypond-1.1.52.mb1/VERSION      Thu Jul  1 00:50:16 1999
+++ ./VERSION   Sat Jul  3 23:08:26 1999
@@ -2,7 +2,7 @@
 MAJOR_VERSION=1
 MINOR_VERSION=1
 PATCH_LEVEL=52
-MY_PATCH_LEVEL=mb1
+MY_PATCH_LEVEL=mb2
 
 # use the above to send patches: MY_PATCH_LEVEL is always empty for a
 # released version.
diff -urN ../lilypond-1.1.52.mb1/input/test/font-body.ly ./input/test/font-body.ly
--- ../lilypond-1.1.52.mb1/input/test/font-body.ly      Mon Jun 21 11:35:36 1999
+++ ./input/test/font-body.ly   Sat Jul  3 21:52:39 1999
@@ -14,7 +14,7 @@
                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 -urN ../lilypond-1.1.52.mb1/input/test/repeatbar.fly ./input/test/repeatbar.fly
--- ../lilypond-1.1.52.mb1/input/test/repeatbar.fly     Thu Jan  1 01:00:00 1970
+++ ./input/test/repeatbar.fly  Sat Jul  3 23:05:27 1999
@@ -0,0 +1,3 @@
+c'' d e f | \repetitions1*3 | 
+\time 3/4;
+g4 a b | R2.*2 |
diff -urN ../lilypond-1.1.52.mb1/lily/include/ly-symbols.hh 
./lily/include/ly-symbols.hh
--- ../lilypond-1.1.52.mb1/lily/include/ly-symbols.hh   Mon Jun 28 10:38:36 1999
+++ ./lily/include/ly-symbols.hh        Sat Jul  3 22:11:50 1999
@@ -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);
diff -urN ../lilypond-1.1.52.mb1/lily/include/multi-measure-rest-engraver.hh 
./lily/include/multi-measure-rest-engraver.hh
--- ../lilypond-1.1.52.mb1/lily/include/multi-measure-rest-engraver.hh  Tue Feb  9 
11:45:50 1999
+++ ./lily/include/multi-measure-rest-engraver.hh       Sat Jul  3 22:22:35 1999
@@ -32,7 +32,7 @@
   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_;
 };
diff -urN ../lilypond-1.1.52.mb1/lily/include/musical-request.hh 
./lily/include/musical-request.hh
--- ../lilypond-1.1.52.mb1/lily/include/musical-request.hh      Mon Jun 28 10:38:36 
1999
+++ ./lily/include/musical-request.hh   Sat Jul  3 22:07:02 1999
@@ -124,9 +124,17 @@
 
 /**
  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);
 };
diff -urN ../lilypond-1.1.52.mb1/lily/multi-measure-rest-engraver.cc 
./lily/multi-measure-rest-engraver.cc
--- ../lilypond-1.1.52.mb1/lily/multi-measure-rest-engraver.cc  Mon Mar 15 13:06:14 
1999
+++ ./lily/multi-measure-rest-engraver.cc       Sat Jul  3 22:54:10 1999
@@ -42,20 +42,28 @@
 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 @@
     {
       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_;
     }
diff -urN ../lilypond-1.1.52.mb1/lily/multi-measure-rest.cc 
./lily/multi-measure-rest.cc
--- ../lilypond-1.1.52.mb1/lily/multi-measure-rest.cc   Mon Jun 21 11:30:28 1999
+++ ./lily/multi-measure-rest.cc        Sat Jul  3 23:13:56 1999
@@ -75,7 +75,14 @@
 
   
   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 @@
     }
   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 @@
       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;
 }
diff -urN ../lilypond-1.1.52.mb1/lily/my-lily-lexer.cc ./lily/my-lily-lexer.cc
--- ../lilypond-1.1.52.mb1/lily/my-lily-lexer.cc        Mon Jun 28 10:38:36 1999
+++ ./lily/my-lily-lexer.cc     Sat Jul  3 22:19:42 1999
@@ -60,6 +60,7 @@
   {"relative", RELATIVE},
   {"remove", REMOVE},
   {"repeat", REPEAT},
+  {"repetitions", REPETITIONS},
   {"scm", SCM_T},
   {"scmfile", SCMFILE},
   {"score", SCORE},
diff -urN ../lilypond-1.1.52.mb1/lily/parser.yy ./lily/parser.yy
--- ../lilypond-1.1.52.mb1/lily/parser.yy       Mon Jun 28 10:38:36 1999
+++ ./lily/parser.yy    Sat Jul  3 22:23:43 1999
@@ -173,6 +173,7 @@
 %token RELATIVE
 %token REMOVE
 %token REPEAT
+%token REPETITIONS
 %token SCM_T
 %token SCMFILE
 %token SCORE
@@ -1375,6 +1376,16 @@
                Simultaneous_music*velt_p = new Request_chord;
                velt_p->set_spot (THIS->here_input ());
                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                      {
diff -urN ../lilypond-1.1.52.mb1/ly/script.ly ./ly/script.ly
--- ../lilypond-1.1.52.mb1/ly/script.ly Fri Jun 25 10:47:54 1999
+++ ./ly/script.ly      Sat Jul  3 21:58:50 1999
@@ -43,3 +43,5 @@
 prallmordent = \script "prallmordent"
 upprall = \script "upprall"
 downprall = \script "downprall"
+segno = \script "segno"
+wheel = \script "wheel"
\ No newline at end of file
diff -urN ../lilypond-1.1.52.mb1/mf/feta-banier.mf ./mf/feta-banier.mf
--- ../lilypond-1.1.52.mb1/mf/feta-banier.mf    Wed Jun 30 19:39:38 1999
+++ ./mf/feta-banier.mf Sat Jul  3 21:45:38 1999
@@ -252,7 +252,7 @@
                (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 @@
                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;
diff -urN ../lilypond-1.1.52.mb1/mf/feta-schrift.mf ./mf/feta-schrift.mf
--- ../lilypond-1.1.52.mb1/mf/feta-schrift.mf   Thu Nov 12 17:44:01 1998
+++ ./mf/feta-schrift.mf        Sat Jul  3 21:41:41 1999
@@ -374,7 +374,7 @@
        draw_turn;
                
        penlabels(5,6,7);
-       penlabels(2,3,4);
+       penlabels(1,2,3,4);
 fet_endchar;
 
 
@@ -584,6 +584,118 @@
 
        penlabels(1,2,3,4);
        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;
diff -urN ../lilypond-1.1.52.mb1/scm/script.scm ./scm/script.scm
--- ../lilypond-1.1.52.mb1/scm/script.scm       Tue Apr 27 11:48:54 1999
+++ ./scm/script.scm    Sat Jul  3 21:57:42 1999
@@ -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)
       )
 

Reply via email to