[prev in list] [next in list] [prev in thread] [next in thread] 

List:       lilypond-user
Subject:    Re: Best way to put a system brace between 2 staves
From:       "mike () apollinemike ! com" <mike () apollinemike ! com>
Date:       2012-01-29 23:10:51
Message-ID: 4C0DB6BF-7D30-463C-B46F-0A686686A032 () apollinemike ! com
[Download RAW message or body]

On Jan 29, 2012, at 11:48 PM, Thomas Morley wrote:

> 
> 
> 2012/1/29 Joey Di Nardo <username652719@gmail.com>
> Looking to do something like this:
> 
> <Screen Shot 2012-01-29 at 5.34.51 PM.png>
> 
> If anyone knows the best way, I'd appreciate the insight.
> 
> Thank you,
> Joey
> 
> ???
> 
> There is no code, image or sth else.
> 
> Harm

I see an attachment w/ a system brace between two staves.
It's not easy.  I can give you pointers for what to fiddle with but as for the \
fiddling, I won't be able to be of much help.

You can create a TextScript using a glyph from the feta-braces font combined with a \
boxed markup.  Set the Y-extent property of the text script to a pair representing \
the height of this stencil (you can get this height directly from the stencil).

Then, for the stencil, use the actual stencil but translate it by a certain amount.  \
The amount is what's difficult to glean.  You'll have to get the VerticalAxisGroup of \
the staff above the staff with the TextScript.  You can (probably) find the distance \
between the text script and the vertical axis group above by finding the height of \
the lower of the two skylines in the vertical-skyline pair via ly:skyline::get-height \
at the script's X coordinate.  Something like:

(ly:skyline-height (ly:skyline-pair::skyline (ly:grob-property grob \
'vertical-skylines) DOWN) x-pos)

Where grob is the VerticalAxisGroup of the above staff and x-pos is the x position of \
the text script. To get said VerticalAxisGroup, get the root vertical alignment of \
the score by find the Y parent of the grob until you hit a grob w/ no more Y-parents. \
This is the vertical alignment.  Then, get the 'elements object.  The \
VerticalAxisGroup you want will be in this list (likey before the VerticalAxisGroup \
to which the TextScript belongs).

If this reads like Sanskrit, it is because I am tired and unfortunately don't have \
time to create a code example.  I may be able to in the next couple days.

Cheers,
MS


[Attachment #3 (unknown)]

<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; \
-webkit-line-break: after-white-space; "><div><div>On Jan 29, 2012, at 11:48 PM, \
Thomas Morley wrote:</div><br class="Apple-interchange-newline"><blockquote \
type="cite"><br><br><div class="gmail_quote">2012/1/29 Joey Di Nardo <span \
dir="ltr">&lt;<a href="mailto:username652719@gmail.com">username652719@gmail.com</a>&gt;</span><br><blockquote \
class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc \
solid;padding-left:1ex"> <div style="word-wrap:break-word">Looking to do something \
like this:<div><br></div><div><span>&lt;Screen Shot 2012-01-29 at 5.34.51 \
PM.png&gt;</span></div><div><br></div><div>If anyone knows the best way, I'd \
appreciate the insight.</div> <div><br></div><div>Thank \
you,</div><div>Joey</div></div></blockquote><div><br>???<br>&nbsp;</div></div>There \
is no code, image or sth else.<br><br>Harm<br></blockquote><br></div><div>I see an \
attachment w/ a system brace between two staves.</div><div>It's not easy. &nbsp;I can \
give you pointers for what to fiddle with but as for the fiddling, I won't be able to \
be of much help.</div><div><br></div><div>You can create a TextScript using a glyph \
from the feta-braces font combined with a boxed markup. &nbsp;Set the Y-extent \
property of the text script to a pair representing the height of this stencil (you \
can get this height directly from the stencil).</div><div><br></div><div>Then, for \
the stencil, use the actual stencil but translate it by a certain amount. &nbsp;The \
amount is what's difficult to glean. &nbsp;You'll have to get the VerticalAxisGroup \
of the staff above the staff with the TextScript. &nbsp;You can (probably) find the \
distance between the text script and the vertical axis group above by finding the \
height of the lower of the two skylines in the vertical-skyline pair via \
ly:skyline::get-height at the script's X coordinate. &nbsp;Something \
like:</div><div><br></div><div>(ly:skyline-height (ly:skyline-pair::skyline \
(ly:grob-property grob 'vertical-skylines) DOWN) \
x-pos)</div><div><br></div><div>Where grob is the VerticalAxisGroup of the above \
staff and x-pos is the x position of the text script.</div><div>To get said \
VerticalAxisGroup, get the root vertical alignment of the score by find the Y parent \
of the grob until you hit a grob w/ no more Y-parents. &nbsp;This is the vertical \
alignment. &nbsp;Then, get the 'elements object. &nbsp;The VerticalAxisGroup you want \
will be in this list (likey before the VerticalAxisGroup to which the TextScript \
belongs).</div><div><br></div><div>If this reads like Sanskrit, it is because I am \
tired and unfortunately don't have time to create a code example. &nbsp;I may be able \
to in the next couple \
days.</div><div><br></div><div>Cheers,</div><div>MS</div></body></html>



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic