Extending a TrillSpanner (2)

This snippet shows how to get a trill span over the last note of a measure.

See also Extending a TrillSpanner.

\version "2.24"

% LSR https://lists.gnu.org/archive/html/lilypond-user/2014-11/msg00292.html

\relative c' {
  \time 4/4
  \clef treble
  \key c \major
  \override TrillSpanner.to-barline = ##t
  c2\startTrillSpan d4 e4 |
  f1
  \stopTrillSpan  |
  \revert TrillSpanner.to-barline
}