]> git.donarmstrong.com Git - lilypond.git/commitdiff
LSR: update.
authorGraham Percival <graham@percival-music.ca>
Wed, 30 Apr 2008 03:11:28 +0000 (20:11 -0700)
committerGraham Percival <graham@percival-music.ca>
Wed, 30 Apr 2008 03:11:28 +0000 (20:11 -0700)
32 files changed:
input/lsr/adding-text-indications-to-metronome-marks.ly
input/lsr/blanking-staff-lines-using-the--whiteout-command.ly
input/lsr/breaks.snippet-list
input/lsr/caesura-railtracks-with-fermata.ly
input/lsr/changing--flageolet-mark-size.ly
input/lsr/changing-time-signatures-inside-a-polymetric-section-using--compressmusic.ly
input/lsr/clusters.ly
input/lsr/controlling-the-placement-of-chord-fingerings.ly
input/lsr/creating-slurs-across-voices.ly [new file with mode: 0644]
input/lsr/demo-midiinstruments.ly
input/lsr/editorial-annotations.snippet-list
input/lsr/embedding-native-postscript-in-a--markup-block.ly
input/lsr/entering-several-tuplets-using-only-one--times-command.ly
input/lsr/expressive-marks.snippet-list
input/lsr/grid-lines--changing-their-appearance.ly [new file with mode: 0644]
input/lsr/grid-lines--emphasizing-rhythms-and-notes-synchronization.ly [new file with mode: 0644]
input/lsr/grid-lines-changing-their-appearance.ly [deleted file]
input/lsr/grid-lines-emphasizing-rhythms-and-notes-synchronization.ly [deleted file]
input/lsr/integrating-text-indications-in-metronome-marks.ly [new file with mode: 0644]
input/lsr/jazz-combo-template.ly
input/lsr/keyboards.snippet-list
input/lsr/piano-template-simple.ly
input/lsr/piano-template-with-centered-lyrics.ly
input/lsr/piano-template-with-melody-and-lyrics.ly
input/lsr/removing-the-first-empty-line.ly [new file with mode: 0644]
input/lsr/rhythms.snippet-list
input/lsr/setting-hairpin-behavior-at-bar-lines.ly [new file with mode: 0644]
input/lsr/staff-notation.snippet-list
input/lsr/text.snippet-list
input/lsr/tweaks-and-overrides.snippet-list
input/lsr/unfretted-strings.snippet-list
input/lsr/vocal-ensemble-template-with-automatic-piano-reduction.ly

index 1c39226b6cc575679480ac8dd6bc3afbff98e77c..817446ecd11fe08d14fa3219ce85de22e9409e8c 100644 (file)
@@ -1,61 +1,60 @@
 %% Do not edit this file; it is auto-generated from input/new
 %% This file is in the public domain.
-\version "2.11.43"
+\version "2.11.45"
 \header {
-  lsrtags = "expressive-marks,text,tweaks-and-overrides"
+  lsrtags = "expressive-marks,tweaks-and-overrides"
   texidoc = "
 Using Scheme code to override the stencil for @code{MetronomeMark}
 objects, this example allows the creation of metronome marks which include
-text directions.  The function @code{\tempoChangeMarkup} is called with three
-strings: the text label, note duration, and beats per minute.  To print the
-new metronome mark, this is followed by the standard @code{\tempo} command.
+text directions.  The function @code{\movement} is called with three
+arguments: the text label, note duration, and beats per minute.
 "
   doctitle = "Adding text indications to metronome marks"
 } % begin verbatim
 
-% Thanks to Alexander Kobel for this snippet
+#(define-markup-command (mvt layout props arg) (markup?)
+  (interpret-markup layout props
+     (markup #:huge #:bold arg)))
 
-tempoMarkLabelSize = #0
-tempoMarkNoteSize = #-6
+#(define (string->duration duration-string)
+  "Parse the `duration-string', e.g. ''4..'' or ''breve.'', and return a duration object."
+  (let* ((length (string-length duration-string))
+         (dot-index (or (string-index duration-string #\.) length))
+         (len (substring duration-string 0 dot-index))
+         (dots (- length dot-index)))
+   (ly:make-duration (cond ((string=? len "breve") -1)
+                           ((string=? len "longa") -2)
+                           ((string=? len "maxima") -3)
+                           (else (log2 (string->number len))))
+                     dots 1 1)))
 
-#(define (tempoChangeMarkupFactory grob label noteValue tempo)
- (interpret-markup
-  (ly:grob-layout grob)
-  (ly:grob-alist-chain grob (ly:output-def-lookup (ly:grob-layout grob) 'text-font-defaults))
-  (markup
-   #:fontsize tempoMarkLabelSize #:italic #:concat (label (if (string-null? label) "(" " (" ))
-   #:hspace -1
-   #:fontsize tempoMarkNoteSize #:general-align Y DOWN #:note noteValue UP
-   #:fontsize tempoMarkLabelSize #:italic #:concat( "= " tempo ")" )
-  )
- ))
+movement = #(define-music-function (parser location text duration count music)
+                        (string? string? integer? ly:music?)
+   (define (format-movement-markup dur count context)
+     (markup #:mvt text #:hspace 1
+             #:concat ("(" #:general-align Y DOWN #:smaller #:note duration 1)
+             "="
+             #:concat ((number->string count) ")")))
+  #{
+    \set Score.metronomeMarkFormatter = #$format-movement-markup
+    \set Score.tempoWholesPerMinute = #$(ly:moment-mul (ly:make-moment count 1)
+                                         (ly:duration-length
+                                           (string->duration duration)))
+    \set Score.tempoUnitDuration = #$(string->duration duration)
+    \set Score.tempoUnitCount = $count
+    $music
+    \set Score.metronomeMarkFormatter = #format-metronome-markup
+  #})
 
-#(define (tempoChangeStencil label noteValue tempo)
- (lambda (grob)
-  (tempoChangeMarkupFactory grob label noteValue tempo)
- ))
+\layout { ragged-right = ##f }
 
-tempoChangeMarkup = #(define-music-function (parser location label noteValue tempo) (string? string? string?)
-       #{
-         \once \override Score.MetronomeMark #'stencil = #(tempoChangeStencil $label $noteValue $tempo)
-       #})
-
-\relative c' {
-  \time 4/4
-  \clef treble
-  % initialize the override
-  \tempoChangeMarkup #"Moderato" #"4" #"63"
-  % markup is printed
-  \tempo 4 = 63
-  c4 d e f
-  g a b c
-  \time 6/4
-  \mark \default
-  \tempoChangeMarkup #"presto" #"2." #"90"
-  \tempo 2. = 90
-  c2. g \break
-  e \tempoChangeMarkup #"handling collision with RehearsalMark" #"4" #"120" \tempo 4 = 120 c
-  \time 4/4
-  \mark \default
-  c1
+\relative c' { 
+  \time 3/4
+  \movement "Allegro" "2." #92
+  c2 e4
+  g2.
+  \movement "Moderato" "4" #104
+  f4 e d
+  \tempo 4 = 92
+  c2.
 }
index d438c660039f3deb97ae6723f422b5e304c2f1c5..801371d9ebacea009ab833ef910e2e2cb6b79a8f 100644 (file)
@@ -11,7 +11,7 @@ Since staff lines are in a lower layer than most other grobs, this
 white box will not overlap any other grob. 
 
 "
-  doctitle = "Blanking staff lines using the \whiteout command"
+  doctitle = "Blanking staff lines using the \\whiteout command"
 } % begin verbatim
 \relative {
   \override TextScript #'extra-offset = #'(2 . 4)
index 42c01eb15ac3fbb9254afc306e939bf4fa3a9cb7..3d1579ba3c293026a0e3350b31c3f9126f9b1eb9 100644 (file)
@@ -1,3 +1,4 @@
 positioning-segno-and-coda-with-line-break.ly
+removing-the-first-empty-line.ly
 beams-across-line-breaks.ly
 adding-an-extra-staff-at-a-line-break.ly
index 88f92be783f082c01bc9138f6b275e261591cd65..58bde649d28938c44abf949384c7020ae9a02ae4 100644 (file)
@@ -12,7 +12,7 @@ snippet should present an optically pleasing combination of railtracks
 and a fermata.
 
 "
-  doctitle = "Caesura \"railtracks\" with fermata"
+  doctitle = "Caesura (\"railtracks\") with fermata"
 } % begin verbatim
 {
   c''2.
index 93a63b36d1dac18338e1520e09482c3be6eaa9e6..f4035da427e80f1375fb636b84947c49da24c459 100644 (file)
@@ -10,7 +10,7 @@ To make the @code{\\flageolet} circle smaller use the following Scheme
 function. 
 
 "
-  doctitle = "Changing \flageolet mark size"
+  doctitle = "Changing \\flageolet mark size"
 } % begin verbatim
 smallFlageolet = #(let ((m (make-music 'ArticulationEvent
                           'articulation-type "flageolet")))
index c778433e45bd6b4cd5ffe2027fd4eae83fb7fa1a..59b362f2bad9a9de858bc3663e0271d723014d11 100644 (file)
@@ -15,7 +15,7 @@ Therefore, @code{measureLength} has to be set manually, using the
 the second argument of @code{\\compressMusic}. 
 
 "
-  doctitle = "Changing time signatures inside a polymetric section using \compressMusic"
+  doctitle = "Changing time signatures inside a polymetric section using \\compressMusic"
 } % begin verbatim
 \layout {
   \context {
index 2a06f69aae88e52c99c37aaf11a0abe529f4dab3..f124d363741addad425e57e86b4aec65257c483b 100644 (file)
@@ -3,7 +3,7 @@
 \version "2.11.38"
 
 \header {
-  lsrtags = "simultaneous-notes, chords"
+  lsrtags = "simultaneous-notes, chords, keyboards"
 
   texidoc = "
 Clusters are a device to denote that a complete range of notes is to be
index 077ee0a5c4e06888538a37809dbf630067bc6c42..51f5899a61ed6104db032de71b69dc3ae93b7e3f 100644 (file)
@@ -3,7 +3,7 @@
 \version "2.11.38"
 
 \header {
-  lsrtags = "editorial-annotations, chords"
+  lsrtags = "editorial-annotations, chords, keyboards"
 
   texidoc = "
 The placement of fingering numbers can be controlled precisely.
diff --git a/input/lsr/creating-slurs-across-voices.ly b/input/lsr/creating-slurs-across-voices.ly
new file mode 100644 (file)
index 0000000..9ee396c
--- /dev/null
@@ -0,0 +1,26 @@
+%% Do not edit this file; it is auto-generated from LSR http://lsr.dsi.unimi.it
+%% This file is in the public domain.
+\version "2.11.38"
+
+\header {
+  lsrtags = "expressive-marks, keyboards, unfretted-strings"
+
+  texidoc = "
+In some situations, you may want to create slurs between notes from
+different voices.
+
+The solution is to add invisible notes to one of the voices, using
+\\hideNotes.
+
+This example is bar 235 of the Ciaconna from Bach's 2nd Partita for
+solo violin, BWV 1004.
+
+"
+  doctitle = "Creating slurs across voices"
+} % begin verbatim
+\relative
+<<
+  {d16( a') s a s a[ s a] s a[ s a] } \\
+  {\slurUp bes,[ s e]( \hideNotes a) \unHideNotes f[( \hideNotes a) \unHideNotes fis]( \hideNotes a) \unHideNotes g[( \hideNotes a) \unHideNotes gis]( \hideNotes a) }
+>>
+
index c7384495d75b234dc0cf25416bd5973f3cb208d0..3f07692be3c669808f58dd40abc04d370c0dc6db 100644 (file)
@@ -3,7 +3,7 @@
 \version "2.11.38"
 
 \header {
-  lsrtags = "vocal-music, unfretted-strings, midi"
+  lsrtags = "vocal-music, keyboards, unfretted-strings, midi"
 
   texidoc = "
 Problem: How to know which @code{midiInstrument} would be best for your
index bfee2c190ed172a17ad798127f9034a69e38d6d5..de93af3949b810beccf713999caa58ede0f0034a 100644 (file)
@@ -5,8 +5,8 @@ changing-the-appearance-of-a-slur-from-solid-to-dotted-or-dashed.ly
 embedding-native-postscript-in-a--markup-block.ly
 default-direction-of-stems-on-the-center-line-of-the-staff.ly
 changing-a-single-notes-size-in-a-chord.ly
-grid-lines-emphasizing-rhythms-and-notes-synchronization.ly
+grid-lines--emphasizing-rhythms-and-notes-synchronization.ly
+grid-lines--changing-their-appearance.ly
 controlling-the-placement-of-chord-fingerings.ly
 allowing-fingerings-to-be-printed-inside-the-staff.ly
 blanking-staff-lines-using-the--whiteout-command.ly
-grid-lines-changing-their-appearance.ly
index baef1614d9816bebed0a6001540c86e6dc8193d6..c8cf651fbbdae141e31d6fb7b818ae9df3722cf5 100644 (file)
@@ -10,7 +10,7 @@ PostScript code can be directly inserted inside a @code{\\markup}
 block. 
 
 "
-  doctitle = "Embedding native PostScript in a \markup block"
+  doctitle = "Embedding native PostScript in a \\markup block"
 } % begin verbatim
 % PostScript is a registred trademark by Adobe Systems Inc.
 
index f7ad762465e3078574fbd345c5695e71f4fa67bc..19437456aee12a2c9ac816f83f68260a5a33f4ae 100644 (file)
@@ -19,7 +19,7 @@ For more information about @code{make-moment}, see \"Time
 administration\". 
 
 "
-  doctitle = "Entering several tuplets using only one \times command"
+  doctitle = "Entering several tuplets using only one \\times command"
 } % begin verbatim
 \relative c' {
   \time 2/4
index ee4a738ab0a218b6d822ca13ef738c4dd07d8faa..bea8cafa9aafd4e6dce4874887fc31154322eb4f 100644 (file)
@@ -1,16 +1,18 @@
 combining-dynamics-with-markup-texts.ly
 creating-text-spanners.ly
 adding-beams,-slurs,-ties-etc.-when-using-tuplet-and-non-tuplet-rythms..ly
+creating-slurs-across-voices.ly
 changing-the-appearance-of-a-slur-from-solid-to-dotted-or-dashed.ly
 caesura-railtracks-with-fermata.ly
 printing-metronome-and-rehearsal-marks-below-the-staff.ly
 creating-real-parenthesized-dynamics.ly
+creating-simultaneous-rehearsal-marks.ly
 center-text-below-hairpin-dynamics.ly
 contemporary-glissando.ly
 adding-parentheses-around-an-expressive-mark-or-chordal-note.ly
 adding-text-indications-to-metronome-marks.ly
-line-arrows.ly
+setting-hairpin-behavior-at-bar-lines.ly
 changing--flageolet-mark-size.ly
 piano-template-with-centered-dynamics.ly
-creating-simultaneous-rehearsal-marks.ly
+line-arrows.ly
 broken-crescendo-hairpin.ly
diff --git a/input/lsr/grid-lines--changing-their-appearance.ly b/input/lsr/grid-lines--changing-their-appearance.ly
new file mode 100644 (file)
index 0000000..d2534d9
--- /dev/null
@@ -0,0 +1,54 @@
+%% Do not edit this file; it is auto-generated from LSR http://lsr.dsi.unimi.it
+%% This file is in the public domain.
+\version "2.11.38"
+
+\header {
+  lsrtags = "editorial-annotations"
+
+  texidoc = "
+The appearance of grid lines can be changed by overriding some of their
+properties.
+
+"
+  doctitle = "Grid lines: changing their appearance"
+} % begin verbatim
+\layout {
+ \context {
+   \Staff
+   % set up grids
+   \consists "Grid_point_engraver"
+   % set the grid interval to one quarter note
+   gridInterval = #(ly:make-moment 1 4)
+  }
+}
+
+\new Score \with {
+ \consists "Grid_line_span_engraver"
+ % this moves them to the right half a staff space
+ \override NoteColumn #'X-offset = #-0.5
+}
+
+\new ChoirStaff <<
+  \new Staff {
+    \relative c'' {
+      \stemUp
+      c'4. d8 e8 f g4
+    }
+  }
+  \new Staff {
+    \relative c {
+      % this moves them up one staff space from the default position
+      \override Score.GridLine #'extra-offset = #'(0.0 . 1.0)
+      \stemDown
+      \clef bass
+      \once \override Score.GridLine #'thickness = #5.0
+      c4
+      \once \override Score.GridLine #'thickness = #1.0
+      g'
+      \once \override Score.GridLine #'thickness = #3.0
+      f
+      \once \override Score.GridLine #'thickness = #5.0
+      e
+    }
+  }
+>>
diff --git a/input/lsr/grid-lines--emphasizing-rhythms-and-notes-synchronization.ly b/input/lsr/grid-lines--emphasizing-rhythms-and-notes-synchronization.ly
new file mode 100644 (file)
index 0000000..66bb52f
--- /dev/null
@@ -0,0 +1,75 @@
+%% Do not edit this file; it is auto-generated from LSR http://lsr.dsi.unimi.it
+%% This file is in the public domain.
+\version "2.11.38"
+
+\header {
+  lsrtags = "editorial-annotations"
+
+  texidoc = "
+Regular vertical lines can be drawn between staves to show notes
+synchronization; however, in case of monophonic music, you may want to
+make the second stave invisible, and make the lines shorter like in
+this snippet.
+
+"
+  doctitle = "Grid lines: emphasizing rhythms and notes synchronization"
+} % begin verbatim
+%% sets of grid
+\layout {
+ \context {
+   \Staff
+   \consists "Grid_point_engraver"
+   gridInterval = #(ly:make-moment 1 8)
+%% lines length
+   \override GridPoint #'Y-extent = #'(6 . 0)
+ }
+ \context {
+   \StaffGroup
+   \remove "System_start_delimiter_engraver"
+ }
+}
+
+\layout {
+ ragged-right = ##t
+}
+\new Score
+\with {
+ \consists "Grid_line_span_engraver"
+%% centers grid lines  horizontally below noteheads
+ \override NoteColumn #'X-offset = #-0.5
+}
+
+\new ChoirStaff <<
+ \new Staff
+ {
+   \time 12/8
+   \stemUp
+   \relative {
+   c'4. d8 e8 f g4 f8 e8.[ d16 c8] }
+ }
+ \new Staff
+ {
+%% making sure the lines will be placed outside the Staff
+   \override Score.GridLine #'extra-offset = #'( 0.0 . -4.0 )
+
+%% hides staff and notes so that only the grid lines are visible
+   \override NoteHead #'transparent = ##t
+   \override NoteHead #'no-ledgers = ##t
+   \override Stem #'transparent = ##t
+   \override Beam #'transparent = ##t
+   \override Staff.BarLine #'transparent = ##t
+   \override Staff.StaffSymbol #'line-count = #0
+   \override Staff.TimeSignature #'transparent = ##t
+   \override Staff.Clef #'transparent = ##t
+
+% you have to put 'dummy' notes here to force regular grid spacing...
+ \once  \override Score.GridLine #'thickness = #4.0
+ c8   c8   c8
+ \once  \override Score.GridLine #'thickness = #3.0
+ c8   c8   c8
+ \once  \override Score.GridLine #'thickness = #4.0
+ c8   c8   c8
+ \once  \override Score.GridLine #'thickness = #3.0
+ c8   c8   c8
+ }
+>>
diff --git a/input/lsr/grid-lines-changing-their-appearance.ly b/input/lsr/grid-lines-changing-their-appearance.ly
deleted file mode 100644 (file)
index d2534d9..0000000
+++ /dev/null
@@ -1,54 +0,0 @@
-%% Do not edit this file; it is auto-generated from LSR http://lsr.dsi.unimi.it
-%% This file is in the public domain.
-\version "2.11.38"
-
-\header {
-  lsrtags = "editorial-annotations"
-
-  texidoc = "
-The appearance of grid lines can be changed by overriding some of their
-properties.
-
-"
-  doctitle = "Grid lines: changing their appearance"
-} % begin verbatim
-\layout {
- \context {
-   \Staff
-   % set up grids
-   \consists "Grid_point_engraver"
-   % set the grid interval to one quarter note
-   gridInterval = #(ly:make-moment 1 4)
-  }
-}
-
-\new Score \with {
- \consists "Grid_line_span_engraver"
- % this moves them to the right half a staff space
- \override NoteColumn #'X-offset = #-0.5
-}
-
-\new ChoirStaff <<
-  \new Staff {
-    \relative c'' {
-      \stemUp
-      c'4. d8 e8 f g4
-    }
-  }
-  \new Staff {
-    \relative c {
-      % this moves them up one staff space from the default position
-      \override Score.GridLine #'extra-offset = #'(0.0 . 1.0)
-      \stemDown
-      \clef bass
-      \once \override Score.GridLine #'thickness = #5.0
-      c4
-      \once \override Score.GridLine #'thickness = #1.0
-      g'
-      \once \override Score.GridLine #'thickness = #3.0
-      f
-      \once \override Score.GridLine #'thickness = #5.0
-      e
-    }
-  }
->>
diff --git a/input/lsr/grid-lines-emphasizing-rhythms-and-notes-synchronization.ly b/input/lsr/grid-lines-emphasizing-rhythms-and-notes-synchronization.ly
deleted file mode 100644 (file)
index 66bb52f..0000000
+++ /dev/null
@@ -1,75 +0,0 @@
-%% Do not edit this file; it is auto-generated from LSR http://lsr.dsi.unimi.it
-%% This file is in the public domain.
-\version "2.11.38"
-
-\header {
-  lsrtags = "editorial-annotations"
-
-  texidoc = "
-Regular vertical lines can be drawn between staves to show notes
-synchronization; however, in case of monophonic music, you may want to
-make the second stave invisible, and make the lines shorter like in
-this snippet.
-
-"
-  doctitle = "Grid lines: emphasizing rhythms and notes synchronization"
-} % begin verbatim
-%% sets of grid
-\layout {
- \context {
-   \Staff
-   \consists "Grid_point_engraver"
-   gridInterval = #(ly:make-moment 1 8)
-%% lines length
-   \override GridPoint #'Y-extent = #'(6 . 0)
- }
- \context {
-   \StaffGroup
-   \remove "System_start_delimiter_engraver"
- }
-}
-
-\layout {
- ragged-right = ##t
-}
-\new Score
-\with {
- \consists "Grid_line_span_engraver"
-%% centers grid lines  horizontally below noteheads
- \override NoteColumn #'X-offset = #-0.5
-}
-
-\new ChoirStaff <<
- \new Staff
- {
-   \time 12/8
-   \stemUp
-   \relative {
-   c'4. d8 e8 f g4 f8 e8.[ d16 c8] }
- }
- \new Staff
- {
-%% making sure the lines will be placed outside the Staff
-   \override Score.GridLine #'extra-offset = #'( 0.0 . -4.0 )
-
-%% hides staff and notes so that only the grid lines are visible
-   \override NoteHead #'transparent = ##t
-   \override NoteHead #'no-ledgers = ##t
-   \override Stem #'transparent = ##t
-   \override Beam #'transparent = ##t
-   \override Staff.BarLine #'transparent = ##t
-   \override Staff.StaffSymbol #'line-count = #0
-   \override Staff.TimeSignature #'transparent = ##t
-   \override Staff.Clef #'transparent = ##t
-
-% you have to put 'dummy' notes here to force regular grid spacing...
- \once  \override Score.GridLine #'thickness = #4.0
- c8   c8   c8
- \once  \override Score.GridLine #'thickness = #3.0
- c8   c8   c8
- \once  \override Score.GridLine #'thickness = #4.0
- c8   c8   c8
- \once  \override Score.GridLine #'thickness = #3.0
- c8   c8   c8
- }
->>
diff --git a/input/lsr/integrating-text-indications-in-metronome-marks.ly b/input/lsr/integrating-text-indications-in-metronome-marks.ly
new file mode 100644 (file)
index 0000000..4329aea
--- /dev/null
@@ -0,0 +1,70 @@
+%% Do not edit this file; it is auto-generated from LSR http://lsr.dsi.unimi.it
+%% This file is in the public domain.
+\version "2.11.38"
+
+\header {
+  lsrtags = "rhythms, text"
+
+  texidoc = "
+This function allows you to change the tempo and specify text
+directions at the same time, using one single command.It takes three
+arguments: the text to be printed (the string has to be introduced with
+a # character), the duration (it has to be specified as a text string,
+between double quotes and with a #), and the metronome tempo (as a
+number). This way, the given tempo will be taken into account in MIDI
+output, but the normal @code{\\tempo} command will remain unaffected. 
+
+"
+  doctitle = "Integrating text indications in metronome marks"
+} % begin verbatim
+#(define ((make-format-movement-markup-function text) duration count context)
+ (markup #:huge #:bold text #:hspace 1
+         "("
+         #:general-align Y DOWN #:smaller
+            #:note-by-number (ly:duration-log duration)
+                             (ly:duration-dot-count duration)
+                             1
+         "="
+         (number->string count)
+         ")"))
+
+
+#(define (string->duration duration-string)
+ "Parse the `duration-string', e.g. ''4..'' or ''breve.'', and return a duration object."
+ (let* ((length (string-length duration-string))
+        (dot-index (or (string-index duration-string #\.) length))
+        (len (substring duration-string 0 dot-index))
+        (dots (- length dot-index)))
+  (ly:make-duration (cond ((string=? len "breve") -1)
+                          ((string=? len "longa") -2)
+                          ((string=? len "maxima") -3)
+                          (else (log2 (string->number len))))
+                    dots 1 1)))
+
+movement =
+#(define-music-function (parser location text duration count music)
+
+                       (string? string? integer? ly:music?)
+ #{
+   \set Score.metronomeMarkFormatter = #(make-format-movement-markup-function $text)
+   \set Score.tempoWholesPerMinute = #$(ly:moment-mul (ly:make-moment count 1)
+                                         (ly:duration-length
+                                           (string->duration duration)))
+   \set Score.tempoUnitDuration = #$(string->duration duration)
+   \set Score.tempoUnitCount = #$count
+   $music
+   \set Score.metronomeMarkFormatter = #format-metronome-markup
+ #})
+
+\layout { ragged-right = ##f }
+
+\relative c' {
+  \time 3/4
+  \movement "Allegro" "2." #96
+  c2 e4
+  g2.
+  \movement "Moderato" "4" #104
+  f4 e d
+  \tempo 4 = 92
+  c2.
+}
index 334b6b64992510b36f607c8dc069981487365692..23e688906fbafe3b33e5d1095e557970373a4eea 100644 (file)
@@ -3,7 +3,7 @@
 \version "2.11.38"
 
 \header {
-  lsrtags = "percussion, template"
+  lsrtags = "keyboards, percussion, template"
 
   texidoc = "
 This is quite an advanced template, for a jazz ensemble. Note that all
index 2da59b2fd4983ea5e5b27c5ae8b99b11435f1a6a..aac210db57e5d92ee0e4f107222be19a579fb0fc 100644 (file)
@@ -1 +1,10 @@
 piano-template-with-centered-dynamics.ly
+clusters.ly
+creating-slurs-across-voices.ly
+jazz-combo-template.ly
+vocal-ensemble-template-with-automatic-piano-reduction.ly
+piano-template-simple.ly
+controlling-the-placement-of-chord-fingerings.ly
+piano-template-with-melody-and-lyrics.ly
+piano-template-with-centered-lyrics.ly
+demo-midiinstruments.ly
index f34bda65ceac745fdb41264b9c95527757b0955d..0b538ea71ba0c5756d1d386aea85a31d82234453 100644 (file)
@@ -3,7 +3,7 @@
 \version "2.11.38"
 
 \header {
-  lsrtags = "template"
+  lsrtags = "keyboards, template"
 
   texidoc = "
 Here is a simple piano staff with some notes.
index 6f4e52f401bc595c6e9da5646248e32f3d19b170..512b0c74ff710ed52d1ac3425f03768fa2f8bfcb 100644 (file)
@@ -3,7 +3,7 @@
 \version "2.11.38"
 
 \header {
-  lsrtags = "text, template"
+  lsrtags = "text, keyboards, template"
 
   texidoc = "
 Instead of having a full staff for the melody and lyrics, you can place
index 32d1b69646b97481d7240da8b923a244c5978202..694535d7055ceddcac89403174d129d6dd3466c6 100644 (file)
@@ -3,7 +3,7 @@
 \version "2.11.38"
 
 \header {
-  lsrtags = "vocal-music, template"
+  lsrtags = "vocal-music, keyboards, template"
 
   texidoc = "
 Here is a typical song format: one staff with the melody and lyrics,
diff --git a/input/lsr/removing-the-first-empty-line.ly b/input/lsr/removing-the-first-empty-line.ly
new file mode 100644 (file)
index 0000000..2df9dbb
--- /dev/null
@@ -0,0 +1,52 @@
+%% Do not edit this file; it is auto-generated from LSR http://lsr.dsi.unimi.it
+%% This file is in the public domain.
+\version "2.11.38"
+
+\header {
+  lsrtags = "staff-notation, tweaks-and-overrides, breaks"
+
+  texidoc = "
+The first empty staff can also be removed from the score by setting the
+@code{VerticalAxisGroup} property @code{remove-first}. This can be done
+globally inside the @code{\\layout} block, or locally inside the
+specific staff that should be removed.  In the latter case, you have to
+specify the context (@code{Staff} applies only to the current staff) in
+front of the property.
+
+The lower staff of the second staff group is not removed, because the
+setting applies only to the specific staff inside of which it is
+written. 
+
+"
+  doctitle = "Removing the first empty line"
+} % begin verbatim
+\layout {
+  \context { 
+    \RemoveEmptyStaffContext 
+    % To use the setting globally, uncomment the following line:
+    % \override VerticalAxisGroup #'remove-first = ##t
+  }
+}
+\new StaffGroup <<
+  \new Staff \relative c' {
+    e4 f g a \break
+    c1
+  }
+  \new Staff {
+    % To use the setting globally, comment this line,
+    % uncomment the line in the \layout block above
+    \override Staff.VerticalAxisGroup #'remove-first = ##t
+    R1 \break
+    R
+  }
+>>
+\new StaffGroup <<
+  \new Staff \relative c' {
+    e4 f g a \break
+    c1
+  }
+  \new Staff {
+    R1 \break
+    R
+  }
+>>
index 4305d0602484126608704d6b3aadec910b86d3a6..8222963f95cfb6afcc0d9c808b58447fdc06b013 100644 (file)
@@ -10,6 +10,7 @@ heavily-customized-polymetric-time-signatures.ly
 positioning-multi--measure-rests.ly
 using-ties-with-arpeggios.ly
 forcing-rehearsal-marks-to-start-from-a-given-letter-or-number.ly
+integrating-text-indications-in-metronome-marks.ly
 compound-time-signatures.ly
 modifying-tuplet-bracket-length.ly
 printing-metronome-and-rehearsal-marks-below-the-staff.ly
diff --git a/input/lsr/setting-hairpin-behavior-at-bar-lines.ly b/input/lsr/setting-hairpin-behavior-at-bar-lines.ly
new file mode 100644 (file)
index 0000000..b26a862
--- /dev/null
@@ -0,0 +1,19 @@
+%% Do not edit this file; it is auto-generated from input/new
+%% This file is in the public domain.
+\version "2.11.46"\r
+\header {\r
+  lsrtags = "expressive-marks"\r
+  texidoc = "If the note which ends a hairpin falls on a downbeat,\r
+the hairpin stops at the bar line immediately preceding.  This behavior\r
+can be controlled by overriding the @code{'to-barline} property.\r
+"\r
+  doctitle = "Setting hairpin behavior at bar lines"\r
+}\r
+\r
+\relative c'' {\r
+  e4\< e2.\r
+  e1\!\r
+  \override Hairpin #'to-barline = ##f\r
+  e4\< e2.\r
+  e1\!\r
+}\r
index 4c4ac2dc4be79437447da21a11c0e011bb06d9bb..6ccdb8a7b77cd0ddb888a33891d2ae7ef609194b 100644 (file)
@@ -1,6 +1,7 @@
 creating-blank-staves.ly
-incipit.ly
+removing-the-first-empty-line.ly
 mensurstriche-layout-bar-lines-between-the-staves.ly
+incipit.ly
 adding-ambitus-per-voice.ly
 changing-the-number-of-lines-in-a-staff.ly
 adding-an-extra-staff-at-a-line-break.ly
index 95284862b9606d2e977d0624a6101244bc0e5555..c8f4874b1ea2b97b7bf022c89933a067d0e92897 100644 (file)
@@ -1,26 +1,26 @@
-creating-text-spanners.ly
-creating-real-parenthesized-dynamics.ly
 embedding-native-postscript-in-a--markup-block.ly
-center-text-below-hairpin-dynamics.ly
-demonstrating-all-headers.ly
 printing-marks-at-the-end-of-a-line-or-a-score.ly
 changing-the-default-text-font-family.ly
-combining-two-parts-on-the-same-staff.ly
-aligning-and-centering-instrument-names.ly
 outputting-the-version-number.ly
+aligning-and-centering-instrument-names.ly
 formatting-lyrics-syllables.ly
-adding-text-indications-to-metronome-marks.ly
+vocal-ensemble-template-with-lyrics-aligned-below-and-above-the-staves.ly
+markup-lines.ly
+printing-marks-on-every-staff.ly
+blanking-staff-lines-using-the--whiteout-command.ly
+integrating-text-indications-in-metronome-marks.ly
+adjusting-lyrics-vertical-spacing.ly
+creating-text-spanners.ly
+creating-real-parenthesized-dynamics.ly
+center-text-below-hairpin-dynamics.ly
+demonstrating-all-headers.ly
+combining-two-parts-on-the-same-staff.ly
 how-to-put-ties-between-syllables-in-lyrics.ly
 combining-dynamics-with-markup-texts.ly
-vocal-ensemble-template-with-lyrics-aligned-below-and-above-the-staves.ly
 aligning-marks-with-various-notation-objects.ly
-markup-lines.ly
 ottava-text.ly
 creating-simultaneous-rehearsal-marks.ly
 three-sided-box.ly
-piano-template-with-centered-lyrics.ly
 utf-8.ly
-blanking-staff-lines-using-the--whiteout-command.ly
-printing-marks-on-every-staff.ly
-adjusting-lyrics-vertical-spacing.ly
+piano-template-with-centered-lyrics.ly
 aligning-lyrics.ly
index cb7a4e83906a72db12fb67ff0b3ad54c9cef6497..02fe9d7ade8a530055acd759607978a191dad73a 100644 (file)
@@ -12,6 +12,7 @@ positioning-multi--measure-rests.ly
 changing-the-staff-size.ly
 vertically-aligning-ossias-and-lyrics.ly
 changing-properties-for-individual-grobs.ly
+removing-the-first-empty-line.ly
 mensurstriche-layout-bar-lines-between-the-staves.ly
 printing-metronome-and-rehearsal-marks-below-the-staff.ly
 tweaking-clef-properties.ly
index bfcf6a78dcd6d1e2ca73de7f7052856b52d8c3b2..5ee803315fbd918d46e2093cc65ad6afbba92b11 100644 (file)
@@ -1,4 +1,5 @@
+string-quartet-template-with-separate-parts.ly
 string-quartet-template-simple.ly
 changing--flageolet-mark-size.ly
-string-quartet-template-with-separate-parts.ly
+creating-slurs-across-voices.ly
 demo-midiinstruments.ly
index 0b827bbedca61c8e9d6171e704edd1544843e3c9..bf4bcd4a490cfd132b8cd2edabac72b48415e57a 100644 (file)
@@ -3,7 +3,7 @@
 \version "2.11.38"
 
 \header {
-  lsrtags = "vocal-music, template"
+  lsrtags = "vocal-music, keyboards, template"
 
   texidoc = "
 This template adds an automatic piano reduction to the standard SATB