lilypond-user
[Top][All Lists]
Advanced

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

Re: hairpin length


From: David Nalesnik
Subject: Re: hairpin length
Date: Sat, 18 Jun 2016 10:27:37 -0500

Hi,

On Mon, Jun 13, 2016 at 12:39 PM, tisimst <address@hidden> wrote:
Josh,

On 6/13/16, Joshua Nichols [via Lilypond]
<[hidden email]> wrote:
>
>
> ​> ​
> The only way I know is to use a dynamics context and vary the length of the
> spacer rests the occur between the start and end of the hairpin.
>
> ​Thanks.​

Without direct access to the right side's anchor (BTW, you can change
the left side's position with X-offset), you can always override the
'stencil by scaling/translating the original.

There is the property 'bound-padding, but unfortunately, it affects both left and right of the hairpin equally.  It seems to me that 'bound-padding ought to be a pair, so you could alter either side independently.

A while back I translated ly:hairpin::print into Scheme (rather by blunt force): http://www.mail-archive.com/lilypond-user%40gnu.org/msg104129.html.  It's a relatively simple matter to adapt that code to handle a padding pair.  Note: I've made a new property here: bound-padding-pair.  Bound-padding isn't operational anymore with this code.

(I would propose that bound-padding be redefined as a pair in the code base.  Broken-bound-padding, too.  The latter is not replaced with a broken-bound-padding-pair in this code experiment, but that should be easily done.)

Note: 0.5 in the examples is the default bound-padding value.

The OP doesn't specify the LP version, but the attached code depends on the version.  ly:line-interface::line is a relatively new development which allows for zigzags, dotted lines, etc.  Pre 2.19.something you will need to do a little code replacement (comment 206 instead of 205, 212 instead of 211) at the cost of line styles.

Hope this helps.

David

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


Attachment: hairpin-endpoints.ly
Description: Text Data


reply via email to

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