lilypond-user
[Top][All Lists]
Advanced

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

Re: Override start of figured bass continuation line


From: Lukas-Fabian Moser
Subject: Re: Override start of figured bass continuation line
Date: Fri, 15 Oct 2021 21:22:39 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.13.0

Hi Jon,

Am 15.10.21 um 21:10 schrieb Jon Arnold:
Here's an example:
\version "2.22.1"

\score {
  \new Staff {
    {
      <<
        {f''8 e'' d'' c'' b'2 |
         f''8 e'' d'' c'' b'2 }
        \new FiguredBass {
          \figuremode {  
          \bassFigureExtendersOn
          <[_!]>8 <_!> <_>8 q8 s2 |
          <[_!]>8 <_!> s16 <_> q8
          }
        }
      >>
    }
  }
}

I would like the note-spacing of the first bar combined with the continuation line of the second (or maybe something in between). I do not want the note spacing of the second measure.

Thanks!

First: With the new LilyPond 2.23.4 which should be released any day now (if I'm not mistaken), it will be possible to do <_[-]> instead of <[_-]>, i.e. put a bracket around the accidental specifically. For accidental-only figures, this gives a much closer spacing which may be closer to what you want:

\version "2.23.4"

<<
  \new Staff { s1 }
  \new FiguredBass \figuremode {
    \set implicitBassFigures = #'(99)
    \bassFigureExtendersOn
    <_[-]>2 <_->
  }
>>

Now, if you actually want to change the starting position of the bass figure extender line, I think the only "officially" supported property is BassFigureContinuation.padding, overriding which unfortunately shortens the continuation line on _both_ sides, which is not what you want. There's probably a more intelligent solution, but the first thing I could come up with was to partially re-implement the drawing routine for the continuation line with configurable left- and right-shorten-lengths:

\version "2.22.1"

shortenContinuationLine =
#(define-music-function (left-shorten right-shorten) (real? real?)
   #{
     \override BassFigureContinuation.stencil =
     #(lambda (grob)
        (let*
         ((default (ly:figured-bass-continuation::print grob))
          (thick (* (ly:output-def-lookup (ly:grob-layout grob) 'line-thickness)
                    (ly:grob-property grob 'thickness 1)))
          (default-ext (ly:stencil-extent default X)))
         (make-line-stencil
          thick
          (+ (car default-ext) left-shorten) 0
          (- (cdr default-ext) right-shorten) 0)))
   #})


\score {
  \new Staff {
    {
      <<
        {
          f''8 e'' d'' c'' b'2 |
          f''8 e'' d'' c'' b'2
        }
        \new FiguredBass {
          \figuremode {
            \bassFigureExtendersOn
            <[_!]>8 \once \shortenContinuationLine 1 0 <_!> <_>8 q8 s2 |
            <[_!]>8 <_!> s16 <_> q8
          }
        }
      >>
    }
  }
}

Lukas



reply via email to

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