|
From: | Nick Payne |
Subject: | Re: unicode fractions for barre indications |
Date: | Mon, 24 Dec 2012 14:48:20 +1100 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/17.0 Thunderbird/17.0 |
On 24/12/12 10:42, David Kastrup wrote:
Yes, that does fix the problem with the spanner terminating at the wrong place. However, there is still the problem with nesting of braces where one uses \barreX { <music> } to indicate a barre, but the barre needs to start before some other element that uses braces (tuplet, repeat, etc) and also needs to stop before the closing brace of the other element.Nick Payne <address@hidden> writes:On 24/12/12 08:27, Federico Bruni wrote:Il 23/12/2012 21:06, Nick Payne ha scritto:I believe only 1/6 and 5/6 exist as Unicode characters. In mathematical notation one would use 1/3, 2/3, and 1/2, so 2/6, 4/6, and 3/6 are not provided. I notate a barre with a partial indicator like so:Thanks for the reminder... I remember you had already posted it, lazy me! It's quite nice, even if you always have to specify the number of strings even for the default barré (6 strings). Can it be adapted to this function? http://lists.gnu.org/archive/html/lilypond-user/2012-12/msg00825.html I see that $strg must be replaced by $fretnum, but I don't know how to handle ly:music? and $music.Yes, you can do it like so: #(define (text-spanner-start-stop mus) (let ((elts (ly:music-property mus 'elements))) (make-music 'SequentialMusic 'elements (append (list (make-music 'TextSpanEvent 'span-direction -1)) (reverse (cdr (reverse elts))) (list (make-music 'TextSpanEvent 'span-direction 1)) (list (last elts))))))How about #(define (text-spanner-start-stop mus) (let* ((l (extract-typed-music mus '(event-chord rhythmic-event))) (b (first l)) (e (last l))) (set! (ly:music-property e 'articulations) (cons (make-music 'TextSpanEvent 'span-direction STOP) (ly:music-property e 'articulations))) (set! (ly:music-property b 'articulations) (cons (make-music 'TextSpanEvent 'span-direction START) (ly:music-property b 'articulations))) mus)) ? This should have a better hit/miss ratio.
[Prev in Thread] | Current Thread | [Next in Thread] |