lilypond-user
[Top][All Lists]
Advanced

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

Re: tablature.ly - please test and comment


From: Marc Hohl
Subject: Re: tablature.ly - please test and comment
Date: Sat, 23 May 2009 22:26:34 +0200
User-agent: Thunderbird 2.0.0.21 (X11/20090318)

Carl D. Sorensen schrieb:

On 5/23/09 1:09 AM, "Marc Hohl" <address@hidden> wrote:

Neil Puttock schrieb:
2009/5/22 Marc Hohl <address@hidden>:
% for ties in tablature, fret numbers that are tied to should be invisible
% or -after a line break - put in parentheses. Since this is not (easily?)
% possible in lilypond, we offer three commands:
#(define (tie::tab-mark-tied-fret-numbers grob)
        (let* ((original (ly:grob-original grob))
               (tied-fret-nr (ly:spanner-bound grob RIGHT))
               (siblings (if (ly:grob? original)
                         (ly:spanner-broken-into original) '() )))

              (if (and (>= (length siblings) 2)
                       (eq? (car (last-pair siblings)) grob))
                  ;; tie is split -> change fret number color to red and
print a message
                  (begin (display "\nSplit tie appears in tablature.")
                         (display "\nAffected fret number is marked red.\n")
                         (ly:grob-set-property! tied-fret-nr 'color red))
                  ;; tie is not split -> make fret number invisible
Since none of this works properly (I suspect it will require more than
Scheme hacking to get everything working), I don't think it's suitable
for inclusion.

Hm, I guess you're right - but as a compromise, how about letting the
\clearTabTieBreaks as a default, because it is working most of the time, and
when someone needs a more sophisticated tab staff, he has to write a
separate
score for the tablature?

I would propose to rename it as

#(define (tie::handle-tied-fret-numbers grob)
        (let* ((tied-fret-nr (ly:spanner-bound grob RIGHT)))
              (ly:grob-set-property! tied-fret-nr 'transparent #t)))

make it default by

\override Tie #'after-line-breaking = #tie::handle-tied-fret-numbers

and use this as a kind of starting point for future improvements?



Marc,

Have you explored the possibility of calling parentheses-item::print on your
tied fret number?

I don't know if it will work, but it appears it may be possible.  It may
need to be defined public in order to call it.

It's found in scm/output-lib.scm.
Carl, thank you for your proposal. I made it public, but I came up with an error
message. Apparently

(ly:grob-object tied-fret-nr 'elements)

returns an empty list,so ly:grob-common-refpoint-of-array
complains about an empty second argument.
I didn't understand completely how parentheses-item::print
works, so I can't figure out if there is a workaround to use
this or a similar constructed function.


Marc
I haven't tried it, but it looks to me like it takes a grob and adds
parentheses around it.

Carl








reply via email to

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