]> git.donarmstrong.com Git - lilypond.git/commitdiff
LSR: add new files.
authorGraham Percival <graham@percival-music.ca>
Wed, 15 Aug 2007 07:08:08 +0000 (00:08 -0700)
committerGraham Percival <graham@percival-music.ca>
Wed, 15 Aug 2007 07:08:08 +0000 (00:08 -0700)
input/lsr/ancient/ancient-accidentals.ly [new file with mode: 0644]
input/lsr/chords/inserting-a--markup-when-using-chordmode.ly [new file with mode: 0644]
input/lsr/contemporary/double-glissando.ly [new file with mode: 0644]
input/lsr/expressive/adding-accidentals-to-a-trillspanner.ly [new file with mode: 0644]
input/lsr/nonmusic/modifying-default-font-properties-for-piece-titles.ly [new file with mode: 0644]
input/lsr/scheme/automatically-durations-diminution.ly [new file with mode: 0644]
input/lsr/scheme/creating-a-sequence-of-notes-on-various-pitches.ly [new file with mode: 0644]
input/lsr/scheme/semichoirstaff;-choirstaff-with-spanbars-except---type-bars.ly [new file with mode: 0644]
input/lsr/text/inserting-large-plain-text-sections,-as-independent--markup-blocks.ly [new file with mode: 0644]
input/lsr/text/preventing-long--mark-objects-to-stretch-a-measure.ly [new file with mode: 0644]

diff --git a/input/lsr/ancient/ancient-accidentals.ly b/input/lsr/ancient/ancient-accidentals.ly
new file mode 100644 (file)
index 0000000..6e6cd7a
--- /dev/null
@@ -0,0 +1,24 @@
+%%  Do not edit this file; it is auto-generated from LSR!
+\version "2.11.23"
+
+\header { texidoc = "
+Accidentals are available in different ancient styles, which all are
+collected here.
+
+
+" }
+
+\relative c'' {
+      \time 5/4
+      \override Staff.Accidental #'glyph-name-alist = #alteration-default-glyph-name-alist
+      cisis^\markup { \typewriter default } cis c ces ceses 
+      \override Staff.Accidental #'glyph-name-alist = #alteration-hufnagel-glyph-name-alist
+      cisis^\markup { \typewriter hufnagel } cis c ces ceses 
+      \override Staff.Accidental #'glyph-name-alist = #alteration-medicaea-glyph-name-alist
+      cisis^\markup { \typewriter medicaea } cis c ces ceses 
+      \override Staff.Accidental #'glyph-name-alist = #alteration-vaticana-glyph-name-alist
+      cisis^\markup { \typewriter vaticana } cis c ces ceses 
+      \override Staff.Accidental #'glyph-name-alist = #alteration-mensural-glyph-name-alist
+      cisis^\markup { \typewriter mensural } cis c ces ceses 
+}
+
diff --git a/input/lsr/chords/inserting-a--markup-when-using-chordmode.ly b/input/lsr/chords/inserting-a--markup-when-using-chordmode.ly
new file mode 100644 (file)
index 0000000..da6982e
--- /dev/null
@@ -0,0 +1,19 @@
+%%  Do not edit this file; it is auto-generated from LSR!
+\version "2.11.23"
+
+\header { texidoc = "
+A way to insert a \markup @{ . . . @}string in \chords @{ . . . @}. 
+" }
+
+% Note what happens if \hspace #-2 is deleted or set to +n.
+% If "tacet" instead of "Tacet" a little bit of "C" peeks around the \whiteout.
+CMString  = { <c e g>-\markup { \whiteout { \hspace #-2 "Tacet" } } }
+CMStringX = #(append (sequential-music-to-chord-exceptions CMString #t)
+           ignatzekExceptions)
+<< { \chords { c1
+   \set   chordNameExceptions = #CMStringX c
+   \unset chordNameExceptions c }
+ } { \relative c'' { c c c } } >>
+
+
+
diff --git a/input/lsr/contemporary/double-glissando.ly b/input/lsr/contemporary/double-glissando.ly
new file mode 100644 (file)
index 0000000..0d9a391
--- /dev/null
@@ -0,0 +1,20 @@
+%%  Do not edit this file; it is auto-generated from LSR!
+\version "2.11.23"
+
+\header { texidoc = "
+To make double-glissandi, i.e. to connect chords with glissando lines,
+you have to create another voice, then attach a glissando to it.
+" }
+
+{\clef bass
+<< {  % New voice ( = \voiceOne) without stems or beams
+        \override Stem #'stencil = ##f
+        \override Beam #'stencil = ##f
+
+        % Attach glissando to noteheads
+        e8 \glissando fis
+    } \\ { % Original voice with chords rearranged so that glissando is attached to a & b
+        <e a,> \glissando <fis b,>
+} >>}
diff --git a/input/lsr/expressive/adding-accidentals-to-a-trillspanner.ly b/input/lsr/expressive/adding-accidentals-to-a-trillspanner.ly
new file mode 100644 (file)
index 0000000..01ccac7
--- /dev/null
@@ -0,0 +1,26 @@
+%%  Do not edit this file; it is auto-generated from LSR!
+\version "2.11.23"
+
+\header { texidoc = "
+By overriding @code{edge-text}, you can insert an accidental after the
+trill sign in a trillspanner, but this can look ugly, since the
+accidental isn't aligned.
+
+With a few tweaks to the script size and position, you can achieve
+quite pleasing results.
+
+
+
+" }
+
+\relative c'' {
+       \override TrillSpanner #'edge-text = 
+       #(cons (markup #:line (#:halign -0.5 #:musicglyph "scripts.trill" #:teeny #:raise 0.65 #:sharp)) "")
+       
+       b1\startTrillSpan b\stopTrillSpan
+       
+       \override TrillSpanner #'edge-text = 
+       #(cons (markup #:line (#:halign -0.5 #:musicglyph "scripts.trill" #:teeny #:raise 0.5 #:flat)) "")
+       
+       c\startTrillSpan c\stopTrillSpan
+}
diff --git a/input/lsr/nonmusic/modifying-default-font-properties-for-piece-titles.ly b/input/lsr/nonmusic/modifying-default-font-properties-for-piece-titles.ly
new file mode 100644 (file)
index 0000000..667bbbe
--- /dev/null
@@ -0,0 +1,38 @@
+%%  Do not edit this file; it is auto-generated from LSR!
+\version "2.11.23"
+
+\header { texidoc = "
+If you have multiple pieces (e.g. Kyrie, Gloria, Credo, etc. in masses)
+in a large work, you can use multiple \score parts and use the piece
+header field to supply a title for each of the pieces. However, the
+font is very small. You can either directly put the markup into the
+piece=... header field, or better re-define the scoreTitleMarkup
+function in the \paper section.
+" }
+
+\header {
+  title = "Formatting of piece headers"
+}
+\paper {
+  scoreTitleMarkup = \markup { \column {
+   \on-the-fly #print-all-headers { \bookTitleMarkup \hspace #1 }
+    \fill-line {
+      \fontsize #3 \bold \fromproperty #'header:piece
+      \fromproperty #'header:opus
+    }
+  }}
+}
+
+\markup { \fill-line { 
+\justify-string #"If you have multiple pieces in a large work, you can use multiple score parts and use the piece header field to supply a title for each of the pieces. However, the font is very small. You can either directly put the markup into the piece=... header field, or better re-define the scoreTitleMarkup function in the paper section."} }
+
+\score { 
+  \context Staff << { c'1 | R1 } >>
+  \header{ piece="Piece 1" }
+}
+
+\score { 
+  \context Staff << { c'1 | R1 } >>
+  \header{ piece="Piece 2" }
+}
+
diff --git a/input/lsr/scheme/automatically-durations-diminution.ly b/input/lsr/scheme/automatically-durations-diminution.ly
new file mode 100644 (file)
index 0000000..bd4447e
--- /dev/null
@@ -0,0 +1,29 @@
+%%  Do not edit this file; it is auto-generated from LSR!
+\version "2.11.23"
+
+\header { texidoc = "
+If you want to see what a piece looks like twice faster, or slower,
+without having to correct every duration manually, here is an easy way
+to do it. 
+" }
+
+\paper { indent = 0 }
+
+
+music = {a4. b4 c b8 a g a4 b8 a}
+
+looksFaster = #(define-music-function (parser location music)
+                                   (ly:music?)
+           (let ((new-music (ly:music-deep-copy music)))
+            (shift-duration-log new-music 1 0)
+            new-music))
+
+looksSlower = #(define-music-function (parser location music)
+                                   (ly:music?)
+           (let ((new-music (ly:music-deep-copy music)))
+            (shift-duration-log new-music -1 0)
+            new-music))
+
+\score { \new Voice { \time 7/8 \music  
+\break \looksFaster { \time 7/16 \music }
+\break \looksSlower { \time 7/4 \music }}}
diff --git a/input/lsr/scheme/creating-a-sequence-of-notes-on-various-pitches.ly b/input/lsr/scheme/creating-a-sequence-of-notes-on-various-pitches.ly
new file mode 100644 (file)
index 0000000..daaa0c9
--- /dev/null
@@ -0,0 +1,61 @@
+%%  Do not edit this file; it is auto-generated from LSR!
+\version "2.11.23"
+
+\header { texidoc = "
+In music that contains many occurrences of the same sequence of notes
+at different pitches, you can use the following music function. It
+takes a note, of which the pitch is used. The supporting Scheme
+functions were borrowed from the Tips and Tricks document in the manual.
+
+This example creates the rhythm used throughout Mars, from The Planets,
+by Gustav Holst.
+" }
+
+#(define (make-note-req p d)
+  (make-music 'NoteEvent
+   'duration d
+   'pitch p))
+
+#(define (make-note p d)
+  (make-music 'EventChord
+   'elements (list (make-note-req p d))))
+
+#(define (seq-music-list elts)
+  (make-music 'SequentialMusic
+   'elements elts))
+
+#(define (make-triplet elt)
+  (make-music 'TimeScaledMusic
+   'denominator 3
+   'numerator 2
+   'element elt))
+
+
+rhythm = #(define-music-function (parser location note) (ly:music?)
+          "Make the rhythm in Mars (the Planets) at the given note's pitch"
+          (let* ((p (ly:music-property
+                      (car (ly:music-property note 'elements))
+                      'pitch)))
+          (seq-music-list (list
+            (make-triplet (seq-music-list (list
+              (make-note p (ly:make-duration 3 0 2 3))
+              (make-note p (ly:make-duration 3 0 2 3))
+              (make-note p (ly:make-duration 3 0 2 3))
+            )))
+            (make-note p (ly:make-duration 2 0))
+            (make-note p (ly:make-duration 2 0))
+            (make-note p (ly:make-duration 3 0))
+            (make-note p (ly:make-duration 3 0))
+            (make-note p (ly:make-duration 2 0))
+          ))))
+
+\score {
+   \new Staff {
+       \time 5/4
+
+       \rhythm c'
+       \rhythm c''
+       \rhythm g
+   }
+}
+
diff --git a/input/lsr/scheme/semichoirstaff;-choirstaff-with-spanbars-except---type-bars.ly b/input/lsr/scheme/semichoirstaff;-choirstaff-with-spanbars-except---type-bars.ly
new file mode 100644 (file)
index 0000000..352ecad
--- /dev/null
@@ -0,0 +1,40 @@
+%%  Do not edit this file; it is auto-generated from LSR!
+\version "2.10.12"
+
+\header { texidoc = "
+If you wish to typeset \"|.\", etc, style spanbars on a ChoirStaff, you
+can add the span_bar_engraver, and instruct it to omit the \"|\"-style
+bars. In this example I create a new context, SemiChoirStaff, that does
+this.
+" }
+
+\version "2.10.12"
+
+mus = { \clef F c d e f c d e f c d e f c d e f \bar "||"  c d e f c d e f c d e f \bar "|." }
+
+\layout {
+  \context {
+    \ChoirStaff
+    \name "SemiChoirStaff"
+    \consists "Span_bar_engraver"
+    \override SpanBar #'stencil =
+    #(lambda (a) 
+      (if (string=? (ly:grob-property a 'glyph-name) "|")
+       (set! (ly:grob-property a 'glyph-name) ""))
+      (ly:span-bar::print a))
+  }
+  \context {
+    \Score
+    \accepts SemiChoirStaff
+  }
+}
+
+\score {
+  \new SemiChoirStaff {
+    <<
+      \new Staff \mus
+      \new Staff \mus
+    >>
+  }
+}
+
diff --git a/input/lsr/text/inserting-large-plain-text-sections,-as-independent--markup-blocks.ly b/input/lsr/text/inserting-large-plain-text-sections,-as-independent--markup-blocks.ly
new file mode 100644 (file)
index 0000000..cd50dc1
--- /dev/null
@@ -0,0 +1,155 @@
+%%  Do not edit this file; it is auto-generated from LSR!
+\version "2.11.23"
+
+\header { texidoc = "
+LilyPond can handle text almost as well as music notation: in a \book
+block, you can enter different \score blocks, but also independent
+\markup sections. This snippet also demonstrates some interesting text
+formatting features such as \justify-string or \wordwrap-string (do not
+forget the # character when using them). The \fill-line command
+produces centered text, and you can define margins using \override
+#'(line-width . X), where X is the width in staff spaces.
+" }
+
+\paper {
+       ragged-bottom = ##f
+   }
+
+upper = \relative c'' {
+       \clef treble
+       \key c \major
+       \time 4/4
+
+       a b c d
+    }
+
+    lower = \relative c {
+       \clef bass
+       \key c \major
+       \time 4/4
+
+       a2 c
+    }
+    \book {
+        \markup {\justify-string #"Lorem ipsum dolor sit amet
+consectetuer adipiscing elit,
+        sed diam nonummy nibh euismod tincidunt ut laoreet dolore
+magna aliquam erat volutpat.
+        Ut wisi enim ad minim veniam, quis nostrud exerci tation
+ullamcorper suscipit lobortis
+        nisl ut aliquip ex ea commodo consequat. Duis autem vel eum
+iriure dolor in hendrerit
+        in vulputate velit esse molestie consequat, vel illum dolore
+eu feugiat nulla facilisis
+        at vero eros et accumsan et iusto odio dignissim qui blandit
+praesent luptatum zzril
+        delenit augue duis dolore te feugait nulla facilisi. Nam
+liber tempor cum soluta nobis
+        eleifend option congue nihil imperdiet doming id quod mazim
+placerat facer possim assum.
+        Typi non habent claritatem insitam; est usus legentis in iis
+qui facit eorum claritatem.
+        Investigationes demonstraverunt lectores legere me lius quod
+ii legunt saepius.
+        Claritas est etiam processus dynamicus, qui sequitur
+mutationem consuetudium lectorum.
+        Mirum est notare quam littera gothica, quam nunc putamus
+parum claram, anteposuerit litterarum
+        formas humanitatis per seacula quarta decima et quinta
+decima. Eodem modo typi, qui nunc nobis
+        videntur parum clari, fiant sollemnes in futurum."}
+    \score {
+       \new PianoStaff <<
+          \set PianoStaff.instrumentName = "Piano  "
+          \new Staff = "upper" \upper
+          \new Staff = "lower" \lower
+       >>
+    }
+    \markup {\wordwrap-string #"Lorem ipsum dolor sit amet
+consectetuer adipiscing elit,
+        sed diam nonummy nibh euismod tincidunt ut laoreet dolore
+magna aliquam erat volutpat.
+        Ut wisi enim ad minim veniam, quis nostrud exerci tation
+ullamcorper suscipit lobortis
+        nisl ut aliquip ex ea commodo consequat. Duis autem vel eum
+iriure dolor in hendrerit
+        in vulputate velit esse molestie consequat, vel illum dolore
+eu feugiat nulla facilisis
+        at vero eros et accumsan et iusto odio dignissim qui blandit
+praesent luptatum zzril
+        delenit augue duis dolore te feugait nulla facilisi. Nam
+liber tempor cum soluta nobis
+        eleifend option congue nihil imperdiet doming id quod mazim
+placerat facer possim assum.
+        Typi non habent claritatem insitam; est usus legentis in iis
+qui facit eorum claritatem.
+        Investigationes demonstraverunt lectores legere me lius quod
+ii legunt saepius.
+        Claritas est etiam processus dynamicus, qui sequitur
+mutationem consuetudium lectorum.
+        Mirum est notare quam littera gothica, quam nunc putamus
+parum claram, anteposuerit litterarum
+        formas humanitatis per seacula quarta decima et quinta
+decima. Eodem modo typi, qui nunc nobis
+        videntur parum clari, fiant sollemnes in futurum."}
+    \score {
+       \new PianoStaff <<
+          \set PianoStaff.instrumentName = "Piano  "
+          \new Staff = "upper" \upper
+          \new Staff = "lower" \lower
+       >>
+    }
+
+    \markup {
+        \fill-line {
+     \override #'(line-width . 60)
+        \justify-string #"Lorem ipsum dolor sit amet consectetuer
+adipiscing elit,
+        sed diam nonummy nibh euismod tincidunt ut laoreet dolore
+magna aliquam erat volutpat.
+        Ut wisi enim ad minim veniam, quis nostrud exerci tation
+ullamcorper suscipit lobortis
+        nisl ut aliquip ex ea commodo consequat. Duis autem vel eum
+iriure dolor in hendrerit
+        in vulputate velit esse molestie consequat, vel illum dolore
+eu feugiat nulla facilisis
+        at vero eros et accumsan et iusto odio dignissim qui blandit
+praesent luptatum zzril
+        delenit augue duis dolore te feugait nulla facilisi." }
+    }
+
+    \score {
+       \new PianoStaff <<
+          \set PianoStaff.instrumentName = "Piano  "
+          \new Staff = "upper" \upper
+          \new Staff = "lower" \lower
+       >>
+    }
+    \markup {\justify-string #"Lorem ipsum dolor sit amet
+consectetuer adipiscing elit,
+        sed diam nonummy nibh euismod tincidunt ut laoreet dolore
+magna aliquam erat volutpat.
+        Ut wisi enim ad minim veniam, quis nostrud exerci tation
+ullamcorper suscipit lobortis
+        nisl ut aliquip ex ea commodo consequat. Duis autem vel eum
+iriure dolor in hendrerit
+        in vulputate velit esse molestie consequat, vel illum dolore
+eu feugiat nulla facilisis
+        at vero eros et accumsan et iusto odio dignissim qui blandit
+praesent luptatum zzril
+        delenit augue duis dolore te feugait nulla facilisi. Nam
+liber tempor cum soluta nobis
+        eleifend option congue nihil imperdiet doming id quod mazim
+placerat facer possim assum.
+        Typi non habent claritatem insitam; est usus legentis in iis
+qui facit eorum claritatem.
+        Investigationes demonstraverunt lectores legere me lius quod
+ii legunt saepius.
+        Claritas est etiam processus dynamicus, qui sequitur
+mutationem consuetudium lectorum.
+        Mirum est notare quam littera gothica, quam nunc putamus
+parum claram, anteposuerit litterarum
+        formas humanitatis per seacula quarta decima et quinta
+decima. Eodem modo typi, qui nunc nobis
+        videntur parum clari, fiant sollemnes in futurum."}
+        }
diff --git a/input/lsr/text/preventing-long--mark-objects-to-stretch-a-measure.ly b/input/lsr/text/preventing-long--mark-objects-to-stretch-a-measure.ly
new file mode 100644 (file)
index 0000000..5fefd8d
--- /dev/null
@@ -0,0 +1,27 @@
+%%  Do not edit this file; it is auto-generated from LSR!
+\version "2.11.23"
+
+\header { texidoc = "
+When you put a long \markup text in a \mark object, LilyPond stretches
+the measure to encompass the complete markup. This can be avoided by
+overriding the 'X-extent property of the RehearsalMark object, as
+demonstrated in this snippet. 
+" }
+
+\paper{ indent = 0}
+ \new PianoStaff {<<
+    {\new Staff
+        \override Score.RehearsalMark #'self-alignment-X = #left
+    R1 R1 \mark \markup {"long markup with default horizontal extent"} R1*2 }
+    \new Staff {\repeat unfold 16 {c4}}
+    >>
+}
+\new PianoStaff {<<
+    {\new Staff
+        \override Score.RehearsalMark #'self-alignment-X = #left
+       \override Score.RehearsalMark #'X-extent = #'(0 . 0)
+    R1 R1 \mark \markup {"long markup without horizontal extent"} R1*2 }
+    \new Staff {\repeat unfold 16 {c4}}
+    >>
+}
+