summaryrefslogtreecommitdiff
path: root/input
diff options
context:
space:
mode:
authorMarc Hohl <marc@hohlart.de>2012-08-01 21:15:46 +0200
committerMarc Hohl <marc@hohlart.de>2012-10-15 11:14:48 +0200
commitcced43289cf170305e6e6517180659a1c4fa91db (patch)
tree46138da00f3952c0724d47524fb345dc1d3ee772 /input
parentd59af0d0c7fa993ed2b12de5ff7f1d13535d17d0 (diff)
New bar line interface
* the input string of a bar line called by \bar "<bar string>" resembles the output one-by-one; a repeat sign is called by ":|." * (define-bar-line ...) or \defineBarLine allows for new definitions. These functions have four arguments, namely the bar line itself, the bar line used at the end of line, the bar line used at the begin of a new line and the span bar line. * Annotations for barlines can be added to distinguish between two identical barlines with different break apperance or span bar lines. * To align span bars properly, the space character " " has a special meaning. When it occurs, the width of the resembling glyph in the bar line definition is used. * New glyphs can be added easily. * Volta brackets take the bar line dimensions into account.
Diffstat (limited to 'input')
-rw-r--r--input/regression/auto-beam-bar.ly4
-rw-r--r--input/regression/bar-line-define-bar-glyph.ly28
-rw-r--r--input/regression/bar-line-define-bar-line.ly21
-rw-r--r--input/regression/bar-line-segno.ly10
-rw-r--r--input/regression/bar-lines.ly6
-rw-r--r--input/regression/double-repeat.ly4
-rw-r--r--input/regression/grace-volta-repeat-2.ly6
-rw-r--r--input/regression/lyrics-bar.ly4
-rw-r--r--input/regression/music-function.ly6
-rw-r--r--input/regression/non-centered-bar-lines.ly4
-rw-r--r--input/regression/number-staff-lines.ly4
-rw-r--r--input/regression/prefatory-spacing-matter.ly6
-rw-r--r--input/regression/repeat-sign-global-size-10.ly14
-rw-r--r--input/regression/repeat-sign-global-size-30.ly14
-rw-r--r--input/regression/repeat-sign-global-size-5.ly14
-rw-r--r--input/regression/repeat-sign-layout-size.ly14
-rw-r--r--input/regression/repeat-sign.ly4
-rw-r--r--input/regression/span-bar-break.ly10
-rw-r--r--input/regression/tuplet-broken.ly6
-rw-r--r--input/regression/tuplet-full-length.ly6
-rw-r--r--input/regression/zero-staff-space.ly4
21 files changed, 119 insertions, 70 deletions
diff --git a/input/regression/auto-beam-bar.ly b/input/regression/auto-beam-bar.ly
index 8daa66e330..34fa328dda 100644
--- a/input/regression/auto-beam-bar.ly
+++ b/input/regression/auto-beam-bar.ly
@@ -1,5 +1,5 @@
-\version "2.16.0"
+\version "2.17.5"
\header{
texidoc="No auto beams will be put over (manual) repeat bars."
@@ -8,5 +8,5 @@ texidoc="No auto beams will be put over (manual) repeat bars."
{
\time 3/4
- a'4 b' c''8 \bar ":|:" d''8
+ a'4 b' c''8 \bar ":..:" d''8
}
diff --git a/input/regression/bar-line-define-bar-glyph.ly b/input/regression/bar-line-define-bar-glyph.ly
new file mode 100644
index 0000000000..7b5ce64ae2
--- /dev/null
+++ b/input/regression/bar-line-define-bar-glyph.ly
@@ -0,0 +1,28 @@
+\version "2.17.5"
+
+\header { texidoc = "New bar line glyphs can be defined in Scheme."
+ }
+
+\paper { ragged-right = ##t }
+
+
+#(define (make-coda-sign-bar-line grob extent)
+ (let ((stencil (ly:font-get-glyph (ly:grob-default-font grob)
+ "scripts.coda")))
+ stencil))
+
+#(add-bar-glyph-print-procedure "0" make-coda-sign-bar-line)
+
+\defineBarLine "0" #'("0" "" "")
+
+
+\relative \new StaffGroup <<
+ \new Staff {
+ c4 c \bar "0" c c \bar "0" \break
+ c1
+ }
+ \new Staff {
+ c4 c c c
+ c1
+ }
+>>
diff --git a/input/regression/bar-line-define-bar-line.ly b/input/regression/bar-line-define-bar-line.ly
new file mode 100644
index 0000000000..66a5777293
--- /dev/null
+++ b/input/regression/bar-line-define-bar-line.ly
@@ -0,0 +1,21 @@
+\version "2.17.5"
+
+\header { texidoc = "New bar line styles can be defined by @code{\defineBarLine}."
+ }
+
+\paper { ragged-right = ##t }
+
+\defineBarLine "[|;" #'("|" "[|;" " |")
+\defineBarLine ";|]" #'(";|]" "" " |")
+
+\relative \new StaffGroup <<
+ \new Staff {
+ c4 c \bar "[|;" c c \bar ";|]" \break
+ c4 c \bar ";|]" c c \bar "[|;" \break
+ c1 }
+ \new Staff {
+ c4 c c c
+ c4 c c c
+ c1
+ }
+>>
diff --git a/input/regression/bar-line-segno.ly b/input/regression/bar-line-segno.ly
index 17d5a7dc0e..7b17c0f58b 100644
--- a/input/regression/bar-line-segno.ly
+++ b/input/regression/bar-line-segno.ly
@@ -1,4 +1,4 @@
-\version "2.16.0"
+\version "2.17.5"
\header { texidoc = "Segno bar lines can be used to mark
the begin and the end of a segno part."
@@ -8,10 +8,10 @@
\relative \new StaffGroup <<
\new Staff {
- c4 \bar "S" c \bar "|S" c \bar "S|" c \bar ":|S" \break
- c4 c \bar ":|S|:" c c \bar ":|S.|:" \break
- c4 c c2 \bar ".S|:" \break
- c1 \bar ":|S." \break
+ c4 \bar "S" c \bar "S-|" c \bar "S-S" c \bar ":|.S" \break
+ c4 c \bar ":|.S.|:" c c \bar ":|.S.|:-S" \break
+ c4 c c2 \bar "S.|:" \break
+ c1 \bar ":|.S-S" \break
c1 \bar "S" \break
c1 }
\new Staff {
diff --git a/input/regression/bar-lines.ly b/input/regression/bar-lines.ly
index 359ccb4dd2..1ae85f4e26 100644
--- a/input/regression/bar-lines.ly
+++ b/input/regression/bar-lines.ly
@@ -1,4 +1,4 @@
-\version "2.16.0"
+\version "2.17.5"
\header { texidoc = "Various types of bar lines can be drawn.
@@ -17,9 +17,9 @@ space, centered on the top-most barline.
\relative \new StaffGroup <<
\new Staff = "1" {
- c2 \bar "dashed" c
+ c2 \bar "!" c
s1
- c2 \bar ":" c
+ c2 \bar ";" c
s1
c2 \bar "." c
s1
diff --git a/input/regression/double-repeat.ly b/input/regression/double-repeat.ly
index 08cc5f835d..9ce981dc59 100644
--- a/input/regression/double-repeat.ly
+++ b/input/regression/double-repeat.ly
@@ -1,4 +1,4 @@
-\version "2.16.0"
+\version "2.17.5"
\header {
texidoc = "Three types of double repeat bar line are supported."
@@ -7,7 +7,7 @@
\new Staff \relative c' {
c1
\mark "\":|:\""
- \bar ":|:"
+ \bar ":..:"
c1
\mark "\":|.|:\""
\bar ":|.|:"
diff --git a/input/regression/grace-volta-repeat-2.ly b/input/regression/grace-volta-repeat-2.ly
index 113de90be8..1a150fcc8a 100644
--- a/input/regression/grace-volta-repeat-2.ly
+++ b/input/regression/grace-volta-repeat-2.ly
@@ -1,9 +1,9 @@
-\version "2.16.0"
+\version "2.17.5"
\header {
texidoc = "A volta repeat may begin with a grace. Consecutive
- ending and starting repeat bars are merged into one @code{:||:}."
+ ending and starting repeat bars are merged into one @code{:..:}."
}
@@ -11,7 +11,7 @@
\relative c' {
\repeat volta 2 {
- c1
+ c1
}
\repeat volta 2 {
\grace {c8 } c4
diff --git a/input/regression/lyrics-bar.ly b/input/regression/lyrics-bar.ly
index c559bedebe..1f41177f9b 100644
--- a/input/regression/lyrics-bar.ly
+++ b/input/regression/lyrics-bar.ly
@@ -1,4 +1,4 @@
-\version "2.16.0"
+\version "2.17.5"
\header{
texidoc="
@@ -13,7 +13,7 @@ lyrics do not collide with barlines.
\relative c'' <<
\new Voice = "a"{
- b1 \bar "|:" b1 \bar ":|" b1 \bar "|."
+ b1 \bar ".|:" b1 \bar ":|." b1 \bar "|."
}
\new Lyrics \with {
\consists "Bar_engraver"
diff --git a/input/regression/music-function.ly b/input/regression/music-function.ly
index 0a1d36825a..8f4da124fa 100644
--- a/input/regression/music-function.ly
+++ b/input/regression/music-function.ly
@@ -1,13 +1,13 @@
\header
{
-
+
texidoc = "Music functions are generic music transformation functions,
which can be used to extend music syntax seamlessly. Here we
demonstrate a @code{\\myBar} function, which works similar to
@code{\\bar}, but is implemented completely in Scheme."
}
-\version "2.16.0"
+\version "2.17.5"
myBar = #(define-music-function (parser location bar-type) (string?)
(context-spec-music
@@ -17,6 +17,6 @@ myBar = #(define-music-function (parser location bar-type) (string?)
\layout { ragged-right = ##t }
{
- d4 \myBar "|:" d4
+ d4 \myBar ".|:" d4
}
diff --git a/input/regression/non-centered-bar-lines.ly b/input/regression/non-centered-bar-lines.ly
index 79e8ec88dc..308a6e3abb 100644
--- a/input/regression/non-centered-bar-lines.ly
+++ b/input/regression/non-centered-bar-lines.ly
@@ -1,4 +1,4 @@
-\version "2.16.0"
+\version "2.17.5"
\header {
texidoc = "Bar lines are positioned correctly when using custom
staves which are not centered around position@tie{}0.
@@ -7,6 +7,6 @@ staves which are not centered around position@tie{}0.
\new Staff {
\override Staff.StaffSymbol #'line-positions = #'(1 3 5 7 9)
c''1 \bar "||"
- c''1 \bar ":"
+ c''1 \bar ";"
c''1 \bar "|."
}
diff --git a/input/regression/number-staff-lines.ly b/input/regression/number-staff-lines.ly
index 489e62be63..99e3251d01 100644
--- a/input/regression/number-staff-lines.ly
+++ b/input/regression/number-staff-lines.ly
@@ -1,5 +1,5 @@
-\version "2.16.0"
+\version "2.17.5"
\header{
texidoc=" The number of stafflines of a staff can be set. Ledger
@@ -12,6 +12,6 @@ adjusted accordingly. "
\override StaffSymbol #'line-count = #3
}
\relative c {
- c' c c c | g' g g g \bar ":|"
+ c' c c c | g' g g g \bar ":|."
}
diff --git a/input/regression/prefatory-spacing-matter.ly b/input/regression/prefatory-spacing-matter.ly
index 7ab076858f..8eb6b0b20a 100644
--- a/input/regression/prefatory-spacing-matter.ly
+++ b/input/regression/prefatory-spacing-matter.ly
@@ -1,5 +1,5 @@
-\version "2.16.0"
+\version "2.17.5"
\header {
texidoc = "Distances between prefatory items (e.g. clef, bar,
@@ -16,11 +16,11 @@ bar-line is different from the start of line.
\relative c'' {
\set Staff.instrumentName = "fobar"
- \bar "||:"
+ \bar ".|:-||"
\key cis \major
cis4 cis4 cis4 cis4 \clef bass cis,1
\clef treble
- \bar ":|"
+ \bar ":|."
\key g \minor
c1
}
diff --git a/input/regression/repeat-sign-global-size-10.ly b/input/regression/repeat-sign-global-size-10.ly
index 3fea78a4a8..093fd54a61 100644
--- a/input/regression/repeat-sign-global-size-10.ly
+++ b/input/regression/repeat-sign-global-size-10.ly
@@ -1,4 +1,4 @@
-\version "2.16.0"
+\version "2.17.5"
\header {
texidoc = "The two dots of a repeat sign should be symmetric
to the staff centre and avoid staff lines even for exotic staves.
@@ -12,18 +12,18 @@ Test set-global-staff size 10 (with layout-set-staff-size)."
\context Staff = "s1" \with {
\override StaffSymbol #'staff-space = #0.6
} {
- s1 \bar ":|"
+ s1 \bar ":|."
}
\context Staff = "s2" \with {
\override StaffSymbol #'line-positions = #'(-4 -2 0 2)
\override StaffSymbol #'staff-space = #0.7
} {
- s1 \bar ":|"
+ s1 \bar ":|."
}
\context Staff = "s3" {
- s1 \bar ":|"
+ s1 \bar ":|."
}
>>
}
@@ -31,20 +31,20 @@ Test set-global-staff size 10 (with layout-set-staff-size)."
\score {
<<
\context Staff = "s1" {
- s1 \bar ":|"
+ s1 \bar ":|."
}
\context Staff = "s2" \with {
\override StaffSymbol #'staff-space = #1.7
\override StaffSymbol #'line-positions = #'(-4 -2 0 2)
} {
- s1 \bar ":|"
+ s1 \bar ":|."
}
\context Staff = "s3" \with {
\override StaffSymbol #'staff-space = #3
} {
- s1 \bar ":|"
+ s1 \bar ":|."
}
>>
diff --git a/input/regression/repeat-sign-global-size-30.ly b/input/regression/repeat-sign-global-size-30.ly
index f3ac22d60a..69b136a533 100644
--- a/input/regression/repeat-sign-global-size-30.ly
+++ b/input/regression/repeat-sign-global-size-30.ly
@@ -1,4 +1,4 @@
-\version "2.16.0"
+\version "2.17.5"
\header {
texidoc = "The two dots of a repeat sign should be symmetric
to the staff centre and avoid staff lines even for exotic staves.
@@ -12,18 +12,18 @@ Test set-global-staff size 30 (with layout-set-staff-size)."
\context Staff = "s1" \with {
\override StaffSymbol #'staff-space = #0.5
} {
- s1 \bar ":|"
+ s1 \bar ":|."
}
\context Staff = "s2" \with {
\override StaffSymbol #'staff-space = #0.6
\override StaffSymbol #'line-positions = #'(-4 -2 0 2)
} {
- s1 \bar ":|"
+ s1 \bar ":|."
}
\context Staff = "s3" {
- s1 \bar ":|"
+ s1 \bar ":|."
}
>>
}
@@ -31,20 +31,20 @@ Test set-global-staff size 30 (with layout-set-staff-size)."
\score {
<<
\context Staff = "s1" {
- s1 \bar ":|"
+ s1 \bar ":|."
}
\context Staff = "s2" \with {
\override StaffSymbol #'staff-space = #0.33
} {
- s1 \bar ":|"
+ s1 \bar ":|."
}
\context Staff = "s3" \with {
\override StaffSymbol #'staff-space = #0.33
\override StaffSymbol #'line-positions = #'(-4 -2 0 2)
} {
- s1 \bar ":|"
+ s1 \bar ":|."
}
>>
diff --git a/input/regression/repeat-sign-global-size-5.ly b/input/regression/repeat-sign-global-size-5.ly
index cccfd56892..dc1a88e0cc 100644
--- a/input/regression/repeat-sign-global-size-5.ly
+++ b/input/regression/repeat-sign-global-size-5.ly
@@ -1,4 +1,4 @@
-\version "2.17.2"
+\version "2.17.5"
\header {
texidoc = "The two dots of a repeat sign should be symmetric
to the staff centre and avoid staff lines even for exotic staves.
@@ -12,17 +12,17 @@ Test set-global-staff size 10 (with layout-set-staff-size)."
\context Staff = "s1" \with {
\override StaffSymbol #'staff-space = #0.7
} {
- s1 \bar ":|"
+ s1 \bar ":|."
}
\context Staff = "s2" \with {
\override StaffSymbol #'line-positions = #'(-4 -2 0 2)
} {
- s1 \bar ":|"
+ s1 \bar ":|."
}
\context Staff = "s3" {
- s1 \bar ":|"
+ s1 \bar ":|."
}
>>
}
@@ -30,20 +30,20 @@ Test set-global-staff size 10 (with layout-set-staff-size)."
\score {
<<
\context Staff = "s1" {
- s1 \bar ":|"
+ s1 \bar ":|."
}
\context Staff = "s2" \with {
\override StaffSymbol #'staff-space = #3
\override StaffSymbol #'line-positions = #'(-4 -2 0 2)
} {
- s1 \bar ":|"
+ s1 \bar ":|."
}
\context Staff = "s3" \with {
\override StaffSymbol #'staff-space = #6
} {
- s1 \bar ":|"
+ s1 \bar ":|."
}
>>
diff --git a/input/regression/repeat-sign-layout-size.ly b/input/regression/repeat-sign-layout-size.ly
index 0856984dd7..c47cac2359 100644
--- a/input/regression/repeat-sign-layout-size.ly
+++ b/input/regression/repeat-sign-layout-size.ly
@@ -1,4 +1,4 @@
-\version "2.16.0"
+\version "2.17.5"
\header {
texidoc = "The two dots of a repeat sign should be symmetric
to the staff centre and avoid staff lines even for exotic staves.
@@ -10,17 +10,17 @@ Test layout-set-staff-size."
\context Staff = "s1" \with {
\override StaffSymbol #'staff-space = #0.3
} {
- s1 \bar ":|"
+ s1 \bar ":|."
}
\context Staff = "s2" \with {
\override StaffSymbol #'staff-space = #0.5
} {
- s1 \bar ":|"
+ s1 \bar ":|."
}
\context Staff = "s3" {
- s1 \bar ":|"
+ s1 \bar ":|."
}
>>
@@ -35,17 +35,17 @@ Test layout-set-staff-size."
\context Staff = "s1" \with {
\override StaffSymbol #'staff-space = #0.5
} {
- s1 \bar ":|"
+ s1 \bar ":|."
}
\context Staff = "s2" \with {
\override StaffSymbol #'staff-space = #0.6
} {
- s1 \bar ":|"
+ s1 \bar ":|."
}
\context Staff = "s3" {
- s1 \bar ":|"
+ s1 \bar ":|."
}
>>
}
diff --git a/input/regression/repeat-sign.ly b/input/regression/repeat-sign.ly
index b40c08d590..841e19d2ca 100644
--- a/input/regression/repeat-sign.ly
+++ b/input/regression/repeat-sign.ly
@@ -1,11 +1,11 @@
-\version "2.16.0"
+\version "2.17.5"
\header {
texidoc = "The two dots of a repeat sign should be symmetric
to the staff centre and avoid staff lines even for exotic staves."
}
-mus = \context Voice { \relative f' { d e f g \bar ":|" } }
+mus = \context Voice { \relative f' { d e f g \bar ":|." } }
\new Staff {
<<
diff --git a/input/regression/span-bar-break.ly b/input/regression/span-bar-break.ly
index 5bd5b074df..aac291494d 100644
--- a/input/regression/span-bar-break.ly
+++ b/input/regression/span-bar-break.ly
@@ -1,9 +1,9 @@
-\version "2.16.0"
+\version "2.17.5"
\header {
- texidoc = "At the beginning of a system, the @code{|:} repeat
-barline is drawn between the staves, but the @code{:|} is not."
+ texidoc = "At the beginning of a system, the @code{.|:} repeat
+barline is drawn between the staves, but the @code{:|.} is not."
}
@@ -12,8 +12,8 @@ barline is drawn between the staves, but the @code{:|} is not."
\new PianoStaff <<
\new Staff = "up" {
- \bar "|:" r1
- \bar ":|" \break r1
+ \bar ".|:" r1
+ \bar ":|." \break r1
}
\new Staff = "down" { r r }
>>
diff --git a/input/regression/tuplet-broken.ly b/input/regression/tuplet-broken.ly
index 172d28cabc..5d124e0094 100644
--- a/input/regression/tuplet-broken.ly
+++ b/input/regression/tuplet-broken.ly
@@ -8,7 +8,7 @@
}
-\version "2.16.0"
+\version "2.17.5"
\paper {
ragged-right = ##t
@@ -25,10 +25,10 @@
(markup #:arrow-head X RIGHT #f))
\times 11/19 {
c4 c4 c4 c4
- \bar "empty" \break
+ \bar "-" \break
c4 c4 c4 c4
c4 c4 c4 c4
- \bar "empty" \break
+ \bar "-" \break
c4 c4 c4 c4
c4 c4 c4
}
diff --git a/input/regression/tuplet-full-length.ly b/input/regression/tuplet-full-length.ly
index 5e4b46bab5..96016b471a 100644
--- a/input/regression/tuplet-full-length.ly
+++ b/input/regression/tuplet-full-length.ly
@@ -5,7 +5,7 @@
start of the next non-tuplet note. "
}
-\version "2.16.0"
+\version "2.17.5"
\paper { ragged-right = ##t
indent = 0.0 }
@@ -18,9 +18,9 @@ indent = 0.0 }
\set tupletFullLength = ##t
c4
\times 2/3 { c8[ c c] }
- \times 2/3 { c8[ c \bar "empty" \break c] }
+ \times 2/3 { c8[ c \bar "-" \break c] }
<< \times 2/3 { c8[ c c] }
- { s4*5/6 \bar "empty" \break } >>
+ { s4*5/6 \bar "-" \break } >>
c4
\times 2/3 { c8[ c c] }
diff --git a/input/regression/zero-staff-space.ly b/input/regression/zero-staff-space.ly
index 65d2eb95de..b3047a9ebd 100644
--- a/input/regression/zero-staff-space.ly
+++ b/input/regression/zero-staff-space.ly
@@ -1,4 +1,4 @@
-\version "2.16.0"
+\version "2.17.5"
\header {
texidoc="
@@ -10,6 +10,6 @@ Setting staff-space to 0 does not cause a segmentation fault.
\override StaffSymbol #'staff-space = #0
} {
\relative c' {
- c1 \bar ":|"
+ c1 \bar ":|."
}
}