From: Mats Bengtsson Date: Sat, 3 Jul 1999 21:11:12 +0000 (+0200) Subject: patch::: 1.1.52.mb2 X-Git-Tag: release/1.1.53~3 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=670a98f23a2561c6a4a4a19bb72c776189715541;p=lilypond.git patch::: 1.1.52.mb2 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 --- diff --git a/Documentation/tex/feta.tex b/Documentation/tex/feta.tex index c713e128af..296fddc143 100644 --- a/Documentation/tex/feta.tex +++ b/Documentation/tex/feta.tex @@ -42,7 +42,7 @@ \vskip5mm -\listfont{\fetatwenty}{0}{123} +\listfont{\fetatwenty}{0}{102} % urg \vskip-\charheight \listfont{\fetanumber}{48}{58} diff --git a/Documentation/tex/refman.yo b/Documentation/tex/refman.yo index 8b1259b003..719770e081 100644 --- a/Documentation/tex/refman.yo +++ b/Documentation/tex/refman.yo @@ -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 2ab931ebe5..8b17eca679 100644 --- 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 d80cfa0a64..c0bc37e1b0 100644 --- 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. diff --git a/input/test/font-body.ly b/input/test/font-body.ly index ad8d70d77c..277d1acc58 100644 --- a/input/test/font-body.ly +++ b/input/test/font-body.ly @@ -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 index 0000000000..0829b73d29 --- /dev/null +++ b/input/test/repeatbar.fly @@ -0,0 +1,3 @@ +c'' d e f | \repetitions1*3 | +\time 3/4; +g4 a b | R2.*2 | diff --git a/lily/include/ly-symbols.hh b/lily/include/ly-symbols.hh index dee6c5f0aa..07890e4c10 100644 --- a/lily/include/ly-symbols.hh +++ b/lily/include/ly-symbols.hh @@ -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 --git a/lily/include/multi-measure-rest-engraver.hh b/lily/include/multi-measure-rest-engraver.hh index 43732df92f..aa36e00edf 100644 --- a/lily/include/multi-measure-rest-engraver.hh +++ b/lily/include/multi-measure-rest-engraver.hh @@ -32,7 +32,7 @@ private: Drul_array 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 --git a/lily/include/musical-request.hh b/lily/include/musical-request.hh index 28ce7bf4cd..2c220138a9 100644 --- a/lily/include/musical-request.hh +++ b/lily/include/musical-request.hh @@ -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: diff --git a/lily/multi-measure-rest-engraver.cc b/lily/multi-measure-rest-engraver.cc index 37e3baa7ac..00fd9118c1 100644 --- a/lily/multi-measure-rest-engraver.cc +++ b/lily/multi-measure-rest-engraver.cc @@ -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 (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 (req_l)) + r=mr; + else if (Repetitions_req *rr = + dynamic_cast (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 (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 --git a/lily/multi-measure-rest.cc b/lily/multi-measure-rest.cc index 26e55b1770..5c604e3176 100644 --- a/lily/multi-measure-rest.cc +++ b/lily/multi-measure-rest.cc @@ -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; } diff --git a/lily/my-lily-lexer.cc b/lily/my-lily-lexer.cc index 048dd1856b..8fd2081c20 100644 --- a/lily/my-lily-lexer.cc +++ b/lily/my-lily-lexer.cc @@ -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}, diff --git a/lily/parser.yy b/lily/parser.yy index adc565e244..78815d1cd2 100644 --- a/lily/parser.yy +++ b/lily/parser.yy @@ -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")); diff --git a/ly/script.ly b/ly/script.ly index eea258c9d1..cbd3225c8e 100644 --- a/ly/script.ly +++ b/ly/script.ly @@ -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 diff --git a/mf/feta-banier.mf b/mf/feta-banier.mf index 91ccd66bf5..64a289c86e 100644 --- a/mf/feta-banier.mf +++ b/mf/feta-banier.mf @@ -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; diff --git a/mf/feta-schrift.mf b/mf/feta-schrift.mf index 9d5983726a..0ce139e2dd 100644 --- a/mf/feta-schrift.mf +++ b/mf/feta-schrift.mf @@ -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; diff --git a/scm/script.scm b/scm/script.scm index 3ab041ac90..fbeeae8615 100644 --- a/scm/script.scm +++ b/scm/script.scm @@ -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) )