From: Keith OHara Date: Thu, 10 May 2012 01:42:59 +0000 (-0700) Subject: Doc: avoid using zero-duration spacers in examples X-Git-Tag: release/2.15.41-1~43 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=4ab6e4df934e57c51dbbdbf2c209273c6cb5b888;p=lilypond.git Doc: avoid using zero-duration spacers in examples --- diff --git a/Documentation/extending/scheme-tutorial.itely b/Documentation/extending/scheme-tutorial.itely index e34ea9afdb..6f8622e877 100644 --- a/Documentation/extending/scheme-tutorial.itely +++ b/Documentation/extending/scheme-tutorial.itely @@ -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 diff --git a/Documentation/notation/changing-defaults.itely b/Documentation/notation/changing-defaults.itely index a5de489ca2..4c3562d08d 100644 --- a/Documentation/notation/changing-defaults.itely +++ b/Documentation/notation/changing-defaults.itely @@ -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 { diff --git a/Documentation/notation/keyboards.itely b/Documentation/notation/keyboards.itely index e323958e52..c693aa91ac 100644 --- a/Documentation/notation/keyboards.itely +++ b/Documentation/notation/keyboards.itely @@ -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 } >> >> diff --git a/Documentation/notation/pitches.itely b/Documentation/notation/pitches.itely index 20e56de28f..d3d2d9a220 100644 --- a/Documentation/notation/pitches.itely +++ b/Documentation/notation/pitches.itely @@ -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 diff --git a/Documentation/notation/staff.itely b/Documentation/notation/staff.itely index a8111bd7c4..b6c06c5690 100644 --- a/Documentation/notation/staff.itely +++ b/Documentation/notation/staff.itely @@ -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 diff --git a/Documentation/notation/vocal.itely b/Documentation/notation/vocal.itely index 361446bda7..9d645b78e0 100644 --- a/Documentation/notation/vocal.itely +++ b/Documentation/notation/vocal.itely @@ -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 e, } @@ -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 } diff --git a/Documentation/snippets/new/adding-orchestral-cues-to-a-vocal-score.ly b/Documentation/snippets/new/adding-orchestral-cues-to-a-vocal-score.ly index ba53f5963e..479aa6b27b 100644 --- a/Documentation/snippets/new/adding-orchestral-cues-to-a-vocal-score.ly +++ b/Documentation/snippets/new/adding-orchestral-cues-to-a-vocal-score.ly @@ -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 } #}) diff --git a/Documentation/snippets/new/redefining-grace-note-global-defaults.ly b/Documentation/snippets/new/redefining-grace-note-global-defaults.ly index f40241d080..2fcce37c2c 100644 --- a/Documentation/snippets/new/redefining-grace-note-global-defaults.ly +++ b/Documentation/snippets/new/redefining-grace-note-global-defaults.ly @@ -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'' { diff --git a/input/regression/collision-dots-move.ly b/input/regression/collision-dots-move.ly index 71fbdabb60..ca8736f356 100644 --- a/input/regression/collision-dots-move.ly +++ b/input/regression/collision-dots-move.ly @@ -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" - << 4 \\ { c8. d16 } >> + << 4 ^"prefer-dotted-right = #t" \\ { c8. d16 } >> << 4 \\ { d8. d16 } >> << 4 \\ { f'8. d16 } >> << 4 \\ { g'8. d16 } >> \override Staff.NoteCollision #'prefer-dotted-right = ##f - s1*0^"prefer-dotted-right = #f" - << 4 \\ { c8. d16 } >> + << 4 ^"prefer-dotted-right = #f" \\ { c8. d16 } >> << 4 \\ { d8. d16 } >> << 4 \\ { f'8. d16 } >> << 4 \\ { g'8. d16 } >> diff --git a/input/regression/empty-chord.ly b/input/regression/empty-chord.ly new file mode 100644 index 0000000000..5fae1c0afd --- /dev/null +++ b/input/regression/empty-chord.ly @@ -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 +} diff --git a/input/regression/morgenlied.ly b/input/regression/morgenlied.ly index 387bd49115..182cc64086 100644 --- a/input/regression/morgenlied.ly +++ b/input/regression/morgenlied.ly @@ -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 << diff --git a/input/regression/typography-demo.ly b/input/regression/typography-demo.ly index d20c6fe825..d6d87d15d8 100644 --- a/input/regression/typography-demo.ly +++ b/input/regression/typography-demo.ly @@ -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 << diff --git a/ly/grace-init.ly b/ly/grace-init.ly index 4ee3be0179..107592a2fe 100644 --- a/ly/grace-init.ly +++ b/ly/grace-init.ly @@ -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 = {