-
Notifications
You must be signed in to change notification settings - Fork 6
/
diplomatic-line-breaks.ily
43 lines (40 loc) · 1.93 KB
/
diplomatic-line-breaks.ily
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
\version "2.19.22"
\header {
oll-title = "Indicator for original line breaks in diplomatic editions."
oll-short-description = ""
oll-author = "Urs Liska"
oll-description = \markup \wordwrap {
Draw an indicator for original line breaks (but don't apply any break).
It is a common notation to indicate line breaks in the
original source (e.g. when editing sketches and drafts) with such marks.
By default a dashed line is drawn above the staff.
}
oll-usage = \markup \wordwrap {
\typewriter "\\diplomaticLineBreak" can be used at any rhythmic position.
Without configuration it will print a dashed vertical line above the staff.
}
oll-options = #'((root-path . scholarly.diplomatic-line-break
))
oll-category = "editorial-marks"
% add comma-separated tags to make searching more effective:
oll-tags = "markup,line-breaks"
oll-status = "ready"
oll-todo = "Add more styles (dotted, arrows ...)"
}
\registerOption scholarly.diplomatic-line-break.thickness 1.6
\registerOption scholarly.diplomatic-line-break.dash-pattern #'(0.25 . 0.15)
\registerOption scholarly.diplomatic-line-break.length 3
\registerOption scholarly.diplomatic-line-break.direction #UP
\registerOption scholarly.diplomatic-line-break.Y-offset 0
diplomaticLineBreak = {
\once \override Score.RehearsalMark.padding = #0
\once \override Score.RehearsalMark.extra-offset = #`(0 .
,#{ \getOption scholarly.diplomatic-line-break.Y-offset #})
\once \override Score.RehearsalMark.direction = \getOption scholarly.diplomatic-line-break.direction
\mark \markup {
\override #`(on . ,(car #{ \getOption scholarly.diplomatic-line-break.dash-pattern #}))
\override #`(off . ,(cdr #{ \getOption scholarly.diplomatic-line-break.dash-pattern #}))
\override #`(thickness . ,#{ \getOption scholarly.diplomatic-line-break.thickness #})
\draw-dashed-line #`(,0 . ,#{ \getOption scholarly.diplomatic-line-break.length #})
}
}