[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: Questions on beaming and barring
From: |
Nick Payne |
Subject: |
RE: Questions on beaming and barring |
Date: |
Mon, 22 Sep 2008 16:51:26 +1000 |
After a bit of fiddling, I arrived at the following which fixes my two problems
below:
barre = #(define-music-function (parser location padding text shorten adjBreak)
(number? string? pair? number?) #{
\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)
% override to remove bracket edge at line breaks
\once \override TextSpanner #'bound-details #'right-broken #'text = ##f
% adjust LH end of line when it wraps to following stave
\once \override TextSpanner #'bound-details #'left-broken #'X =
#$adjBreak
#})
I thing I haven't managed to fix is that the barring indication looks better if
both the right- and left-hand ends are extended slightly so that they don't
both start and finish centred on a note, like so:
\barre #0.0 "CIV" #'(-0.5 . -1) #10
But this means that a barre that wraps to the following stave now extends
slightly beyond the RH end of the beginning stave. I couldn't find the command
to fix that.
Nick
-----Original Message-----
From: address@hidden [mailto:address@hidden On Behalf Of Nick Payne
Sent: Saturday, 20 September 2008 12:16
To: 'Mailinglist lilypond-user'
Subject: RE: Questions on beaming and barring
Thanks again. One final (I hope) question. When the duration of the barre
causes it to start on one stave and finish on another, that presents two
problems in the output:
1. On the stave where the barre continues, it starts slightly to the left of
the very beginning of the stave rather than above the first note on the stave.
2. The bar number at the start of the stave gets moved from its normal position
to above the line for the barre.
Is there any way around this short of generating the output, seeing whether any
barres are split across staves, and then manually stopping and starting them to
avoid this behaviour.
Nick
-----Original Message-----
From: Neil Puttock [mailto:address@hidden Hi Nick,
2008/9/19 Nick Payne <address@hidden>:
> 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.
Since the overrides in \barre use \once, it must be placed directly before the
note where the text span starts, otherwise all the settings are forgotten:
\barre #0.0 "CIV" #'(0 . 0) <d-4>->\startTextSpan
No virus found in this incoming message.
Checked by AVG - http://www.avg.com
Version: 8.0.169 / Virus Database: 270.7.0/1681 - Release Date: 19/09/2008 15:54
- Re: v2.11.58-2 guile17 error ppc, (continued)
- Questions on beaming and barring, Nick Payne, 2008/09/17
- Re: Questions on beaming and barring, Kieren MacMillan, 2008/09/17
- Re: Questions on beaming and barring, Neil Puttock, 2008/09/17
- RE: Questions on beaming and barring, Nick Payne, 2008/09/19
- RE: Questions on beaming and barring, Nick Payne, 2008/09/19
- Message not available
- Re: Questions on beaming and barring, Neil Puttock, 2008/09/19
- RE: Questions on beaming and barring, Nick Payne, 2008/09/19
- RE: Questions on beaming and barring,
Nick Payne <=
- Message not available
- Re: Questions on beaming and barring, Neil Puttock, 2008/09/22
Re: v2.11.58-2 guile17 error ppc, Stan Sanderson, 2008/09/15