lilypond-user
[Top][All Lists]
Advanced

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

Re: self-alignment-X on DynamicTextSpanner?


From: Jean Abou Samra
Subject: Re: self-alignment-X on DynamicTextSpanner?
Date: Sun, 30 Jan 2022 22:31:14 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.5.0

Le 30/01/2022 à 22:20, Simon Albrecht a écrit :
Hi List,

is there an equivalent to self-alignment-X for the left bound text of a DynamicTextSpanner? See below.

Best, Simon

\version "2.23.5"

{
  1-\tweak self-alignment-X 1 \fff
  1
  % this causes alignment to just fail indiscriminately
  % (not a surprise, because I couldn’t find out how to use this property)
  %-\tweak left-bound-info.self-alignment-X 0
  % this is simply an offset against the default placement (default #'(-.75 . -.5))
  %-\tweak bound-details.left.stencil-offset #'(-3 . 0)
  % I’m not sure what this does at all
  %-\tweak bound-details.left.attach-dir -3
  \cresc
  1
  1
  1
  1\!
}


To explain the behavior with left-bound-info: this is an
internal property that gets populated with values from
bound-details and values computed automatically.  If you
override a subproperty, since callbacks aren't supported
for subproperties, you just override the calculation of
this property from bound-details and logic, and there
is nothing in it but the suboverride you have done.
Then it's not surprising that everything starts going
wrong.

To answer the question: attach-dir is the equivalent of
parent-alignment-X, controlling where on the note head
(left, center, right, intermediate values) the reference
point of the text goes.  There is no direct equivalent
for self-alignment-X, but you can do

\version "2.22.1"

{
  1-\tweak self-alignment-X 1 \fff
  1\tweak bound-details.left.text \markup \general-align #X #0 "cresc." \cresc
  1
  1
  1
  1\!
}


Best regards,
Jean




reply via email to

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