]> git.donarmstrong.com Git - lilypond.git/commitdiff
Doc: avoid using zero-duration spacers in examples
authorKeith OHara <k-ohara5a5a@oco.net>
Thu, 10 May 2012 01:42:59 +0000 (18:42 -0700)
committerKeith OHara <k-ohara5a5a@oco.net>
Sat, 16 Jun 2012 00:16:15 +0000 (17:16 -0700)
13 files changed:
Documentation/extending/scheme-tutorial.itely
Documentation/notation/changing-defaults.itely
Documentation/notation/keyboards.itely
Documentation/notation/pitches.itely
Documentation/notation/staff.itely
Documentation/notation/vocal.itely
Documentation/snippets/new/adding-orchestral-cues-to-a-vocal-score.ly
Documentation/snippets/new/redefining-grace-note-global-defaults.ly
input/regression/collision-dots-move.ly
input/regression/empty-chord.ly [new file with mode: 0644]
input/regression/morgenlied.ly
input/regression/typography-demo.ly
ly/grace-init.ly

index e34ea9afdbc265d53abbd8cb0b16ebcd31f41081..6f8622e8775bef2868af5d4f605c29bd2816c9e0 100644 (file)
@@ -1283,10 +1283,10 @@ know that
 
 @noindent
 will not work in LilyPond.  We could avoid this problem by attaching
-the articulation to a fake note,
+the articulation to an empty chord,
 
 @example
-@{ << \music s1*0-.-> @}
+@{ << \music <> -. -> >> @}
 @end example
 
 @noindent
index a5de489ca22344feab4958fd23a155445014d43f..4c3562d08d36ace16aad2f304f91556eb297a88d 100644 (file)
@@ -746,11 +746,11 @@ melody = \relative c'' {
   <<
     \new Staff <<
       \melody
-      s1*0^"Small, thicker stems, no time signature"
+      s4^"Small, thicker stems, no time signature"
     >>
     \new Staff \bla <<
       \melody
-      s1*0^"Different"
+      s4^"Different"
     >>
   >>
   \layout {
index e323958e52436d551eb9cfe2f2a94b27cc0b9509..c693aa91ac9fd086206916993be3acedda786813 100644 (file)
@@ -207,16 +207,19 @@ Overlapping notation can result when voices cross staves:
     \voiceOne
     % Make space for fingering in the cross-staff voice
     \once\override DynamicLineSpanner #'staff-padding = #3.4
-    e''2\p\< d''\> s1*0\!
+    e''2\p\< d''\>
+    c''1\!
   }
   \new Staff = "down" <<
     {
       \clef bass
       s4. e,8\rest g,2\rest
+      c1
     } \\ {
       c8\( g c'
       \change Staff = "up"
       e' g' b'-3 a' g'\)
+      f'1
     }
   >>
 >>
index 20e56de28fed1e31e5b973031782fb53dcc4bb04..d3d2d9a22039ea438ef69e35a98d4ddf2e802996 100644 (file)
@@ -1397,7 +1397,7 @@ clarinet.
 \transposition a
 c d e f
 \textLengthOn
-s1*0^\markup { Switch to B\flat clarinet }
+<>^\markup { Switch to B\flat clarinet }
 R1
 
 \key bes \major
index a8111bd7c47a7a1a096521fb9b4c5fe5b0727537..b6c06c5690d611b33d331c20399fec7ca5c16ded 100644 (file)
@@ -1298,7 +1298,7 @@ fluteNotes = \relative c'' {
 
 oboeNotes = \relative c'' {
   R1
-  s1*0^\markup { \tiny "flute" }
+  \new CueVoice { \set instrumentCueName = "flute" }
   \cueDuring #"flute" #UP { R1 }
   g2 c,
 }
@@ -1341,10 +1341,13 @@ oboeNotes = \relative c'' {
 }
 @end lilypond
 
-Markup can be used to show the name of the quoted instrument.  Also,
-if the cue notes require a change in clef, this can be done manually but
-the original clef should also be restored manually at the end of the cue
-notes.
+The name of the instrument playing the cue can be printed by setting
+the @code{instrumentCueName} property in a temporary @code{CueVoice}
+context.  The placement and style of the @code{instrumentCueName} is
+controlled by the @code{\instrumentSwitch} object, see
+@ref{Instrument names}.  If the cue notes require a change in clef,
+this can be done manually but the original clef should also be
+restored manually at the end of the cue notes.
 
 @lilypond[verbatim,quote]
 fluteNotes = \relative c'' {
@@ -1355,7 +1358,7 @@ bassoonNotes = \relative c {
   \clef bass
   R1
   \clef treble
-  s1*0^\markup { \tiny "flute" }
+  \new CueVoice { \set "instrumentCueName" = "flute" }
   \cueDuring #"flute" #UP { R1 }
   \clef bass
   g4. b8 d2
@@ -1381,7 +1384,7 @@ fluteNotes = \relative c'' {
 bassoonNotes = \relative c {
   \clef bass
   R1
-  s1*0^\markup { \tiny "flute" }
+  \new CueVoice { \set "instrumentCueName" = "flute" }
   \cueDuringWithClef #"flute" #UP #"treble" { R1 }
   g4. b8 d2
 }
@@ -1457,7 +1460,7 @@ bassoonNotes = \relative c {
   R1
   \tag #'part {
     \clef treble
-    s1*0^\markup { \tiny "flute" }
+    \new CueVoice { \set "instrumentCueName" = "flute" }
   }
   \cueDuring #"flute" #UP { R1 }
   \tag #'part \clef bass
index 361446bda79022449885bc8998bf9e88aa2b01a4..9d645b78e0c5e7cded77c25c27e10d1580f5f100 100644 (file)
@@ -2517,7 +2517,10 @@ pianoRH = \relative c'' {
   c4. g8
   % position name of cue-ing instrument just before the cue notes,
   % and above the staff
-  s1*0^\markup { \right-align { \tiny "Flute" } }
+  \new CueVoice {
+    \override InstrumentSwitch #'self-alignment-X = #RIGHT
+    \set instrumentCueName = "Flute"
+  }
   \cueDuring "flute" #UP { g4 bes4 }
 }
 pianoLH = \relative c { c4 <c' e> e, <g c> }
@@ -2556,7 +2559,11 @@ clarinet = \relative c' {
 pianoRH = \relative c'' {
   \transposition c'
   % position name of cue-ing instrument below the staff
-  s1*0_\markup { \right-align { \tiny "Clar." } }
+  \new CueVoice {
+    \override InstrumentSwitch #'self-alignment-X = #RIGHT
+    \override InstrumentSwitch #'direction = #DOWN
+    \set instrumentCueName = "Clar."
+  }
   \cueDuring "clarinet" #DOWN { c4. g8 }
   g4 bes4
 }
index ba53f5963efa1aaf89d36644fdc60088cd340f8d..479aa6b27bbed757223fc427c9885babf6d643c1 100644 (file)
@@ -27,7 +27,7 @@ cueWhile =
      \cueDuring $instrument #dir {
        \once \override TextScript #'self-alignment-X = #RIGHT
        \once \override TextScript #'direction = $dir
-       s1*0-\markup { \tiny #name }
+       <>-\markup { \tiny #name }
        $music
      }
    #})
index f40241d0805b8fe83e4ec96ea1370760aeaedc48..2fcce37c2cd77a9316e524f243c218b0ad7dea8e 100644 (file)
@@ -16,7 +16,7 @@ other effects may be obtained.
 }
 
 startAcciaccaturaMusic = {
-  s1*0(
+  <>(
   \override Flag #'stroke-style = #"grace"
   \slurDashed
 }
@@ -24,7 +24,7 @@ startAcciaccaturaMusic = {
 stopAcciaccaturaMusic = {
   \revert Flag #'stroke-style
   \slurSolid
-  s1*0)
+  <>)
 }
 
 \relative c'' {
index 71fbdabb608fced5c564a9239365e0bd8134bff7..ca8736f356051d1f0730be5101c7837942f5a382 100644 (file)
@@ -1,7 +1,7 @@
 \version "2.14.0"
 \header {
-    
-    texidoc = "If dotted note heads must remain on the left side,  
+
+    texidoc = "If dotted note heads must remain on the left side,
 collision resolution moves the dots to the right."
 
 }
@@ -11,14 +11,12 @@ collision resolution moves the dots to the right."
 \relative c {
   \clef bass
   \override Staff.NoteCollision #'prefer-dotted-right = ##t
-  s1*0^"prefer-dotted-right = #t"
-  << <b g' >4 \\ { c8. d16 } >>
+  << <b g' >4 ^"prefer-dotted-right = #t" \\ { c8. d16 } >>
   << <b g' >4 \\ { d8. d16 } >>
   << <b g' >4 \\ { f'8. d16 } >>
   << <c a' >4 \\ { g'8. d16 } >>
   \override Staff.NoteCollision #'prefer-dotted-right = ##f
-  s1*0^"prefer-dotted-right = #f"
-  << <b g' >4 \\ { c8. d16 } >>
+  << <b g' >4 ^"prefer-dotted-right = #f" \\ { c8. d16 } >>
   << <b g' >4 \\ { d8. d16 } >>
   << <b g' >4 \\ { f'8. d16 } >>
   << <c a' >4 \\ { g'8. d16 } >>
diff --git a/input/regression/empty-chord.ly b/input/regression/empty-chord.ly
new file mode 100644 (file)
index 0000000..5fae1c0
--- /dev/null
@@ -0,0 +1,10 @@
+\version "2.14"
+
+\header { texidoc = "Empty chords accept articulations, occupy no time,
+                     and leave the current duration unchanged."
+        }
+
+\relative c' {
+  r4 e8( g <>) ^"sul D" \f \> \repeat unfold 8 { c-. } <>\sfz
+  <>\downbow \repeat unfold 2 { c g } c1\> <>\enddecr
+}
index 387bd4911537ab463e90a5df7522cac865e62247..182cc640864970706951b12db58e3df5069121df 100644 (file)
@@ -52,8 +52,9 @@ modernAccidentals = {
 melody =    \relative c'' \repeat volta 2 \new Voice = "singer" {
     \time 6/8
     \autoBeamOff
-    s1*0^\markup { \bold \large\larger\larger { \hspace #-3.0 Lieblich, etwas geschwind } }
-  R2.
+    << s2.^\markup { \bold \large\larger\larger { \hspace #-3.0 Lieblich, etwas geschwind } }
+       R2.
+    >>
   r4 r8 c4 g8 |
   e4 c8
     <<
index d20c6fe82532bdb32e9057463ae5617ceb96b668..d6d87d15d8f1d10e170d7d7daf9638efa1d85f73 100644 (file)
@@ -33,8 +33,9 @@ modernAccidentals = {
 melody =    \relative c'' \repeat volta 2 \context Voice = "singer" {
   \time 6/8
   \autoBeamOff
-  s1*0^\markup {  \larger { \hspace #-3.0 Lieblich, etwas geschwind } }
-  R2.
+  << s2.^\markup {  \larger { \hspace #-3.0 Lieblich, etwas geschwind } }
+     R2.
+  >>
   r4 r8 c4 g8 |
   \acciaccatura { f16 }  e4 c8
   <<
index 4ee3be0179e3a6c155d035eb557d19bc5f78bf8f..107592a2feefbe32c67653e559f94cdab3f9c7c1 100644 (file)
@@ -7,26 +7,26 @@ stopGraceSlur = #(make-music 'SlurEvent 'span-direction STOP 'spanner-id "grace"
 startGraceMusic =  {
 }
 
-stopGraceMusic =  { 
+stopGraceMusic =  {
 }
 
 startAppoggiaturaMusic =
- {
-    s1*0\startGraceSlur
+{
+    <>\startGraceSlur
 }
 
-stopAppoggiaturaMusic =  { 
-    s1*0\stopGraceSlur
+stopAppoggiaturaMusic =  {
+    <>\stopGraceSlur
 }
 
 startAcciaccaturaMusic =  {
-    s1*0\startGraceSlur
+    <>\startGraceSlur
     \override Flag  #'stroke-style = #"grace"
 }
 
 stopAcciaccaturaMusic =  {
     \revert Flag #'stroke-style
-    s1*0\stopGraceSlur
+    <>\stopGraceSlur
 }
 
 startSlashedGraceMusic =  {