1 %% DO NOT EDIT this file manually; it is automatically
2 %% generated from LSR http://lsr.di.unimi.it
3 %% Make any changes in LSR itself, or in Documentation/snippets/new/ ,
4 %% and then run scripts/auxiliar/makelsr.py
6 %% This file is in the public domain.
10 lsrtags = "staff-notation, symbols-and-glyphs, vocal-music"
13 This snippet defines the @code{\\splitStaffBarLine} command, which adds
14 arrows in north-east and south-east directions at a bar line, to denote
15 that several voices sharing a staff will each continue on a staff of
16 their own in the next system.
19 doctitle = "Adding indicators to staves which get split after a break"
22 #(define-markup-command (arrow-at-angle layout props angle-deg length fill)
23 (number? number? boolean?)
25 (PI-OVER-180 (/ (atan 1 1) 34))
26 (degrees->radians (lambda (degrees) (* degrees PI-OVER-180)))
27 (angle-rad (degrees->radians angle-deg))
28 (target-x (* length (cos angle-rad)))
29 (target-y (* length (sin angle-rad))))
30 (interpret-markup layout props
32 #:translate (cons (/ target-x 2) (/ target-y 2))
34 #:translate (cons (/ length -2) 0)
35 #:concat (#:draw-line (cons length 0)
36 #:arrow-head X RIGHT fill)))))
39 \once \override Staff.BarLine.stencil =
41 (ly:stencil-combine-at-edge
42 (ly:bar-line::print grob)
44 (grob-interpret-markup grob #{
45 \markup\with-dimensions #'(0 . 0) #'(0 . 0) {
46 \translate #'(5.95 . .14)\arrow-at-angle #45 #(sqrt 8) ##t
47 \translate #'(5.35 . -.13)\arrow-at-angle #-45 #(sqrt 8) ##t }#})
52 convDownStaffBarLine = {
53 \once \override Staff.BarLine.stencil =
55 (ly:stencil-combine-at-edge
56 (ly:bar-line::print grob)
58 (grob-interpret-markup grob #{
59 \markup\with-dimensions #'(0 . 0) #'(0 . 0) {
60 \translate #'(5.3 . -.13)\arrow-at-angle #-45 #(sqrt 8) ##t }#})
65 convUpStaffBarLine = {
66 \once \override Staff.BarLine.stencil =
68 (ly:stencil-combine-at-edge
69 (ly:bar-line::print grob)
71 (grob-interpret-markup grob #{
72 \markup\with-dimensions #'(0 . 0) #'(0 . 0) {
73 \translate #'(5.28 . .14)\arrow-at-angle #45 #(sqrt 8) ##t }#})
84 instrumentName = #"H I + H II"
90 \repeat unfold 4 des''1
95 \new Staff \with { instrumentName = #"Low" } {
98 \repeat unfold 4 bes'1
105 \new Staff \with { shortInstrumentName = #"I" } {
108 \repeat unfold 2 { r4 f''2 r4 } \repeat unfold 2 e''1
110 \convDownStaffBarLine
112 \new Staff \with { shortInstrumentName = #"II" } {
115 \repeat unfold 4 bes'2 \repeat unfold 2 c''1
120 \new Staff \with { shortInstrumentName = #"L" } {
133 shortInstrumentName = #"I+II"
138 \repeat unfold 4 f''1
140 \repeat unfold 4 des''1
143 \new Staff \with { shortInstrumentName = #"L" } {
147 \repeat unfold 4 bes'1
156 \Staff \RemoveEmptyStaves
157 \override VerticalAxisGroup #'remove-first = ##t