lilypond-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Guitar palm mutes - almost done


From: Neo Anderson
Subject: Guitar palm mutes - almost done
Date: Sun, 31 Dec 2017 16:20:05 +0000 (UTC)

Dear All,

After plenty of tweaking (as I have found it's pretty often the case) I've come up with quite a satisfying code (based on David Kastrup's one) for guitar palm mutes. Please check out the tiny example.

There are still two things I can't figure out, though, and I would be grateful if someone could help me with them.

1. How to change the look of the extender lines (dashes)? I'd like them to be more dense or compact. The following -\tweaks with various values won't make a difference.
    -\tweak bound-details.dash-fraction #0
    -\tweak bound-details.dash-period #0

2. The following code, which sets both variables on the same "line",
    \override TextScript.staff-padding = #6
creates a padding for both text in a variable ("PM") and any other text attached to a note ("Aaa").
How to integrate the code into the said variable, so that the padding won't affect the text attached to notes? I tried
    \override #'(staff-padding . 6)
but it doesn't do anything.

One thing to point out: there are two variables for PMs because "startPM" won't parse when it's at the beginning of the line or it won't work under a single note. At least I am not able to work it out.

Would anyone take a look at those, please? I really want to learn how to write code but it's not always easy.

Cheers!

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

% START CODE

\version "2.18.2"

startPM = -\single\textSpannerDown
          -\tweak staff-padding #5.45
          -\tweak bound-details.left.text \markup \upright \fontsize #-3 "P.M."
          -\tweak bound-details.left.stencil-align-dir-y #0
          -\tweak bound-details.right.stencil-align-dir-y #0
          -\tweak bound-details.right.text \markup \upright \fontsize #-3 "|"
          -\tweak bound-details.right.attach-dir #2
          -\tweak bound-details.left.attach-dir #-2
          -\startTextSpan

stopPM = \stopTextSpan

PM = \markup  {
  \tiny \fontsize #-1 \halign #-0.5 "P.M."
}

\new Staff {
  \clef "G_8"
  \override TextScript.staff-padding = #6
  % Both PMs and "Aaa" are affected by padding
  e,_\PM^"Aaa" d f d_\PM |
  a g b, \startPM c | 
  g \stopPM d' e, \startPM f, \stopPM |
}

% END CODE

reply via email to

[Prev in Thread] Current Thread [Next in Thread]