lilypond-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to create a thick horizontal line (as its own staff)?


From: Mojca Miklavec
Subject: Re: How to create a thick horizontal line (as its own staff)?
Date: Thu, 14 Jul 2016 11:41:26 +0200

Dear David,

On 14 July 2016 at 00:01, David Nalesnik wrote:
> On Wed, Jul 13, 2016 at 1:58 AM, Mojca Miklavec wrote:
>>
>> I would like to have:
>>
>> - a thick horizontal line for "push" and nothing at all on "pull", no
>> vertical lines
>>
>> - it should start and stop at the vertical bar (if the push/pull stops
>> at '|', otherwise "cover the appropriate durations" below the pitches)
>>
>> - probably something like \startPush to start the thick line, then
>> perhaps specify the duration with something like "s1 s1", followed by
>> \startPull that would disable
>> (It would be soooooo much better if \startPush and \startPull could be
>> placed in the first staff with melody, between the pitches, so that
>> one wouldn't have to think twice about the proper duration of that
>> thick line.)
>>
>> - the vertical position should be somewhere below the lyrics
>
> This is a situation which calls for a new Grob.  Unfortunately,
> there's no user interface for doing this, but it is possible to mess
> with internals and create the following file.  (Which I don't
> guarantee :) )

Wow! That's a piece of code!

> The horizontal positioning is automatic.

Wonderful!

> Not so vertical positioning.
> Putting the line midway between the staves automatically is a
> difficult problem, and I don't know enough to solve it.  You can
> override Staff.AccordionPushSpanner.staff-padding to move the line
> vertically.

Based on your comment
    % Change vertical position of spanner.  Sorry, not automatic.

I just wanted to add that my intention wasn't to put the horizontal
line into "arithmetic centre" of the whitespace between the staves.
Actually it makes a lot more sense to keep the height of the line
pretty much constant within a single line. So it looks better to me
when I *remove*
    \override Staff.AccordionPushSpanner.staff-padding = 2
from the middle of the first line.

Bottomline: what you thought to be a problem doesn't seem to be a
problem at all.

> As far as position relative to lyrics, it's helpful to know that you
> can override the direction property of the spanner.
>
> This is rough, but hopefully it will get you started.

Wonderful. I will need some time to fully digest the code.

One minor "problems" I noticed:

In the basses I can use
    f1-4^\markup {"f"}
and the finger position is OK, but \markup{"f"} is placed above the
horizontal line.

This is not critical (yet?).


A few more questions (before I dive into the code):

- Is there any rule or a guideline to decide whether to put repeats
(\repeat volta 2 ...) in the upper or in the bottom stave?

- The way you implemented these lines, is there a way to access the
state (pushing or pulling) in the upper stave? (I would eventually
want to do more complex things with it, but for simplicity let's say
that I would want all the pitches in the upper stave to be red while
pushing, or if I would additionally want to add \upbow or \downbow
symbols in the upper line.) I'm not asking for the code to do the
colouring just yet, I just want to know whether lilypond has access to
the variable that would let me do it at some point.

Many many thanks,
    Mojca



reply via email to

[Prev in Thread] Current Thread [Next in Thread]