lilypond-user
[Top][All Lists]
Advanced

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

Re: Curious behaviour of q and a tweak


From: Jean Abou Samra
Subject: Re: Curious behaviour of q and a tweak
Date: Tue, 1 Nov 2022 16:58:43 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.3.1

Le 31/10/2022 à 16:08, Paul Hodges a écrit :
I wanted to lengthen the stem of a pair of tied chords, but it didn't work as expected.  After some playing around, I found that I cannot tweak the properties of a chord represented by q (repeating the previous chord), but that the tweaks on the original chord get carried over.  This example shows the possibilities:

%%%%%%%%%%%%%%%%%%%%%%
\version "2.23.80"

{
  \clef bass
  \voiceTwo
  <a,^~ a,,_~>2
  \tweak Stem.length #15
  q8 r4. |
  \tweak Stem.length #15
  <a,^~ a,,_~>2
  q8 r4. |
  <a,^~ a,,_~>2
  \tweak Stem.length #15
  <a, a,,>8 r4. |
}
%%%%%%%%%%%%%%%%%%%%%%

This may be logical in the code, but it surprised me in practical use.



Well, yes, it's logical if you think about how q and \tweak
work. As you can deduce from the existence of the \chordRepeats
function, the substitution of q is not immediate. In contrast,
\tweak takes effect immediately by modifying each of the notes
in the chord. Since there are no notes yet in the "q" chord
at the time \tweak is applied (they are copied later from the
previous chord), \tweak does nothing.

Maybe \tweak on a chord could have its effect on the chord music
itself rather than on each of the constituents so that this would
work.

On the other hand, in this case, there is little \tweak \could do
that \override cannot do. The main purpose of \tweak is to be used
if you want to modify only one of the notes in a chord, but without
writing out each of the notes instead of putting "q", you don't make
room for this. So, just use an \override here.

Best,
Jean




reply via email to

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