4 texidoc
"The traditional way of printing text spanners in
5 LilyPond, is to first specify the text to print, and then
6 start the actual spanner. Here is a way to do it all at
7 once (beware: in order for the spanner to be attached
8 to the previous note or chord, the command has to be
9 preceded with a dash)."
12 #(define
(make-text-span str
)
13 "Make a TextSpanner that begins with the given STR."
14 (let
* ((m
(make-music
'TextSpanEvent
16 (details
(assoc-get
'bound-details
17 (assoc-get
'TextSpanner
18 all-grob-descriptions
)))
19 (left-details
(assoc-get
'left
21 (ly
:music-set-property
! m
'tweaks
27 (ly
:music-property m
'tweaks
)))
30 %% Wrapper for the make-text-span function
32 (define-music-function
(txt
) (markup?
)
33 (make-text-span txt
)))
35 %% for consistency only.
40 c1 d e-
\startText "(hum along)" f g a-
\stopText b c