lilypond-user
[Top][All Lists]

Re: Horizontal brackets

 From: Siska Ádám Subject: Re: Horizontal brackets Date: Wed, 25 Jul 2007 20:57:10 +0200 User-agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X; en-GB; rv:1.8.0.10) Gecko/20070221 Thunderbird/1.5.0.10 Mnenhy/0.7.5.0

```Hello,

```
actually, that was the first thing I tried, but it seems to me that the draw-line command doesn't exist in 2.10.25 (sorry for the prior misspelling, I'm using 2.10.25, not 2.10.10 -- although this doesn't really make a difference, I suppose). But, after tweaking a few hours with the code I got for the Bartok-pizz, I succeeded! :-)
```
That was the code I created:

%%%%%%%%%%%%%%

simpleBracket = {
\override TextSpanner #'edge-text = #(cons
(markup #:stencil
(ly:make-stencil
(list 'draw-line 0 0 0 0 1)
'(0 . 0) '(1 . 1)
)
)
)
(markup #:stencil
(ly:make-stencil
(list 'draw-line 0 0 0 0 1)
'(0 . 0) '(1 . 1)
)
)
)
)
\textSpannerUp
\once \override TextSpanner #'dash-fraction = ##f
}

[...]

<< \new Voice {
\hideNotes
\simpleBracket
\stemDown g2.\startTextSpan \glissando e''4.\stopTextSpan
\unHideNotes
} {
\simpleBracket
<g dis'>2.\startTextSpan \glissando <e'' his'>4.\stopTextSpan
} >>

%%%%%%%%%%%%%%

```
(The two voices are needed because I had to put this over a chord glissando, and also because I needed two brackets.)
```
```
Well, doesn't look very nice (as the distance between the two brackets is enormous, and also because one bracket is supposed to be nested into the other), but works!!!!!! :-) :-) :-)
```
Thank you very much!

________________
Siska Ádám
+36 (70) 207-63-85

Trevor Bača wrote:
```
```Hi Adam,

There's a way to turn LilyPond markup commands like \draw-line into
Scheme expressions; the method is documented in 12.4.1 "Markup
construction in Scheme" in the 2.11 version of the manual; and I think
the concept is exactly the same in 2.10.

So maybe this will work ...

\once \override TextSpanner #'edge-text = #(cons
(markup #:draw-line '(0 . -1))
(markup #:draw-line '(0 . -1)))

... though, again, I don't have a 2.10 install loaded to test with.

Does this get it?

On 7/25/07, Siska Ádám <address@hidden> wrote:
```
```Hello,

the problem is that I can't figure out how to set up the #'edge-text
property to draw the lines (the markup doesn't accept the draw-line
command, and it's not included in the list of valid markup commands for
2.10.10). Now I've spent at about an hour with adopting the code that I
got a few days ago for Bartok-pizz to make it able to draw a line (as
the Bartok-pizz sign has a line included), with the following code:

\override TextSpanner #'edge-text = #(cons (markup #:stencil
(ly:make-stencil
(list 'draw-line x1 x2 x3 x4 x5)
'(x6 . x7) '(x8 . x9)
)
)
)  (markup #:stencil
(ly:make-stencil
(list 'draw-line x10 x11 x12 x13 x14)
'(x15 . x16) '(x17 . x18)
)
)
) )

where the values x1-x18 are number parameters. The problem is, that I'm
googleing and searching every documentation I've found, but I can't
guess the meaning of these 18 parameters (in fact, just 9, as the other
9 are supposed to mean the same thing).

Could anybody explain for me what these numbers mean, and how to force
```
them to draw a simple vertical line which fits to the textspanner's line?
```
Thank you,

P.S. Sorry for the many questions I'm posting, but I started using
Lilypond a week ago or so, and I couldn't find up to now an acceptable
reference manual for it (so, a collection of documents that contain
every possible command with their every possible parameters and values,
like for example the javadocs for Java). Does exist this kind of
documentation somewhere?

________________
Siska Ádám
+36 (70) 207-63-85

Trevor Bača wrote:
> On 7/25/07, Siska Ádám <address@hidden> wrote:
>> Hello,
>>
>>
>>
>> thank you. Actually I'm using the stable version (2.10.10 as far as I
>> know), and I don't really want to change it to a version under
```
>> development unless I'd be really forced to do that. Don't you have some
```>> idea that works also with the stable version? (I tried both, but they
>> didn't work in 2.10.10)
>> Of course, if there's no other solution, I'll upgrade my Lily, as my
>> deadline for this score is this weekend...
>>
>> Thank you again,
>
>
> If I recall correctly, the syntax for getting vertical nibs at the
> edge of text spanners the old way was to override the edge-text
> attribute of the grob. Something like this ...
>
>   \override TextSpanner #'edge-text = #'(left . right)
>
> ... where you have to replace "left" and "right" with the command to
> draw-line shown in the previous example.
>
> I'm running the 2.11.x series only; can you find reference to
> edge-text in the 2.10 manual?
>
> Trevor.
>
>

_______________________________________________
lilypond-user mailing list
http://lists.gnu.org/mailman/listinfo/lilypond-user

```
```

```
```

```