1 %% DO NOT EDIT this file manually; it is automatically
2 %% generated from LSR http://lsr.dsi.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 %% Translation of GIT committish: 1cda7b7b8219cb97399b8e7b56c1115aaf82c002
12 Dans cet extrait est définie la commande @code{\\splitStaffBarLine} qui
13 ajoute une double flèche après la dernière barre de mesure d'une portée,
14 indiquant par là que ses différentes voix disposeront de leur propre
15 portée à la ligne suivante.
18 doctitlefr = "Ajout d'indicateurs à une portée dédoublée après un saut de ligne"
20 lsrtags = "vocal-music, symbols-and-glyphs, staff-notation"
23 This snippet defines the @code{\\splitStaffBarLine} command, which adds
24 arrows in north-east and south-east directions at a bar line, to denote
25 that several voices sharing a staff will each continue on a staff of
26 their own in the next system.
29 doctitle = "Adding indicators to staves which get split after a break"
32 #(define-markup-command (arrow-at-angle layout props angle-deg length fill)
33 (number? number? boolean?)
35 ;; PI-OVER-180 and degrees->radians are taken from flag-styles.scm
36 (PI-OVER-180 (/ (atan 1 1) 45))
37 (degrees->radians (lambda (degrees) (* degrees PI-OVER-180)))
38 (angle-rad (degrees->radians angle-deg))
39 (target-x (* length (cos angle-rad)))
40 (target-y (* length (sin angle-rad))))
41 (interpret-markup layout props
43 #:translate (cons (/ target-x 2) (/ target-y 2))
45 #:translate (cons (/ length -2) 0)
46 #:concat (#:draw-line (cons length 0)
47 #:arrow-head X RIGHT fill)))))
49 splitStaffBarLineMarkup = \markup \with-dimensions #'(0 . 0) #'(0 . 0) {
51 \arrow-at-angle #45 #(sqrt 8) ##f
52 \arrow-at-angle #-45 #(sqrt 8) ##f
56 \once \override Staff.BarLine #'stencil =
58 (ly:stencil-combine-at-edge
59 (ly:bar-line::print grob)
61 (grob-interpret-markup grob splitStaffBarLineMarkup)
74 \new Staff \with { instrumentName = #"High I + II" } {
82 \new Staff \with { instrumentName = #"Low" } {
90 \new Staff \with { shortInstrumentName = #"H I" } {
92 \repeat unfold 2 { r4 f''2 r4 } \repeat unfold 2 e''1
94 \new Staff \with { shortInstrumentName = #"H II" } {
96 \repeat unfold 4 b'2 \repeat unfold 2 c''1
98 \new Staff \with { shortInstrumentName = #"L" } {
110 \Staff \RemoveEmptyStaves
111 \override VerticalAxisGroup #'remove-first = ##t