2

OK, I know how to shape individual ties of chords and how to change the thickness of ties. But when it comes to shaping individual ties within a chord, the "global" thickness setting is not being retained and I am unable to determine how to set the tie thickness for the individual ties. Below is a minimal example of what I'm trying to accomplish. In measure 15 (the last measure of the first system), the ties between the chord have the expected thickness. However, when it comes to measure 22 (the last measure in the last system), I want to shape the individual ties of this chord, and when doing so, the ties appear "thinner" than the thickness I have set. For good measure, I show what happens when I try to use \override Tie.thickness = #10 before the chord--the setting only applies the the "first" tie that appears in the definition of the chord, but not the other two. And obviously, you cannot use -\tweak thickness #10 inside the chord, so that doesn't work.

Why is the Tie.thickness set at the score level not sticking around when shaping the individual ties in measure 22 even though the thickness is applied in measure 14 where I also shape those ties? How can I shape the ties and maintain the thickness I desire?

\version "2.24.4"

% Set default paper size
#(set-default-paper-size "arch a")

% Set default staff size, in points
#(set-global-staff-size 18)

beamHeight = #(define-music-function
  (startHeight endHeight)
  (number? number?)
  #{
    \once \override Beam.positions = #(cons startHeight endHeight)
  #}
)

% Set a variable to define the slur thickness.
slurThickness = #1.8
tieThickness = #1.8
lengthenTie = \shape #'((-0.5 . 0.25 ) (0 . 0.35) (0 . 0.35) (0.5 . 0.25)) Tie

props = {
  \time 4/4
  \key ees \major
}

rh = \relative c {
  %% 11
  \shape #'((0 . -1.5) (15 . 1) (-15 . 2) (0 . 0.25)) PhrasingSlur
  \beamHeight #-3.25 #-3.25 d''8\( g, bes d \beamHeight #4 #4 g, bes d g,
  \beamHeight #-3 #-3 ees' g, bes f' \override Beam.positions = #'(-3.25 . -3.25) g, bes ees g,
  d' g, bes d g, bes f' g,
  \revert Beam.positions
  \beamHeight #-3 #-3 f' g, bes \lengthenTie ees~\) 4.\fermata \shape #'(((1.5 . 1.25) (1.25 . 2) (1.75 . 2) (1.5 . 0.625)) ((1 . -1) (25 . 0.75) (-25 . 0.75) (0 . 0.5))) PhrasingSlur g,8^\(
  \break

  %% 15
  \beamHeight #-4 #-4 d' g, bes d \beamHeight #4 #4 g, bes d g,
  \beamHeight #-3.25 #-3.25 ees' g, bes f' \override Beam.positions = #'(-3.5 . -3.5) g, bes ees g,
  d' g, bes d g, bes f' g,
  \beamHeight #-4 #-4 f' g, bes \lengthenTie ees~\) 4. \shape #'(((1.5 . 1.25) (1 . 1.75) (2 . 1.75) (1.5 . 1)) ((1 . -.5) (20 . 1) (-10 . 2) (0 . .75))) PhrasingSlur g,8^\(
  \break
    
  %% 19
  \beamHeight #-3.5 #-3.5 d' g, bes d \beamHeight #3.75 #3.75 g, bes d g,
  \beamHeight #-3 #-3 ees' g, bes f' \override Beam.positions = #'(-3.5 . -3.5) g, bes ees g,
  d' g, bes d g, bes f' g,
  \revert Beam.positions
  \beamHeight  #-3 #-3 f' g, bes \lengthenTie ees~\) 4.\fermata \shape #'(((0 . 0) (-.5 . 0.75) (1.25 . 0.75) (.75 . 0.125)) ((0.25 . -1) (1 . 1) (-5 . 1) (0 . 0.5))) PhrasingSlur bes8
  \break
}

% I know, I should've made the relative note different... :|
lh = \relative c {
  %% 11
  <
    g'-\shape #'((.5 . .375) (5 . -.625) (-5 . -.625) (-.5 . .375))_~
    d'
  >1
  
  \once \override TieColumn.positioning-done = ##t
  <
    g
    ees'
  >
  
  <
    g-\shape #'((.5 . .375) (5 . -.625) (-5 . -.625) (-.5 . .375))_~
    d'
  >
  
  \once \override TieColumn.positioning-done = ##t
  <
    g-\shape #'((.125 . .375) (2 . -.125) (-2 . -.125) (-.125 . .375)) _~
    ees'-\shape #'((0 . 0) (1.5 . 0.5) (-1.5 . 0.5) (-.125 . 0))^~
  >2
  \once \override TieColumn.positioning-done = ##t
  <
    g-\shape #'((0 . 0) (0 . .25) (0 . .25) (-.125 . 0))_~
    ees'-\shape #'((0.125 . -.25) (0 . -.5) (0 . -.5) (0 . -.25))^~
  >4.^\fermata
  \once \override TieColumn.positioning-done = ##t
  8
  \break
  
  %% 15
  <d' g,>1
  <ees bes ees,>
  <d g,>1
  <ees bes ees,>
  \break
  
  %% 19
  <d bes g>
  <ees bes ees,>
  <d bes g>
  \override Tie.thickness = #10
  <
    ees-\shape #'((0 . 0) (0 . 0.5) (0 . 0.5) (-.25 . 0))-~
    bes-\shape #'((0.5 . -.75) (0 . -.75) (0 . -.75) (-0.5 . -.75))-~
    ees,-\shape #'((0 . .375) (0 . -.125) (0 . -.125) (0 . .375))_~
  >2
  \once \override TieColumn.positioning-done = ##t
  <
    ees-\shape #'((0.125 . -0.25) (0 . -0.5) (0 . -0.5) (0 . -0.25))-~
    bes-\shape #'((1.125 . -.5) (1.125 . -.75) (-0.375 . -.75) (-0.375 . -.5))-~
    ees,-\shape #'((0.125 . -0.125) (0 . 0.125) (0 . 0.125) (0 . -.125))_~
  >4.^\fermata
  \once \override TieColumn.positioning-done = ##t
  <
    ees
    bes
    ees,
  >8
  \revert Tie.thickness
  \break
}

\book {
  % Set paper/page settings for the book, inherited by all bookparts unless overridden in a bookpart
  \paper {
    #(define fonts
       (set-global-fonts
        ;#:music "emmentaler"
        ;#:brace "emmentaler"
        #:roman "FreeSerif"
        ;#:sans "Nimbus Sans, Nibus Sans L"
        ;#:typewriter "DejaVu Sans Mono"
        ; Unnecessary if the staff size is the default of 20pts
        #:factor (/ staff-height pt 20)
       ))
    %annotate-spacing = ##t
    binding-offset = 0.25 \in
    bookTitleMarkup = \markup \null
    bottom-margin = .8125 \in
    %check-consistency = ##t
    first-page-number = #4
    indent = 0 \in
    inner-margin = .8125 \in
    outer-margin = .8125 \in
    ragged-last-bottom = ##t
    two-sided = ##t
  }
  
  % I'm creating an entire book...I've removed most of what I had here...
  \bookpart {
    \paper {
      evenFooterMarkup = \markup {
        \if \on-first-page-of-part
        \fromproperty #'header:copyright
      }
    }
    \score {
      \relative c''
      \new PianoStaff \with {
        \override VerticalAxisGroup.staff-staff-spacing = #'(
                                                         (basic-distance . 10)
                                                         (minimum-distance . 10)
                                                         (padding . 1)
                                                         (stretchability . 0))
      } <<
        \new Staff = "RH" \with {
        } <<
          \set Score.currentBarNumber = #11
          \props
          \rh
        >>
        \new Staff = "LH" \with {
        } <<
          \clef bass
          \props
          \lh
        >>
      >>
      \layout {
        \override Slur.thickness = #slurThickness
        \override Tie.thickness = #tieThickness
        \override Score.BarNumber.X-offset = #0.25
        \override Score.BarNumber.Y-offset = #4
        \override Score.NonMusicalPaperColumn.full-measure-extra-space = #-.5
      }
    }
  }
}

Sample of Score I'm trying to engrave

UPDATE

OK, so I tried one more thing: setting Tie.thickness in a context in the layout block, as opposed to just in the layout block itself, as follows:

% ... same example as above
      \layout {
        % ... same layout settings as above
        %\override Tie.thickness = #tieThickness
        \context {
            \Score
            \override Tie.thickness = #5
        }
      }
    }
  }
}

With this change, I got 5sp-width ties everywhere--except the last two ties of the chord where I explicitly set the shape. I was about to suggest that \once \override TieColumn.positioning-done = ##t may have something to do with it, but I used that same construct for measure 14, too--so if that was really affecting measure 22, then measure 14 should also be affected and yet, it appears exactly as I would expect.

UPDATE #2

OK, per @lazy's answer, I tried the following:

  %% 19
  <d bes g>
  <ees bes ees,>
  <d bes g>
  \once \override Score.Tie.thickness = #10
  <
    ees-\shape #'((0 . 0) (0 . 0.5) (0 . 0.5) (-.25 . 0))-~
    bes-\shape #'((0.5 . -.75) (0 . -.75) (0 . -.75) (-0.5 . -.75))-~
    ees,-\shape #'((0 . .375) (0 . -.125) (0 . -.125) (0 . .375))_~
  >2
  \override Score.Tie.thickness = #10
  \once \override TieColumn.positioning-done = ##t
  <
    ees-\tweak thickness #5 -\shape #'((0.125 . -0.25) (0 . -0.5) (0 . -0.5) (0 . -0.25))-~
    bes-\shape #'((1.125 . -.5) (1.125 . -.75) (-0.375 . -.75) (-0.375 . -.5))-\tweak thickness #5 -~
    ees,-\shape #'((0.125 . -0.125) (0 . 0.125) (0 . 0.125) (0 . -.125))_~
  >4.^\fermata
  \once \override TieColumn.positioning-done = ##t
  <
    ees
    bes
    ees,
  >8
  %\revert Tie.thickness
  \break

Notice the tweak at the beginning of the high Eb and at the end of the last measure's 2nd-to-last Bb. It doesn't matter what position I put the \tweak at; it appears that when using \shape, the \tweak is having no effect--OR that the \once \override TieColumn.positioning-done = ##t is causing the \tweak to not take effect; (I keep forgetting that the TieColumn.positioning-done setting is working with 2-note chords, so it's not that exactly, but maybe it's a bug in lilypond with >=3-note chords?) I'm not sure which.

UPDATE #3

OK, I added \tweak to the 2-note chords, both _before and after the \shape declarations, and both tweaks worked--so, that's in measure 14. So, I'm beginning to conclude that there's some issue or bug with lilypond with respect to >=3-note chords and setting the tie thickness when also shaping the ties. Everything works with 2-note chords, but not 3-notes. Weird!

UPDATE #4

OK, now I got somewhere. In measure 22, I commented out the middle \once \override TieColumn.positioning-done = ##t while leaving the \tweak's in place in the middle chord and once I did, the tweaks took effect. One interesting thing to note is that I did not need to remove the \once \override TieColumn.positioning-done = ##t for measure 14, and the tweaks still applied to the 2-note chords. So, there's something with 3-note chords, tweaks, and the use of \once \override TieColumn.positioning-done = ##t that's not working as expected. Now, I need to use \once \override TieColumn.positioning-done = ##t in order to perform indivdiual note tie shaping via \shape, otherwise the automatic tie shaping process doesn't allow me to modify the tie control points to get the desired bezier curve. I think I'll need to file a bug with the lilypond mailing list. For good measure, here's what my lilypond document looks like now:

\version "2.24.4"

% Set default paper size
#(set-default-paper-size "arch a")

% Set default staff size, in points
#(set-global-staff-size 18)

beamHeight = #(define-music-function
  (startHeight endHeight)
  (number? number?)
  #{
    \once \override Beam.positions = #(cons startHeight endHeight)
  #}
)

% Set a variable to define the slur thickness.
slurThickness = #1.8
tieThickness = #1.8
lengthenTie = \shape #'((-0.5 . 0.25 ) (0 . 0.35) (0 . 0.35) (0.5 . 0.25)) Tie

props = {
  \time 4/4
  \key ees \major
}

rh = \relative c {
  %% 11
  \shape #'((0 . -1.5) (15 . 1) (-15 . 2) (0 . 0.25)) PhrasingSlur
  \beamHeight #-3.25 #-3.25 d''8\( g, bes d \beamHeight #4 #4 g, bes d g,
  \beamHeight #-3 #-3 ees' g, bes f' \override Beam.positions = #'(-3.25 . -3.25) g, bes ees g,
  d' g, bes d g, bes f' g,
  \revert Beam.positions
  \beamHeight #-3 #-3 f' g, bes \lengthenTie ees~\) 4.\fermata \shape #'(((1.5 . 1.25) (1.25 . 2) (1.75 . 2) (1.5 . 0.625)) ((1 . -1) (25 . 0.75) (-25 . 0.75) (0 . 0.5))) PhrasingSlur g,8^\(
  \break

  %% 15
  \beamHeight #-4 #-4 d' g, bes d \beamHeight #4 #4 g, bes d g,
  \beamHeight #-3.25 #-3.25 ees' g, bes f' \override Beam.positions = #'(-3.5 . -3.5) g, bes ees g,
  d' g, bes d g, bes f' g,
  \beamHeight #-4 #-4 f' g, bes \lengthenTie ees~\) 4. \shape #'(((1.5 . 1.25) (1 . 1.75) (2 . 1.75) (1.5 . 1)) ((1 . -.5) (20 . 1) (-10 . 2) (0 . .75))) PhrasingSlur g,8^\(
  \break
    
  %% 19
  \beamHeight #-3.5 #-3.5 d' g, bes d \beamHeight #3.75 #3.75 g, bes d g,
  \beamHeight #-3 #-3 ees' g, bes f' \override Beam.positions = #'(-3.5 . -3.5) g, bes ees g,
  d' g, bes d g, bes f' g,
  \revert Beam.positions
  \beamHeight  #-3 #-3 f' g, bes \lengthenTie ees~\) 4.\fermata \shape #'(((0 . 0) (-.5 . 0.75) (1.25 . 0.75) (.75 . 0.125)) ((0.25 . -1) (1 . 1) (-5 . 1) (0 . 0.5))) PhrasingSlur bes8
  \break
}

% I know, I should've made the relative note different... :|
lh = \relative c {
  %% 11
  <
    g'-\shape #'((.5 . .375) (5 . -.625) (-5 . -.625) (-.5 . .375))_~
    d'
  >1
  
  \once \override TieColumn.positioning-done = ##t
  <
    g
    ees'
  >
  
  <
    g-\shape #'((.5 . .375) (5 . -.625) (-5 . -.625) (-.5 . .375))_~
    d'
  >
  
  \once \override TieColumn.positioning-done = ##t
  <
    g-\shape #'((.125 . .375) (2 . -.125) (-2 . -.125) (-.125 . .375)) _~
    ees'-\shape #'((0 . 0) (1.5 . 0.5) (-1.5 . 0.5) (-.125 . 0))^~
  >2
  \once \override TieColumn.positioning-done = ##t
  <
    g-\shape #'((0 . 0) (0 . .25) (0 . .25) (-.125 . 0))-\tweak thickness 12_~
    ees'\tweak thickness 20-\shape #'((0.125 . -.25) (0 . -.5) (0 . -.5) (0 . -.25))^~
  >4.^\fermata
  \once \override TieColumn.positioning-done = ##t
  8
  \break
  
  %% 15
  <d' g,>1
  <ees bes ees,>
  <d g,>1
  <ees bes ees,>
  \break
  
  %% 19
  <d bes g>
  <ees bes ees,>
  <d bes g>
  \once \override Score.Tie.thickness = #10
  <
    ees\tweak thickness #5 -\shape #'((0 . 0) (0 . 0.5) (0 . 0.5) (-.25 . 0))-~
    bes-\shape #'((0.5 . -.75) (0 . -.75) (0 . -.75) (-0.5 . -.75))-~
    ees,-\shape #'((0 . .375) (0 . -.125) (0 . -.125) (0 . .375))_~
  >2
  \override Score.Tie.thickness = #10
  %\once \override TieColumn.positioning-done = ##t
  <
    ees\tweak thickness 5 -\shape #'((0.125 . -0.25) (0 . -0.5) (0 . -0.5) (0 . -0.25))-~
    bes-\shape #'((1.125 . -.5) (1.125 . -.75) (-0.375 . -.75) (-0.375 . -.5))-\tweak thickness 5-~
    ees,-\shape #'((0.125 . -0.125) (0 . 0.125) (0 . 0.125) (0 . -.125))_~
  >4.^\fermata
  \once \override TieColumn.positioning-done = ##t
  <
    ees
    bes
    ees,
  >8
  %\revert Tie.thickness
  \break
}

\book {
  % Set paper/page settings for the book, inherited by all bookparts unless overridden in a bookpart
  \paper {
    #(define fonts
       (set-global-fonts
        ;#:music "emmentaler"
        ;#:brace "emmentaler"
        #:roman "FreeSerif"
        ;#:sans "Nimbus Sans, Nibus Sans L"
        ;#:typewriter "DejaVu Sans Mono"
        ; Unnecessary if the staff size is the default of 20pts
        #:factor (/ staff-height pt 20)
       ))
    %annotate-spacing = ##t
    binding-offset = 0.25 \in
    bookTitleMarkup = \markup \null
    bottom-margin = .8125 \in
    %check-consistency = ##t
    first-page-number = #4
    indent = 0 \in
    inner-margin = .8125 \in
    outer-margin = .8125 \in
    ragged-last-bottom = ##t
    two-sided = ##t
  }
  
  % I'm creating an entire book...I've removed most of what I had here...
  \bookpart {
    \paper {
      evenFooterMarkup = \markup {
        \if \on-first-page-of-part
        \fromproperty #'header:copyright
      }
    }
    \score {
      \relative c''
      \new PianoStaff \with {
        \override VerticalAxisGroup.staff-staff-spacing = #'(
                                                         (basic-distance . 10)
                                                         (minimum-distance . 10)
                                                         (padding . 1)
                                                         (stretchability . 0))
      } <<
        \new Staff = "RH" \with {
        } <<
          \set Score.currentBarNumber = #11
          \props
          \rh
        >>
        \new Staff = "LH" \with {
        } <<
          \clef bass
          \props
          \lh
        >>
      >>
      \layout {
        \override Slur.thickness = #slurThickness
        %\override Tie.thickness = #tieThickness
        \override Score.BarNumber.X-offset = #0.25
        \override Score.BarNumber.Y-offset = #4
        \override Score.NonMusicalPaperColumn.full-measure-extra-space = #-.5
        \context {
          \Score
          \override Tie.thickness = #5
        }
      }
    }
  }
}

Final lilypond document

1 Answer 1

3

Why do you think you cannot tweak inside a chord?

{
  <c'~ e' g'-\tweak thickness 10 ~>1 q
}

enter image description here

3
  • Hmm, OK, but I was unable to do this tweak along with \shape. Does order matter? I think I did \shape first, followed by -\tweak, but that did not work. Let me try reversing the order. Commented 4 hours ago
  • OK, I tried adding a \tweak, both before and after the \shape to shape the individual chord ties, but the \tweak had no effect. Its one of 2 things: 1) \tweak cannot be used with \shape; 2) there's a bug with Lilypond that affects modifying ties with chords containing 3 or more notes (because it seems to work just fine with 2-note chords). I edited my question to add my latest attempt. Commented 3 hours ago
  • OK, I made a final update (#4) to my question. It appears to be a bug in lilypond with >=3-note chords in lilypond. Commenting out the middle \once \override TieColumn.positioning-done = ##t in measure 19 allowed the tweaks to render between the first and second chords in that measure. This was not required when I applied tweaks to a 2-note chord in measure 14. So, it's something with 3-note chords and TieColumn.positioning-done. Commented 2 hours ago

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.