|
From: | Nick Payne |
Subject: | RE: Questions on beaming and barring |
Date: | Fri, 19 Sep 2008 19:16:54 +1000 |
Neil Thanks. I used your function definition in a short test and it worked just as I wanted. Strangely, however, when I used the function identically in the piece I'm engraving, I just get a dashed line where I should see the barring indication, and I can't see why it works with one and not the other. Foo.ly and foo.png - test and output as expected. Barrios.ly and barrios.png - shows only a dashed line over bar 7 where the barre indication should be. Can anyone shed some light on this? Nick -----Original Message----- From: Neil Puttock [mailto:address@hidden Sent: Thursday, 18 September 2008 06:12 To: Kieren MacMillan Cc: Nick Payne; Mailinglist lilypond-user Subject: Re: Questions on beaming and barring 2008/9/17 Kieren MacMillan <address@hidden>: > Usually, I would suggest running convert-ly, but that appears not to work on > this file for some reason (which I'm too busy to figure out right now) — > instead, I manually updated the following function definition for you: Some of the changes to line spanners in 2.11 were too involved for automatic conversion using convert-ly. > barre = #(define-music-function (parser location padding text shorten) > (number? string? pair?) > #{ > \once \override TextSpanner #'dash-fraction = #1 > \once \override TextSpanner #'font-shape = #'upright > \once \override TextSpanner #'edge-height = #'(0 . 1) > \once \override TextSpanner #'padding = #$padding > \once \override TextSpanner #'bound-details #'left #'text = #$text > \once \override TextSpanner #'shorten-pair = $shorten > #}) Edge-height and shorten-pair don't work with spanners any more. To add bracket edges you have to draw lines in 'bound-details using markup instead. barre = #(define-music-function (parser location padding text shorten) (number? string? pair?) #{ \once \override TextSpanner #'style = #'line \once \override TextSpanner #'font-shape = #'upright %draw a bracket edge on RHS \once \override TextSpanner #'bound-details #'right #'text = \markup { \draw-line #'(0 . -1) } \once \override TextSpanner #'padding = $padding \once \override TextSpanner #'bound-details #'left #'text = $text % set alignment of line with reference to left text \once \override TextSpanner #'bound-details #'left #'stencil-align-dir-y = #CENTER \once \override TextSpanner #'bound-details #'left #'padding = #(car $shorten) \once \override TextSpanner #'bound-details #'right #'padding = #(cdr $shorten) % optional overrides to remove text and bracket edge at line breaks \once \override TextSpanner #'bound-details #'left-broken #'text = ##f \once \override TextSpanner #'bound-details #'right-broken #'text = ##f #}) Regards, Neil
barrios.ly
Description: Text Data
foo.ly
Description: Text Data
barrios.png
Description: PNG image
foo.png
Description: PNG image
[Prev in Thread] | Current Thread | [Next in Thread] |