lilypond-user
[Top][All Lists]
Advanced

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

Re: Figured Bass Questions.....


From: Nicolas Sceaux
Subject: Re: Figured Bass Questions.....
Date: Mon, 18 Oct 2004 21:30:17 +0200
User-agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3 (gnu/linux)

"Trent J" <address@hidden> writes:

> Proper alignment of figures eg.
>
>     7
>   #3
>     2
>
> It’s most important that the sharp on the three be on the left of the
> number and not on the right so as not to confuse a sharpened 3rd
> resolution after the current figures.

You can re-define this kind of behaviour, see `format-bass-figure'
scm/bass-figure.scm:

\version "2.3.22"

#(define-public (format-bass-figure-with-acc-before figures context grob)
  ;; TODO: support slashed numerals here.
  (define (fig-to-markup fig-music)
    (let*
        ((align-accs (eq? #t (ly:context-property context 
'alignBassFigureAccidentals)))
         (fig  (ly:music-property fig-music 'figure))
         (acc  (ly:music-property fig-music 'alteration))
         (acc-markup #f)
         (fig-markup
          (if (markup? fig)
              fig
              (if align-accs (make-simple-markup " ")
                  (if (not (eq? acc '()))
                      (make-simple-markup "")
                      (make-strut-markup))))))
      (if (number? acc)
          (make-line-markup (list (alteration->text-accidental-markup acc)
                                  fig-markup))
          fig-markup)))

  (define (filter-brackets i figs acc)
    (cond
     ((null? figs) acc)
     (else
      (filter-brackets (1+ i) (cdr figs)
                       (append
                        (if  (eq? (ly:music-property (car figs) 'bracket-start) 
#t)
                             (list i)
                             '())
                        (if  (eq? (ly:music-property (car figs) 'bracket-stop) 
#t)
                             (list i)
                             '())
                        acc)))))

  (set! (ly:grob-property grob 'text)
        (make-bracketed-y-column-markup
         (sort (filter-brackets 0 figures '()) <)
         (map fig-to-markup figures))))

\score {
    <<
        \new Staff {
            \clef bass
            c d e f
        }
        \context FiguredBass \figuremode {
            <3+> <4-> <5 7!> <2- 4+>
        }
    >>
     \layout { 
         raggedright = ##t 
         \context {
             \Score
             bassFigureFormatFunction = #format-bass-figure-with-acc-before
         }
     }
}
        
nicolas



reply via email to

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