[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Markup command \beam
From: |
Jean Abou Samra |
Subject: |
Re: Markup command \beam |
Date: |
Tue, 16 Aug 2022 13:30:19 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.12.0 |
Le 16/08/2022 à 13:09, Andrew Bernard a écrit :
How is \beam intended to be used in markup? Can it replace the beaming
of notes? I would not imagine - so I am unsure what this command is for.
It seems to me that \beam kind of misnamed due to a quirk of history.
In old times, it was the way to create a stencil with the kind 'beam.
LilyPond represents the internals of a stencil as a Scheme list whose
car is the stencil expression "kind" and whose cdr holds the parameters.
To understand better, try
\version "2.22.2"
{
\once \override TextScript.after-line-breaking =
#(lambda (grob)
(pretty-print (ly:stencil-expr (ly:grob-property grob 'stencil))))
c'^\markup { a b c \with-color "red" \italic d \draw-circle #5 #0.1 ##t }
}
Historically, there was a 'beam stencil expression kind. \beam was a
way to construct an expression of this kind. I did not check the details
of history, but this has been eliminated in favor of 'polygon which
is more general.
So \beam now is just a handy command that draws the shape of a beam,
which you can use for whatever has this shape even if it's not a beam.
For example, LilyPond uses it for the default slashSeparator:
slashSeparator = \markup {
\center-align
\vcenter \combine
\beam #2.0 #0.5 #0.48
\raise #0.7 \beam #2.0 #0.5 #0.48
}
Best,
Jean