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: Carl D. Sorensen
Subject: Re: tablature.ly - please test and comment
Date: Sat, 23 May 2009 08:17:18 -0600



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.

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]