From eac77f904fc380767d938a2ea41b9306b76f9561 Mon Sep 17 00:00:00 2001 From: Reinhold Kainhofer Date: Sun, 10 Jul 2011 22:38:30 +0200 Subject: [PATCH] Fix 1390: Add slashedGrace function (graces with slashed stems but no slur, e.g. because the grace is tied) --- input/regression/grace-slashed-no-slur.ly | 11 +++++++++++ ly/grace-init.ly | 8 ++++++++ ly/music-functions-init.ly | 5 +++++ 3 files changed, 24 insertions(+) create mode 100644 input/regression/grace-slashed-no-slur.ly 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 -- 2.39.2