From: Jan Nieuwenhuizen Date: Sat, 14 Nov 1998 16:39:58 +0000 (+0100) Subject: patch::: 1.1.5.jcn4: plet en pin :-) X-Git-Tag: release/1.1.6~2 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=08708249a59d4fd0303305b13044b4e5b9288df6;p=lilypond.git patch::: 1.1.5.jcn4: plet en pin :-) pl5.jcn4 - scm additions: plet, hairpin - website fixes --- diff --git a/NEWS b/NEWS index 9b9189af5f..fce3556d2e 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,7 @@ +pl5.jcn4 + - scm additions: plet, hairpin + - website fixes + pl5.jcn3 - website fixes diff --git a/VERSION b/VERSION index 8d9330e3fa..f22cd6d233 100644 --- a/VERSION +++ b/VERSION @@ -2,7 +2,7 @@ PACKAGE_NAME=LilyPond MAJOR_VERSION=1 MINOR_VERSION=1 PATCH_LEVEL=5 -MY_PATCH_LEVEL=jcn3 +MY_PATCH_LEVEL=jcn4 # use the above to send patches: MY_PATCH_LEVEL is always empty for a # released version. diff --git a/init/lily.scm b/init/lily.scm index aadf071f12..4d29ce239f 100644 --- a/init/lily.scm +++ b/init/lily.scm @@ -100,10 +100,38 @@ (char o n) ((invoke-output o "invoke-char") "show" n)) +(define + (crescendo o w h cont) + ((invoke-output o "crescendo") w h cont)) + +(define + (crescendo-ps w h cont) + (string-append + (numbers->string (list w h (inexact->exact cont))) + "draw_crescendo")) + +(define + (crescendo-tex w h cont) + (embedded-ps-tex (crescendo-ps w h cont))) + (define (dashed-slur o thick dash l) ((invoke-output o "dashed-slur") thick dash l)) +(define + (decrescendo o w h cont) + ((invoke-output o "decrescendo") w h cont)) + +(define + (decrescendo-ps w h cont) + (string-append + (numbers->string (list w h (inexact->exact cont))) + "draw_decrescendo")) + +(define + (decrescendo-tex w h cont) + (embedded-ps-tex (decrescendo-ps w h cont))) + (define (dashed-slur-ps thick dash l) (string-append @@ -424,4 +452,17 @@ (string-append "\\set" f "{" s "}")) +(define + (tuplet o dx dy dir) + ((invoke-output o "tuplet") dx dy dir)) + +(define + (tuplet-ps dx dy dir) + (string-append + (numbers->string (list dx dy (inexact->exact dir))) + "draw_tuplet")) + +(define + (tuplet-tex dx dy dir) + (embedded-ps-tex (tuplet-ps dx dy dir))) diff --git a/input/test/GNUmakefile b/input/test/GNUmakefile index 9d0326d15f..39f71e418c 100644 --- a/input/test/GNUmakefile +++ b/input/test/GNUmakefile @@ -1,7 +1,7 @@ # input/test/Makefile depth = ../.. -examples=font20 hara-kiri grace mark denneboom slurs +examples=font20 hara-kiri grace mark denneboom sleur LOCALSTEPMAKE_TEMPLATES=mutopia include $(depth)/make/stepmake.make diff --git a/input/test/mark.ly b/input/test/mark.ly index 7b2f99823c..e730c90c0a 100644 --- a/input/test/mark.ly +++ b/input/test/mark.ly @@ -20,6 +20,6 @@ two = \notes\relative c{ \score{ < \global \one \two > \paper { - \translator { \BarNumberingStaffContext } + \translator { \OrchestralPartStaffContext } } } diff --git a/lily/lookup.cc b/lily/lookup.cc index 63259a3cc7..e579ca8231 100644 --- a/lily/lookup.cc +++ b/lily/lookup.cc @@ -449,12 +449,13 @@ Lookup::hairpin (Real width, bool decresc, bool continued) const { Atom a; Real height = paper_l_->staffheight_f () / 6; - String ps; - ps += to_str (width) + " " - + to_str (height) + " " - + to_str (continued ? height/2 : 0) + - + " draw_" + String (decresc ? "de" : "") + "cresc\n"; - a.str_ = ps; + Array arr; + arr.push (width); + arr.push (height); + arr.push (continued ? height/2 : 0); + String hairpin = String (decresc ? "de" : "") + "crescendo\n"; + a.lambda_ = (lambda_scm (hairpin, arr)); + a.str_ = "hairpin"; a.dim_.x () = Interval (0, width); a.dim_.y () = Interval (-2*height, 2*height); a.font_ = font_; @@ -464,15 +465,13 @@ Lookup::hairpin (Real width, bool decresc, bool continued) const Atom Lookup::plet (Real dy , Real dx, Direction dir) const { - String ps; - - ps += String_convert::double_str (dx) + " " - + String_convert::double_str (dy) + " " - + String_convert::int_str ( (int)dir) + - " draw_plet "; - + Array arr; + arr.push (dx); + arr.push (dy); + arr.push (dir); Atom a; - a.str_ = ps; + a.lambda_ = (lambda_scm ("tuplet", arr)); + a.str_ = "plet"; return a; } @@ -481,8 +480,6 @@ Lookup::slur (Array controls) const { assert (controls.size () == 8); - String ps; - Real dx = controls[3].x () - controls[0].x (); Real dy = controls[3].y () - controls[0].y (); Atom a; diff --git a/ps/lily.ps b/ps/lily.ps index c0b92bdcef..56745b521b 100644 --- a/ps/lily.ps +++ b/ps/lily.ps @@ -18,7 +18,7 @@ closepath fill } bind def % -/draw_decresc +/draw_decrescendo % cont height width { stafflinethickness setlinewidth /cresc_cont exch def @@ -33,7 +33,7 @@ stroke } bind def % -/draw_cresc +/draw_crescendo % cont height width { stafflinethickness setlinewidth /cresc_cont exch def @@ -53,29 +53,29 @@ 1 copy mul exch 1 copy mul add sqrt } bind def % -stafflinethickness 1.2 mul /plet_t exch def -/draw_plet +stafflinethickness 1.2 mul /tuplet_t exch def +/draw_tuplet { - plet_t setlinewidth + tuplet_t setlinewidth % urg: the only Level-2 PS, check effect in print % true setstrokeadjust 1 setlinecap 1 setlinejoin /dir exch def - /plet_dy exch def - /plet_dx exch def - staffheight 2 div /plet_gapx exch def - plet_dy plet_dx div plet_gapx mul /plet_gapy exch def - staffheight 4 div dir mul /plet_h exch def + /tuplet_dy exch def + /tuplet_dx exch def + staffheight 2 div /tuplet_gapx exch def + tuplet_dy tuplet_dx div tuplet_gapx mul /tuplet_gapy exch def + staffheight 4 div dir mul /tuplet_h exch def % 0 0 moveto - 0 plet_h lineto - plet_dx plet_gapx sub 2 div - plet_dy plet_gapy sub 2 div plet_h add lineto - plet_dx plet_gapx add 2 div - plet_dy plet_gapy add 2 div plet_h add moveto - plet_dx plet_dy plet_h add lineto - plet_dx plet_dy lineto + 0 tuplet_h lineto + tuplet_dx tuplet_gapx sub 2 div + tuplet_dy tuplet_gapy sub 2 div tuplet_h add lineto + tuplet_dx tuplet_gapx add 2 div + tuplet_dy tuplet_gapy add 2 div tuplet_h add moveto + tuplet_dx tuplet_dy tuplet_h add lineto + tuplet_dx tuplet_dy lineto stroke } bind def %