1 %% Do not edit this file; it is automatically
2 %% generated from LSR http://lsr.dsi.unimi.it
3 %% This file is in the public domain.
7 lsrtags
= "staff-notation, vocal-music"
10 This snippet defines the @code{\\splitStaffBarLine} command, which adds
11 arrows in north-east and south-east directions at a bar line, to denote
12 that several voices sharing a staff will each continue on a staff of
13 their own in the next system.
16 doctitle
= "Adding indicators to staves which get split after a break"
19 #(define-markup-command
(arrow-at-angle layout props angle-deg length fill
)
20 (number? number? boolean?
)
22 ;; PI-OVER-
180 and degrees-
>radians are taken from flag-styles
.scm
23 (PI-OVER-
180 (/ (atan
1 1) 45))
24 (degrees-
>radians
(lambda
(degrees
) (* degrees PI-OVER-
180)))
25 (angle-rad
(degrees-
>radians angle-deg
))
26 (target-x
(* length
(cos angle-rad
)))
27 (target-y
(* length
(sin angle-rad
))))
28 (interpret-markup layout props
30 #:translate
(cons
(/ target-x
2) (/ target-y
2))
32 #:translate
(cons
(/ length -
2) 0)
33 #:concat
(#:draw-line
(cons length
0)
34 #:arrow-head X RIGHT fill
)))))
36 splitStaffBarLineMarkup
= \markup \with-dimensions
#'(0 . 0) #'(0 . 0) {
38 \arrow-at-angle
#45 #(sqrt
8) ##f
39 \arrow-at-angle
#-
45 #(sqrt
8) ##f
43 \once \override Staff
.BarLine
#'stencil
=
45 (ly
:stencil-combine-at-edge
46 (ly
:bar-line
::print grob
)
48 (grob-interpret-markup grob splitStaffBarLineMarkup
)
61 \new Staff
\with { instrumentName
= #"High I + II" } {
69 \new Staff
\with { instrumentName
= #"Low" } {
77 \new Staff
\with { shortInstrumentName
= #"H I" } {
79 \repeat unfold
2 { r
4 f''2 r
4 } \repeat unfold
2 e''1
81 \new Staff
\with { shortInstrumentName
= #"H II" } {
83 \repeat unfold
4 b'2 \repeat unfold
2 c''1
85 \new Staff
\with { shortInstrumentName
= #"L" } {
97 \Staff \RemoveEmptyStaves
98 \override VerticalAxisGroup
#'remove-first
= ##t