lilypond-user
[Top][All Lists]
Advanced

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

Re: "loco" after ottava


From: Thomas Morley
Subject: Re: "loco" after ottava
Date: Sat, 3 Dec 2022 13:26:13 +0100

Am Fr., 2. Dez. 2022 um 02:28 Uhr schrieb Joel C. Salomon
<joelcsalomon@gmail.com>:
>
> Piece of music I have in front of me puts the text "loco." above the
> first note after an ottava.  See also the attached example, from
> <https://dictionary.onmusic.org/terms/17-8va>.
>
> The code below does not work, which makes me suspect I do not in fact
> understand the spanner interface. (I tried to adapt the example from
> crescendo spanners.)  The less-elegant solution of "just use
> `\textMark` on the next note" works fine, but it feels like I'm
> missing something obvious.
>
> --Joel
>
> \version "2.23.80"
>
> {
>   r4
>   \override Staff.OttavaBracket.bound-details.right.text = "loco."
>   \ottava 1
>   c''' d''' e''' |
>   \ottava 0
>   r \textMark \markup\italic "kluge" e' d' c'
> }

Hi Joel,

as Jean and Valentin already said, use simple TextScript to indicate
"loco", although it is indeed superfluous.
To be complete, it is possible to make your override work.
Switch OttavaBracket.stencil to ly:line-spanner::print. NR has a
snippet for the method.
Adapted to the case at hand:

\version "2.23.0"

ottavaBracketLineSpanner = {
  \override Staff.OttavaBracket.stencil = #ly:line-spanner::print
  \override Staff.OttavaBracket.bound-details =
    #`((left . ((Y . 0)
                (attach-dir . ,LEFT)
                (padding . 0)
                (stencil-align-dir-y . ,CENTER)))
       (right . ((Y . 0)
                 (padding . 0)
                 (attach-dir . ,RIGHT)
                 (stencil-align-dir-y . ,CENTER))))
  \override Staff.OttavaBracket.left-bound-info =
     #ly:horizontal-line-spanner::calc-left-bound-info-and-text
  \override Staff.OttavaBracket.right-bound-info =
     #ly:horizontal-line-spanner::calc-right-bound-info
}

{
  r4
  \ottavaBracketLineSpanner
%% Format "loco" with usual markup-commands to taste
  \override Staff.OttavaBracket.bound-details.right.text = "loco"
  \ottava 1
  c''' d''' e''' |
  \ottava 0
  r e' d' c'
}

Though, I don't see a good way to place the end of the OttavaBracket
in a pleasing way. The downpointing hook at line-end is gone as well.
Even if you extend the "loco"-markup to print it, it's not convincing,
imho.

Furthermore, the snippet from NR as well as the one above emit several
programming errors if compiled with -dcheck-internal-types

Btw, I can't find -dcheck-internal-types in the 2.23.-docs any more
and was not able to find out why.

Anyone with more insight?

Cheers,
  Harm



reply via email to

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