From: Reinhold Kainhofer Date: Sun, 10 Jul 2011 20:38:30 +0000 (+0200) Subject: Fix 1390: Add slashedGrace function (graces with slashed stems but no slur, e.g.... X-Git-Tag: release/2.15.6-1~3^2~1 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=eac77f904fc380767d938a2ea41b9306b76f9561;p=lilypond.git Fix 1390: Add slashedGrace function (graces with slashed stems but no slur, e.g. because the grace is tied) --- diff --git a/input/regression/grace-slashed-no-slur.ly b/input/regression/grace-slashed-no-slur.ly new file mode 100644 index 0000000000..b7873e1f77 --- /dev/null +++ b/input/regression/grace-slashed-no-slur.ly @@ -0,0 +1,11 @@ +\version "2.15.6" + +\header +{ + texidoc = "Create grace notes with slashed stem, but no slur. That can be used + when the grace note is tied to the next note. +" +} +\relative { + \slashedGrace c16~ c1 +} diff --git a/ly/grace-init.ly b/ly/grace-init.ly index b9729f3e93..6850541afa 100644 --- a/ly/grace-init.ly +++ b/ly/grace-init.ly @@ -28,3 +28,11 @@ stopAcciaccaturaMusic = { \revert Stem #'stroke-style s1*0\stopGraceSlur } + +startSlashedGraceMusic = { + \override Stem #'stroke-style = #"grace" +} + +stopSlashedGraceMusic = { + \revert Stem #'stroke-style +} diff --git a/ly/music-functions-init.ly b/ly/music-functions-init.ly index b627c43a97..8fb4010f4e 100644 --- a/ly/music-functions-init.ly +++ b/ly/music-functions-init.ly @@ -868,6 +868,11 @@ shiftDurations = (lambda (x) (shift-one-duration-log x dur dots)) arg)) +slashedGrace = +#(def-grace-function startSlashedGraceMusic stopSlashedGraceMusic + (_i "Create slashed graces (slashes through stems, but no slur) from +the following music expression")) + spacingTweaks = #(define-music-function (parser location parameters) (list?) (_i "Set the system stretch, by reading the 'system-stretch property of