]> git.donarmstrong.com Git - lilypond.git/commitdiff
LSR: add new files.
authorGraham Percival <graham@percival-music.ca>
Tue, 5 Jun 2007 02:19:07 +0000 (19:19 -0700)
committerGraham Percival <graham@percival-music.ca>
Tue, 5 Jun 2007 02:19:07 +0000 (19:19 -0700)
input/lsr/chords/volta-brackets-over-chord-names.ly [new file with mode: 0644]
input/lsr/contemporary/time-signatures-on-top-of-the-score-using-a-separate-staff.ly [new file with mode: 0644]
input/lsr/scheme/transpose-pitches-with-minimum-accidentals.ly [new file with mode: 0644]
input/lsr/staff/aligning-instrument-names.ly [new file with mode: 0644]
input/lsr/vocal/vertical-brace-spanning-several-lyrics-lines.ly [new file with mode: 0644]
input/test/instrument-name-align.ly [deleted file]
input/test/time-signature-staff.ly [deleted file]
input/test/volta-chord-names.ly [deleted file]

diff --git a/input/lsr/chords/volta-brackets-over-chord-names.ly b/input/lsr/chords/volta-brackets-over-chord-names.ly
new file mode 100644 (file)
index 0000000..ee84586
--- /dev/null
@@ -0,0 +1,22 @@
+%%  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' }
+  }
+>> }
diff --git a/input/lsr/contemporary/time-signatures-on-top-of-the-score-using-a-separate-staff.ly b/input/lsr/contemporary/time-signatures-on-top-of-the-score-using-a-separate-staff.ly
new file mode 100644 (file)
index 0000000..03e7e92
--- /dev/null
@@ -0,0 +1,40 @@
+%%  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}
+ >>
+}
diff --git a/input/lsr/scheme/transpose-pitches-with-minimum-accidentals.ly b/input/lsr/scheme/transpose-pitches-with-minimum-accidentals.ly
new file mode 100644 (file)
index 0000000..155f125
--- /dev/null
@@ -0,0 +1,74 @@
+%%  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}
+}
+
+
diff --git a/input/lsr/staff/aligning-instrument-names.ly b/input/lsr/staff/aligning-instrument-names.ly
new file mode 100644 (file)
index 0000000..fad0e45
--- /dev/null
@@ -0,0 +1,21 @@
+%%  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
+  } 
+  
+>>
diff --git a/input/lsr/vocal/vertical-brace-spanning-several-lyrics-lines.ly b/input/lsr/vocal/vertical-brace-spanning-several-lyrics-lines.ly
new file mode 100644 (file)
index 0000000..db0baa6
--- /dev/null
@@ -0,0 +1,37 @@
+%%  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
+>>
+}
+
diff --git a/input/test/instrument-name-align.ly b/input/test/instrument-name-align.ly
deleted file mode 100644 (file)
index ccbbeba..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-
-\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
-  } 
-  
->>
diff --git a/input/test/time-signature-staff.ly b/input/test/time-signature-staff.ly
deleted file mode 100644 (file)
index 3e557fe..0000000
+++ /dev/null
@@ -1,41 +0,0 @@
-%% 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 }
-
- >>
diff --git a/input/test/volta-chord-names.ly b/input/test/volta-chord-names.ly
deleted file mode 100644 (file)
index 8f6ebd7..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-\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' }
-  }
->> }