--- /dev/null
+%% Do not edit this file; it is auto-generated from LSR!
+\version "2.11.23"
+
+\header { texidoc = "
+Volta brackets can be placed over chord names. Just set the
+voltaOnThisStaff property to \"true\" for the ChordNames context and to
+\"false\" for the topmost ordinary Staff context.
+" }
+
+\score { <<
+ \new ChordNames \with {
+ voltaOnThisStaff = ##t
+ } \chordmode {
+ c1 c
+ }
+ \new Staff \with {
+ voltaOnThisStaff = ##f
+ }
+ {
+ \repeat volta 2 { c'1 } \alternative { c' }
+ }
+>> }
--- /dev/null
+%% Do not edit this file; it is auto-generated from LSR!
+\version "2.11.23"
+
+\header { texidoc = "
+in XXth century music, where time signatures tend to change a lot, it
+is sometimes recommended to put the time signatures on top of the score
+(or above each StaffGroup in case of an orchestral score). This can be
+achieved by creating a dummy staff which only contains the
+Time-signature-engraver). In this specific example, I've used a
+separate identifier to define every time signature change, which allows
+me to not bother entering them again when typing the actual music
+(careful though: it makes getting lost easier!).
+" }
+
+\layout{
+ \context {
+ \type "Engraver_group"
+ \consists "Time_signature_engraver"
+ \consists "Axis_group_engraver"
+ \name "TimeSig"
+ \override TimeSignature #'extra-offset = #'(-2.2 . 0.0 )
+ \override TimeSignature #'font-size = #3
+ }
+ \context {
+ \Score \accepts TimeSig
+ }
+
+ \context { \Staff
+ \override TimeSignature #'transparent = ##t
+ }
+}
+
+timeSignatures = { \time 2/4 s2 \time 3/4 s2. \time 4/4 s1 }
+\score {
+
+<< \new TimeSig \timeSignatures
+ \new Staff \relative { c'2 c2. c1 }
+ \new Staff { a2 a2. a1}
+ >>
+}
--- /dev/null
+%% Do not edit this file; it is auto-generated from LSR!
+\version "2.11.23"
+
+\header { texidoc = "
+There is a way to enforce enharmonic modifications for notes in order
+to have the minimum number of accidentals. In that case, ``Double
+accidentals should be removed, as well as E-sharp (-> F), bC (-> B), bF
+(-> E), B-sharp (-> C).'', as proposed by a request for a new feature.
+In this manner, the most natural enharmonic notes are chosen in this
+example.
+" }
+
+#(define (naturalise-pitch p)
+ (let* ((o (ly:pitch-octave p))
+ (a (ly:pitch-alteration p))
+ (n (ly:pitch-notename p)))
+
+ (cond
+ ((and (> a 1) (or (eq? n 6) (eq? n 2)))
+ (set! a (- a 2))
+ (set! n (+ n 1)))
+ ((and (< a -1) (or (eq? n 0) (eq? n 3)))
+ (set! a (+ a 2))
+ (set! n (- n 1))))
+
+ (cond
+ ((> a 2) (set! a (- a 4)) (set! n (+ n 1)))
+ ((< a -2) (set! a (+ a 4)) (set! n (- n 1))))
+
+ (if (< n 0) (begin (set! o (- o 1)) (set! n (+ n 7))))
+ (if (> n 6) (begin (set! o (+ o 1)) (set! n (- n 7))))
+
+ (ly:make-pitch o n a)))
+
+#(define (naturalise music)
+ (let* ((es (ly:music-property music 'elements))
+ (e (ly:music-property music 'element))
+ (p (ly:music-property music 'pitch)))
+
+ (if (pair? es)
+ (ly:music-set-property!
+ music 'elements
+ (map (lambda (x) (naturalise x)) es)))
+
+ (if (ly:music? e)
+ (ly:music-set-property!
+ music 'element
+ (naturalise e)))
+
+ (if (ly:pitch? p)
+ (begin
+ (set! p (naturalise-pitch p))
+ (ly:music-set-property! music 'pitch p)))
+
+ music))
+
+music = \relative c' { c4 d e f g a b c }
+
+naturaliseMusic =
+#(define-music-function (parser location m)
+ (ly:music?)
+ (naturalise m))
+
+\score {
+ \context Staff {
+ \transpose c ais \music
+ \naturaliseMusic \transpose c ais \music
+ \transpose c deses \music
+ \naturaliseMusic \transpose c deses \music
+ }
+ \layout { ragged-right = ##t}
+}
+
+
--- /dev/null
+%% Do not edit this file; it is auto-generated from LSR!
+\version "2.11.23"
+
+\header { texidoc = "
+Instrument names can be displayed using a \markup command; in this case
+the name is placed inside a padded box, which can help vertical
+alignment.
+" }
+
+\new StaffGroup \relative
+<<
+ \new Staff {
+ \set Staff.instrumentName = \markup { \hcenter-in #10 "blabla" }
+ c1 c1
+ }
+ \new Staff {
+ \set Staff.instrumentName = \markup { \hcenter-in #10 "blo" }
+ c1 c1
+ }
+
+>>
--- /dev/null
+%% Do not edit this file; it is auto-generated from LSR!
+\version "2.11.23"
+
+\header { texidoc = "
+This example shows a trick to insert a vertical brace when going from
+several stanzas into a common ending in the lyrics. (An alternative is
+of course to just skip the brace, especially if you add a line break
+instead).
+" }
+
+% Replace brace150 by whatever between brace0 and brace575 that is of a
+% suitable size.
+leftbrace = \markup {\override #'(font-encoding . fetaBraces) \lookup #"brace200" }
+
+% In some versions earlier than 20.10.20, the argument to \rotate was
+% erroneously treated as radians instead of degrees, i.e. #3.14 was
+% needed instead of #180
+rightbrace = \markup {\rotate #180 \leftbrace }
+
+
+lyricsbeforebrace = \lyricmode {Here is some ly -- rics }
+
+lyricsfrombrace = \lyricmode { \markup{\rightbrace Here} comes some more }
+
+
+melody = \relative c'{ c d e f g f e d c e d f g }
+
+
+\score{
+<<
+ \new Voice = m \melody
+ \new Lyrics \lyricsto m \lyricsbeforebrace
+ \new Lyrics \lyricsto m { \lyricsbeforebrace \lyricsfrombrace }
+ \new Lyrics \lyricsto m \lyricsbeforebrace
+>>
+}
+
+++ /dev/null
-
-\header {
-
-
- texidoc = "instrument names may be aligned manually by putting the
-names in padded boxes with @code{\markup}."
-
-
-}
-
-\version "2.10.0"
-
-\paper {
- line-width = 15\cm
-}
-
-
-\new StaffGroup \relative
-<<
- \new Staff {
- \set Staff.instrumentName = \markup { \hcenter-in #10 "blabla" }
- c1 c1
- }
- \new Staff {
- \set Staff.instrumentName = \markup { \hcenter-in #10 "blo" }
- c1 c1
- }
-
->>
+++ /dev/null
-%% todo: move into advanced notation section of the manual.
-
-\header {
-
- texidoc = "Time signatures may be put on a separate staff. This is
- used contemporary pieces with many time signature changes. "
-
-}
-\version "2.10.0"
-\layout {
- ragged-right = ##T
-}
-
-\layout{
- \context {
- \type "Engraver_group"
- \consists "Time_signature_engraver"
- \consists "Axis_group_engraver"
- \name "TimeSig"
- \override TimeSignature #'font-size = #4
- }
- \context {
- \Score \accepts TimeSig
- }
-
- \context { \Staff
- \override TimeSignature #'transparent = ##t
- }
-}
-
-
-\relative
-<< \new Staff { \time 2/4 c2 \time 3/4 c2. \time 4/4 c1 }
- \new TimeSig {
- \skip 4 * 9
- }
- \new Staff { r4 r r
- r4 r r
- r4 r r }
-
- >>
+++ /dev/null
-\header {
- texidoc = "Volta brackets can be placed over chord names. Just set
-the @code{voltaOnThisStaff} property to true for the @code{ChordNames} context and to false for the topmost ordinary @code{Staff} context."
-}
-
-\version "2.10.0"
-\score { <<
- \new ChordNames \with {
- voltaOnThisStaff = ##t
- } \chordmode {
- c1 c
- }
- \new Staff \with {
- voltaOnThisStaff = ##f
- }
- {
- \repeat volta 2 { c'1 } \alternative { c' }
- }
->> }