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: David Nalesnik
Subject: Re: How to create a thick horizontal line (as its own staff)?
Date: Wed, 13 Jul 2016 17:01:18 -0500

Hi,

On Wed, Jul 13, 2016 at 1:58 AM, Mojca Miklavec
<address@hidden> wrote:
> Hi,
>
> Following the example to create scores for diatonic accordion as
> posted recently by David:
>
> http://lilypond.org/doc/v2.18/Documentation/snippets/templates#templates-score-for-diatonic-accordion
>
> I would like to get a better understanding of how
>     \staffTabLine
> is created and how it could be improved.

Sorry, not being an accordion player, I won't be of much help here.

>
>
> 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 :) )

The code is based on the regression test 'scheme-text-spanner':
http://lilypond.org/doc/v2.19/input/regression/d0/lily-abd04ca7.ly

The horizontal positioning is automatic.  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.

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.

Best,
David N

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

Attachment: accordion.ly
Description: Text Data


reply via email to

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