[prev in list] [next in list] [prev in thread] [next in thread]
List: lilypond-user
Subject: Re: arpeggioArrowUp
From: Thomas Morley <thomasmorley65 () gmail ! com>
Date: 2015-01-30 0:45:33
Message-ID: CABsfGyUThRZnvan7njbO_+24APnGUXUfaQL=4G=cL1en=zKq4w () mail ! gmail ! com
[Download RAW message or body]
2015-01-29 18:08 GMT+01:00 tisimst <tisimst.lilypond@gmail.com>:
> Noeck wrote
>> Dear Harm,
>>
>> Am 15.01.2015 um 03:22 schrieb Thomas Morley:
>>> arpeggioUp =
>>> -\tweak #'stencil #ly:arpeggio::print
>>> -\tweak #'X-extent #ly:arpeggio::width
>>> -\tweak #'arpeggio-direction #UP
>>> \arpeggio
>>
>> I came back to this today and I like this simple approach most.
>>
>> One more question: what are the first two tweaks needed for?
>> I see no difference if I omit them.
>
> +1*10!
> Oooooh! That is very nice!
>
> The first two tweaks revert the arpeggio to the squiggle when the user has
> otherwise used "\arpeggioBracket" or similar, like:
>
> %<------------------ SNIP -----------------
>
> \version "2.18.2"
>
> arpeggioUp =
> -\tweak #'stencil #ly:arpeggio::print
> -\tweak #'X-extent #ly:arpeggio::width
> -\tweak #'arpeggio-direction #UP
> \arpeggio
>
> arpeggioDown =
> -\tweak #'stencil #ly:arpeggio::print
> -\tweak #'X-extent #ly:arpeggio::width
> -\tweak #'arpeggio-direction #DOWN
> \arpeggio
>
> \relative c'' {
> \arpeggioBracket
> <g b d g>4\arpeggioUp
> q\arpeggio % <--- still uses the bracket
> q\arpeggioDown
> }
>
> %<------------------ SNIP -----------------
>
> I really like this "-\tweak" approach because it automatically only applies
> the changes to the current chord and is easily repeatable without much extra
> typing. Nice work, Harm!
>
> Anyone willing to help get this (and similar code for "arpeggioDown") pushed
> into "property-init.ly"? Shouldn't be too hard to get through and would be a
> nice (i.e., more intuitive) syntax, especially for new users, IMHO.
>
> In fact, all the different arpeggio types could be converted to the
> "-\tweak" syntax and I think that it would make them all a little easier to
> use.
>
> -Abraham
Hi Abraham,
I've currently not the time to create a patch and write the necessary
documentation.
Though, I had once more a look at it and I'm not convinced that we
should change all the commands to tweak commands for some reasons:
%%%
1)
%%%
arpeggioArrowUp is currently defined as
arpeggioArrowUp = {
\revert Arpeggio.stencil
\revert Arpeggio.X-extent
\override Arpeggio.arpeggio-direction = #UP
}
That makes it possible to set it in layout, a tweak would not work.
I'm never a friend of _loosing_ functionality, although I've to admit
putting arpeggioArrowUp into layout may be a very rare case.
It could be _added_, though.
%%%
2)
%%%
To revert a previous user-command affecting the stencil I inserted the
_default_ procedure. (Same for X-extent)
This will not always lead to the same results compared with reverting
a previous stencil-_override_.
See the following example where I demonstrate stencil overrides and
reverts and a tweak (with default-stencil-procedure) for different
stencil-colors of Fingering.
You will see there's a difference between the tweak and the first revert.
\version "2.19.15"
clr-fing-stil-override =
#(define-music-function (parser location clr)(color?)
;; a shortcut for outputting a colored stencil
#{
\override Fingering.stencil =
#(lambda (grob)
(stencil-with-color
(ly:text-interface::print grob)
clr))
#})
\score {
\relative c' {
<c-1>1
\temporary \clr-fing-stil-override #red
<d-2>
<e-\tweak #'stencil #ly:text-interface::print -3 >
<f-4>1
\revert Fingering.stencil
<g-5>
\revert Fingering.stencil
<a-6>
}
\layout {
\clr-fing-stil-override #green
}
}
I don't know a method to _revert_ an override from inside a tweak. I
doubt it's possible.
Ofcourse an entry to "known issues and warnings" could be created.
%%%
3)
%%%
It mixes affecting the printed output and music.
I'm not a friend of it.
Though, maybe acceptable as syntactic sugar ...
So far my concerns.
The way to proceed would be to discuss it on devel, imho.
Or to put up a patch for review.
Though again, I've not the time for it right now.
(If I can spare some time, I'll start to rewrite chord-namings...)
Cheers,
Harm
_______________________________________________
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