[prev in list] [next in list] [prev in thread] [next in thread] 

List:       lilypond-user
Subject:    Guitar palm mutes - almost done
From:       Neo Anderson <sebulba11 () yahoo ! com>
Date:       2017-12-31 16:20:05
Message-ID: 420515367.7289291.1514737205628 () mail ! yahoo ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


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


[Attachment #5 (text/html)]

<html><head></head><body><div style="color:#000; background-color:#fff; \
font-family:Helvetica Neue, Helvetica, Arial, Lucida Grande, \
sans-serif;font-size:13px"><div id="yui_3_16_0_ym19_1_1514736181518_26999">Dear \
All,</div><div id="yui_3_16_0_ym19_1_1514736181518_27000"><br \
id="yui_3_16_0_ym19_1_1514736181518_27001"></div><div dir="ltr" \
id="yui_3_16_0_ym19_1_1514736181518_27002">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.<br \
id="yui_3_16_0_ym19_1_1514736181518_27003"><br \
id="yui_3_16_0_ym19_1_1514736181518_27004">There are still two things I can't figure \
out, though, and I would be grateful if someone could help me with them.<br \
id="yui_3_16_0_ym19_1_1514736181518_27005"><br \
id="yui_3_16_0_ym19_1_1514736181518_27006">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.<br \
id="yui_3_16_0_ym19_1_1514736181518_27007">&nbsp;&nbsp;&nbsp; -\tweak \
bound-details.dash-fraction #0<br \
id="yui_3_16_0_ym19_1_1514736181518_27008">&nbsp;&nbsp;&nbsp; -\tweak \
bound-details.dash-period #0<br id="yui_3_16_0_ym19_1_1514736181518_27009"><br \
id="yui_3_16_0_ym19_1_1514736181518_27010">2. The following code, which sets both \
variables on the same "line",<br \
id="yui_3_16_0_ym19_1_1514736181518_27011">&nbsp;&nbsp;&nbsp; \override \
TextScript.staff-padding = #6<br id="yui_3_16_0_ym19_1_1514736181518_27012">creates a \
padding for both text in a variable ("PM") and any other text attached to a note \
("Aaa").<br id="yui_3_16_0_ym19_1_1514736181518_27013">How to integrate the code into \
the said variable, so that the padding won't affect the text attached to notes? I \
tried <br id="yui_3_16_0_ym19_1_1514736181518_27014">&nbsp;&nbsp;&nbsp; \override \
#'(staff-padding . 6)<br id="yui_3_16_0_ym19_1_1514736181518_27015">but it doesn't do \
anything.<br id="yui_3_16_0_ym19_1_1514736181518_27016"><br \
id="yui_3_16_0_ym19_1_1514736181518_27017"><div \
id="yui_3_16_0_ym19_1_1514736181518_28486">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.</div><div><br></div><div id="yui_3_16_0_ym19_1_1514736181518_29870">Would anyone \
take a look at those, please? I really want to learn how to write code but it's not \
always easy.</div><div><br></div><div>Cheers!<br></div></div><div dir="ltr" \
id="yui_3_16_0_ym19_1_1514736181518_27018"><br \
id="yui_3_16_0_ym19_1_1514736181518_27019"></div><div dir="ltr" \
id="yui_3_16_0_ym19_1_1514736181518_27020">%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%<br \
id="yui_3_16_0_ym19_1_1514736181518_27021"></div><div dir="ltr" \
id="yui_3_16_0_ym19_1_1514736181518_27022"><br \
id="yui_3_16_0_ym19_1_1514736181518_27023"></div><div dir="ltr" \
id="yui_3_16_0_ym19_1_1514736181518_27024">% START CODE</div><div dir="ltr" \
id="yui_3_16_0_ym19_1_1514736181518_27025"><br \
id="yui_3_16_0_ym19_1_1514736181518_27026"></div><div dir="ltr" \
id="yui_3_16_0_ym19_1_1514736181518_27027">\version "2.18.2"<br \
id="yui_3_16_0_ym19_1_1514736181518_27028"><br \
id="yui_3_16_0_ym19_1_1514736181518_27029">startPM = -\single\textSpannerDown<br \
id="yui_3_16_0_ym19_1_1514736181518_27030">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
-\tweak staff-padding #5.45<br \
id="yui_3_16_0_ym19_1_1514736181518_27031">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
-\tweak bound-details.left.text \markup \upright \fontsize #-3 "P.M."<br \
id="yui_3_16_0_ym19_1_1514736181518_27032">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
-\tweak bound-details.left.stencil-align-dir-y #0<br \
id="yui_3_16_0_ym19_1_1514736181518_27033">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
-\tweak bound-details.right.stencil-align-dir-y #0<br \
id="yui_3_16_0_ym19_1_1514736181518_27034">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
-\tweak bound-details.right.text \markup \upright \fontsize #-3 "|"<br \
id="yui_3_16_0_ym19_1_1514736181518_27035">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
-\tweak bound-details.right.attach-dir #2<br \
id="yui_3_16_0_ym19_1_1514736181518_27036">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
-\tweak bound-details.left.attach-dir #-2<br \
id="yui_3_16_0_ym19_1_1514736181518_27037">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
-\startTextSpan<br id="yui_3_16_0_ym19_1_1514736181518_27038"><br \
id="yui_3_16_0_ym19_1_1514736181518_27039">stopPM = \stopTextSpan<br \
id="yui_3_16_0_ym19_1_1514736181518_27040"><br \
id="yui_3_16_0_ym19_1_1514736181518_27041">PM = \markup&nbsp; {<br \
id="yui_3_16_0_ym19_1_1514736181518_27042">&nbsp; \tiny \fontsize #-1 \halign #-0.5 \
"P.M."<br id="yui_3_16_0_ym19_1_1514736181518_27043">}<br \
id="yui_3_16_0_ym19_1_1514736181518_27044"><br \
id="yui_3_16_0_ym19_1_1514736181518_27045">\new Staff { <br \
id="yui_3_16_0_ym19_1_1514736181518_27046">&nbsp; \clef "G_8" <br \
id="yui_3_16_0_ym19_1_1514736181518_27047">&nbsp; \override TextScript.staff-padding \
= #6<br id="yui_3_16_0_ym19_1_1514736181518_27048">&nbsp; % Both PMs and "Aaa" are \
affected by padding<br id="yui_3_16_0_ym19_1_1514736181518_27049">&nbsp; e,_\PM^"Aaa" \
d f d_\PM |<br id="yui_3_16_0_ym19_1_1514736181518_27050">&nbsp; a g b, \startPM c \
|&nbsp; <br id="yui_3_16_0_ym19_1_1514736181518_27051">&nbsp; g \stopPM d' e, \
\startPM f, \stopPM |<br id="yui_3_16_0_ym19_1_1514736181518_27052">}<br \
id="yui_3_16_0_ym19_1_1514736181518_27053"></div><div dir="ltr" \
id="yui_3_16_0_ym19_1_1514736181518_27054"><br \
id="yui_3_16_0_ym19_1_1514736181518_27055"></div>% END CODE</div></body></html>



_______________________________________________
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic