lilypond-user
[Top][All Lists]
Advanced

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

Re: tablature.ly


From: Neil Puttock
Subject: Re: tablature.ly
Date: Tue, 28 Apr 2009 23:07:48 +0100

2009/4/27 Marc Hohl <address@hidden>:

> No, I didn't get this mail. I played around with your suggestions and the
> improvements given by Neil and have now:
>
> #(define-markup-command (customTabClef layout props tuning) (pair?)
>   (define (square x) (* x x))
>   (let* ((num-strings (min (max (length tuning) 4) 7))
>          (font-size (- (* num-strings 1.5) 7))
>          (base-skip (square (+ (* num-strings 0.2) 0.4))))
>      (interpret-markup layout props
>        (markup #:vcenter #:bold
>                ;;#:override #'(font-family . sans)
>                #:fontsize font-size
>                #:override #'(cons 'baseline-skip base-skip)
>                #:center-column ("T" "A" "B")))))
>
> The raise-value calculation has gone, because I use #:vcenter, but I had to
> comment
> out the font-family line, because I got an error saying "unbound variable:
> font-family"
> if it is in the source. What's going wrong here?

Too many hashes:

#:override '(font-family . sans) or #:override (cons 'font-family 'sans)

#:override (cons 'baseline-skip base-skip) or #:override
`(baseline-skip . ,base-skip)


> With the definition above, I inserted #(set-global-staff-size <num>)
> and tried values from 10 to 100, and it worked as expected.
> So the quadratic equation seems to be the right way.

That works because changing the global staff size doesn't alter the
default staff-space. See what happens when you add the following
override:

\override TabStaff.StaffSymbol #'staff-space = #1.2

Regards,
Neil




reply via email to

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