lilypond-user
[Top][All Lists]
Advanced

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

Re: typesetting Christian Wolff Excersize


From: Valentin Petzel
Subject: Re: typesetting Christian Wolff Excersize
Date: Sun, 31 Oct 2021 21:52:31 +0100

Hi Lukas, hi Ole,

Getting the parentheses is quite a simple modification (just use parenthesize-
stencil on the arrowhead stencil. But I think that using straight arrow lines 
is more readable than the slightly concave arrow head markup.

See the appended files for details.

Cheers,
Valentin

Am Sonntag, 31. Oktober 2021, 19:54:48 CET schrieb Lukas-Fabian Moser:
> Hi Ole,
> 
> Am 31.10.21 um 19:13 schrieb ole:
> > I've already removed the stem-engraver in the \layout part (to get the
> > quarter notes without stem)
> 
> I just want to point out that removing the stem engraver removes the
> stems "for good". Often, one wants to remove the stems but wants to be
> able to switch them on again at some later point in the score; in this
> case, it's better to just do \omit Stem (in \layout {} or in your music)
> which can be undone.
> 
> (Strictly speaking, removing the engraver does more than just \omitting
> the object, which in turn is more than just \hide'ing it.)
> 
> > Does someone have a solution for that particular spot by chance,
> > otherwise I thing about using Inkscape..?
> 
> One possibility would be to abuse stems for this. (This does not work if
> the Stem engraver is removed, see above.)
> 
> A first approximation:
> 
> \version "2.22"
> 
> connectArrowStem =
> #(define-music-function (dir) (ly:dir?)
>     #{
>       \once {
>         \undo \omit Stem % in case someone \omit'ted them :-)
>         \override Stem.length-fraction = 0
>         \override Stem.X-offset = 0.65
>         \override Stem.thickness = 2
>         \override Stem.stencil =
>         #(grob-transformer
>           'stencil
>           (lambda (grob stem)
>             (let* ((Y-ext (ly:stencil-extent stem Y))
>                    (Y-pos (interval-index Y-ext (* dir 0.3))))
>               (ly:stencil-add
>                stem
>                (ly:stencil-translate-axis
>                 (grob-interpret-markup grob (markup #:arrow-head Y dir #f))
>                 Y-pos Y)))))
>       }
>     #})
> 
> {
>    \omit Stem
>    c'4 d' e'4
>    \connectArrowStem #UP <c' g''>4
>    \connectArrowStem #DOWN <b' g''>
> }
> 
> This still causes problems if the two notes are too close together
> (because LilyPond still creates a stem protruding over one of the notes).
> 
> I also didn't implement the parentheses yet.
> 
> Lukas

Attachment: arrow-pars.ly
Description: Text Data

Attachment: arrow-straight-pars.ly
Description: Text Data

Attachment: signature.asc
Description: This is a digitally signed message part.


reply via email to

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