[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: How to enlarge the size of accidentals in a figured bass ?
From: |
David Nalesnik |
Subject: |
Re: How to enlarge the size of accidentals in a figured bass ? |
Date: |
Tue, 18 Apr 2017 10:04:35 -0500 |
On Tue, Apr 18, 2017 at 9:25 AM, Richard Shann <address@hidden> wrote:
> On Tue, 2017-04-18 at 14:47 +0100, Richard Shann wrote:
>> ;; 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)))
>
> This part of the code is commented out like this in
> translation-functions.scm, but I tried it out, and it improves the
> centering over whole-notes but makes it worse over other notes.
>
> I see that (ly:event-property event 'duration) gives the duration of
> the note that the bass figure is on as:
>
> #<Duration 1 >
>
> for a whole note.
>
> so if I could test that I could use that code for this case (and the 1.
> case). But here my understanding of Guile's display syntax runs out ...
> what sort of a type is ly:event-property returning, and how do I test
> for particular values?
>
It's a Duration object.
Why not:
(if (and (markup? fig-markup)
(eqv? 0 (ly:duration-log (ly:event-property event 'duration))))
(set!
fig-markup (markup #:translate (cons 1.0 0)
#:center-align fig-markup)))
BTW, your snippet above won't compile because of the following:
(plus-markup (if (eq? #t (ly:event-property event 'augmented))
(markup #:number \"+\")
#f))
Why are you trying to escape the quotation marks here?
Hope this helps--
David