|
From: | Ziad Gholam |
Subject: | Re: How to enlarge the size of accidentals in a figured bass ? |
Date: | Thu, 13 Apr 2017 22:35:40 +0200 |
Hi,2017-04-13 19:52 GMT+02:00 Ziad Gholam <address@hidden>:
> Hello,
>
>
>
> Could someone help with advice about :
>
> How to enlarge the size of accidentals in a figured bass ?
> ... Either leaving the size of the numbers unchanged or not ...
>
> (version used = 2.18.2)
>
>
> Thanks you &
> R
> egards,
>
>
> Ziad R. GHOLAM
figured bass is fomated by the context-property `figuredBassFormatter'
which is set per default to the procedure `format-bass-figure'.
There is no single property to affect fontsize of accidentals only, afaik.
Though you could c/p the definition from translation-functions.scm
into your ly-file, change it to fit your needs and let LilyPond use
it.
Below I did exactly that, giving accidentals a far too huge fontsize
(just to make it obvious).
#(define-public (format-bass-figures figure event context)
(let* ((fig (ly:event-property event 'figure))
(fig-markup (if (number? figure)
;; this is not very elegant, but center-aligning
;; all digits is problematic with other markups,
;; and shows problems in the (lack of) overshoot
;; of feta-alphabet glyphs.
((if (<= 10 figure)
(lambda (y) (make-translate-scaled-markup
(cons -0.7 0) y))
identity)
(cond
((eq? #t (ly:event-property event 'diminished))
(markup #:slashed-digit figure))
((eq? #t (ly:event-property event 'augmented-slash))
(markup #:backslashed-digit figure))
(else (markup #:number (number->string figure 10)))))
#f))
(alt (ly:event-property event 'alteration))
(alt-markup
(if (number? alt)
(markup
#:general-align Y DOWN #:fontsize
;; !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!
(if (not (= alt DOUBLE-SHARP))
;-2 2 :; is the default
4 4 ;; changed
)
;; !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!
(alteration->text-accidental-markup alt))
#f))
(plus-markup (if (eq? #t (ly:event-property event 'augmented))
(markup #:number "+")
#f))
(alt-dir (ly:context-property context 'figuredBassAlterationDirection ))
(plus-dir (ly:context-property context 'figuredBassPlusDirection)))
(if (and (not fig-markup) alt-markup)
(begin
(set! fig-markup (markup #:left-align #:pad-around 0.3 alt-markup))
(set! alt-markup #f)))
;; hmm, how to get figures centered between note, and
;; lone accidentals too?
;; (if (markup? fig-markup)
;; (set!
;; fig-markup (markup #:translate (cons 1.0 0)
;; #:center-align fig-markup)))
(if alt-markup
(set! fig-markup
(markup #:put-adjacent
X (if (number? alt-dir)
alt-dir
LEFT)
fig-markup
#:pad-x 0.2 alt-markup)))
(if plus-markup
(set! fig-markup
(if fig-markup
(markup #:put-adjacent
X (if (number? plus-dir)
plus-dir
LEFT)
fig-markup
#:pad-x 0.2 plus-markup)
plus-markup)))
(if (markup? fig-markup)
(markup #:fontsize -2 fig-markup)
empty-markup)))
\layout {
\context {
\Score
figuredBassFormatter = #format-bass-figures
}
}
\figures {
<7! 6+ 4-> <5++> <3--> < _+ > < 7 _!>
}
HTH,
Harm
[Prev in Thread] | Current Thread | [Next in Thread] |