[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: arpeggioArrowUp
From: |
Thomas Morley |
Subject: |
Re: arpeggioArrowUp |
Date: |
Fri, 30 Jan 2015 01:45:33 +0100 |
2015-01-29 18:08 GMT+01:00 tisimst <address@hidden>:
> 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
- Re: arpeggioArrowUp, (continued)
- Re: arpeggioArrowUp, Pierre Perol-Schneider, 2015/01/15
- Re: arpeggioArrowUp, tisimst, 2015/01/15
- Re: arpeggioArrowUp, Thomas Morley, 2015/01/15
- Re: arpeggioArrowUp, Thomas Morley, 2015/01/15
- Re: arpeggioArrowUp, Thomas Morley, 2015/01/16
- Re: arpeggioArrowUp, Thomas Morley, 2015/01/16
- Re: arpeggioArrowUp, Pierre Perol-Schneider, 2015/01/17
- Re: arpeggioArrowUp, Noeck, 2015/01/29
- Re: arpeggioArrowUp, tisimst, 2015/01/29
- Re: arpeggioArrowUp, Noeck, 2015/01/29
- Re: arpeggioArrowUp,
Thomas Morley <=
- Re: arpeggioArrowUp, Hwaen Ch'uqi, 2015/01/14
- Re: arpeggioArrowUp, Alistair Millar, 2015/01/14