]> git.donarmstrong.com Git - lilypond.git/blobdiff - Documentation/learning/tweaks.itely
Doc: Update deprecated \relative syntax.
[lilypond.git] / Documentation / learning / tweaks.itely
index e2ea8c16714c3fb9bf6271c254f0759983acf45a..3a14d9c006ce6606a6ec9a3f719c4f53e66195fb 100644 (file)
@@ -2846,13 +2846,13 @@ was left looking like this:
   \key aes \major
   <<
     { c2 aes4. bes8 } \\
-    { aes2 f4 fes   } \\
+    { aes2 f4 fes } \\
     { \voiceFour
       <ees c>2
       des2
     }
-  >> |
-  <c ees aes c>1 |
+  >>
+  <c ees aes c>1
 }
 @end lilypond
 
@@ -2876,13 +2876,15 @@ Here's the final result:
   \key aes \major
   <<
     { c2 aes4. bes8 } \\
-    { aes2 f4 fes   } \\
+    { aes2 f4 fes } \\
     { \voiceFour
-      \once \override NoteColumn #'force-hshift = #0 <ees c>2
-      \once \override NoteColumn #'force-hshift = #0.5 des2
+      \once \override NoteColumn #'force-hshift = #0
+      <ees c>2
+      \once \override NoteColumn #'force-hshift = #0.5
+      des2
     }
-  >> |
-  <c ees aes c>1 |
+  >>
+  <c ees aes c>1
 }
 @end lilypond
 
@@ -2910,26 +2912,29 @@ dynamics, fingering and pedalling.
 @lilypond[quote,ragged-right,line-width=5.5\in]
 rhMusic = \relative c'' {
   r2
-  c4.\( g8 |
+  c4.\( g8
   \once \override Tie #'staff-position = #3.5
-  bes1~ |
+  bes1~
   \bar "||"
   \time 6/4
   \mergeDifferentlyHeadedOn
   \mergeDifferentlyDottedOn
-  bes2.^\markup {\bold "Moderato"} r8
+  bes2.^\markup { \bold "Moderato" } r8
   <<
-    {c,8 d fis bes a | }
+    { c,8 d fis bes a }
   \\
     % Reposition the c2 to the right of the merged note
-    {c,8~ \once \override NoteColumn #'force-hshift = #1.0
+    { c,8~ \once \override NoteColumn #'force-hshift = #1.0
     % Move the c2 out of the main note column so the merge will work
-    \shiftOnn c2}
+    \shiftOnn c2 }
   \\
     % Stem on the d2 must be down to permit merging
-    {s8 \stemDown \once \override Stem #'transparent = ##t d2}
+    { s8 \stemDown
+      \once \override Stem #'transparent = ##t
+      d2
+    }
   \\
-    {s4 fis4.}
+    { s4 fis4. }
   >>
   \mergeDifferentlyHeadedOff
   \mergeDifferentlyDottedOff
@@ -2937,9 +2942,9 @@ rhMusic = \relative c'' {
 }
 
 lhMusic = \relative c' {
-  r2 <c g ees>2( |
-  <d g, d>1)\arpeggio |
-  r2. d,,4 r4 r |
+  r2 <c g ees>2(
+  <d g, d>1)\arpeggio
+  r2. d,,4 r4 r
   r4
 }
 
@@ -2973,27 +2978,27 @@ default:
 @c line-width ensures no break
 @lilypond[quote,verbatim,ragged-right,line-width=5.5\in]
 rhMusic = \relative c'' {
-  r2 c4. g8 |
-  bes1~ |
+  r2 c4. g8
+  bes1~
   \time 6/4
   bes2. r8
   % Start polyphonic section of four voices
   <<
-    {c,8 d fis bes a | }
+    { c,8 d fis bes a }
   \\
-    {c,8~ c2 | }
+    { c,8~ c2 }
   \\
-    {s8 d2 | }
+    { s8 d2 }
   \\
-    {s4 fis4. | }
+    { s4 fis4. }
   >>
   g2.
 }
 
 lhMusic = \relative c' {
-  r2 <c g ees>2 |
-  <d g, d>1 |
-  r2. d,,4 r4 r |
+  r2 <c g ees>2
+  <d g, d>1
+  r2. d,,4 r4 r
   r4
 }
 
@@ -3022,27 +3027,27 @@ since these were all covered in the Tutorial.  Doing this gives:
 @c line-width ensures no break
 @lilypond[quote,verbatim,ragged-right,line-width=5.5\in]
 rhMusic = \relative c'' {
-  r2 c4.\( g8 |
-  bes1~ |
+  r2 c4.\( g8
+  bes1~
   \time 6/4
   bes2. r8
   % Start polyphonic section of four voices
   <<
-    {c,8 d fis bes a | }
+    { c,8 d fis bes a }
   \\
-    {c,8~ c2 | }
+    { c,8~ c2 }
   \\
-    {s8 d2 | }
+    { s8 d2 }
   \\
-    {s4 fis4. | }
+    { s4 fis4. }
   >>
   g2.\)
 }
 
 lhMusic = \relative c' {
-  r2 <c g ees>2( |
-  <d g, d>1) |
-  r2. d,,4 r4 r |
+  r2 <c g ees>2(
+  <d g, d>1)
+  r2. d,,4 r4 r
   r4
 }
 
@@ -3084,29 +3089,29 @@ This completes bar two, giving:
 @c line-width ensures no break
 @lilypond[quote,verbatim,ragged-right,line-width=5.5\in]
 rhMusic = \relative c'' {
-  r2 c4.\( g8 |
+  r2 c4.\( g8
   \once \override Tie #'staff-position = #3.5
-  bes1~ |
+  bes1~
   \bar "||"
   \time 6/4
   bes2. r8
   % Start polyphonic section of four voices
   <<
-    {c,8 d fis bes a | }
+    { c,8 d fis bes a }
   \\
-    {c,8~ c2 | }
+    { c,8~ c2 }
   \\
-    {s8 d2 | }
+    { s8 d2 }
   \\
-    {s4 fis4. | }
+    { s4 fis4. }
   >>
   g2.\)
 }
 
 lhMusic = \relative c' {
-  r2 <c g ees>2( |
-  <d g, d>1)\arpeggio |
-  r2. d,,4 r4 r |
+  r2 <c g ees>2(
+  <d g, d>1)\arpeggio
+  r2. d,,4 r4 r
   r4
 }
 
@@ -3155,23 +3160,23 @@ to the end, giving:
 @c line-width ensures no break
 @lilypond[quote,ragged-right,line-width=5.5\in]
 rhMusic = \relative c'' {
-  r2 c4.\( g8 |
+  r2 c4.\( g8
   \once \override Tie #'staff-position = #3.5
-  bes1~ |
+  bes1~
   \bar "||"
   \time 6/4
-  bes2.^\markup {\bold "Moderato"} r8
+  bes2.^\markup { \bold "Moderato" } r8
   \mergeDifferentlyHeadedOn
   \mergeDifferentlyDottedOn
   % Start polyphonic section of four voices
   <<
-    {c,8 d fis bes a | }
+    { c,8 d fis bes a }
   \\
-    {c,8~ c2 | }
+    { c,8~ c2 }
   \\
-    {s8 d2 | }
+    { s8 d2 }
   \\
-    {s4 fis4. | }
+    { s4 fis4. }
   >>
   \mergeDifferentlyHeadedOff
   \mergeDifferentlyDottedOff
@@ -3179,9 +3184,9 @@ rhMusic = \relative c'' {
 }
 
 lhMusic = \relative c' {
-  r2 <c g ees>2( |
-  <d g, d>1)\arpeggio |
-  r2. d,,4 r4 r |
+  r2 <c g ees>2(
+  <d g, d>1)\arpeggio
+  r2. d,,4 r4 r
   r4
 }
 
@@ -3221,25 +3226,25 @@ Applying these changes gives:
 @c line-width ensures no break
 @lilypond[quote,verbatim,ragged-right,line-width=5.5\in]
 rhMusic = \relative c'' {
-  r2 c4.\( g8 |
+  r2 c4.\( g8
   \once \override Tie #'staff-position = #3.5
-  bes1~ |
+  bes1~
   \bar "||"
   \time 6/4
-  bes2.^\markup {\bold "Moderato"} r8
+  bes2.^\markup { \bold "Moderato" } r8
   \mergeDifferentlyHeadedOn
   \mergeDifferentlyDottedOn
   % Start polyphonic section of four voices
   <<
-    {c,8 d fis bes a | }
+    { c,8 d fis bes a }
   \\
     % Move the c2 out of the main note column so the merge will work
-    {c,8~ \shiftOnn c2 | }
+    { c,8~ \shiftOnn c2 }
   \\
     % Stem on the d2 must be down to permit merging
-    {s8 \stemDown d2 | }
+    { s8 \stemDown d2 }
   \\
-    {s4 fis4. | }
+    { s4 fis4. }
   >>
   \mergeDifferentlyHeadedOff
   \mergeDifferentlyDottedOff
@@ -3247,9 +3252,9 @@ rhMusic = \relative c'' {
 }
 
 lhMusic = \relative c' {
-  r2 <c g ees>2( |
-  <d g, d>1)\arpeggio |
-  r2. d,,4 r4 r |
+  r2 <c g ees>2(
+  <d g, d>1)\arpeggio
+  r2. d,,4 r4 r
   r4
 }
 
@@ -3283,26 +3288,29 @@ the @code{force-hshift} property.  Here's the final result:
 @lilypond[quote,verbatim,ragged-right,line-width=5.5\in]
 rhMusic = \relative c'' {
   r2
-  c4.\( g8 |
+  c4.\( g8
   \once \override Tie #'staff-position = #3.5
-  bes1~ |
+  bes1~
   \bar "||"
   \time 6/4
-  bes2.^\markup {\bold "Moderato"} r8
+  bes2.^\markup { \bold "Moderato" } r8
   \mergeDifferentlyHeadedOn
   \mergeDifferentlyDottedOn
   <<
-    {c,8 d fis bes a | }
+    { c,8 d fis bes a }
   \\
     % Reposition the c2 to the right of the merged note
-    {c,8~ \once \override NoteColumn #'force-hshift = #1.0
+    { c,8~ \once \override NoteColumn #'force-hshift = #1.0
     % Move the c2 out of the main note column so the merge will work
-    \shiftOnn c2}
+    \shiftOnn c2 }
   \\
     % Stem on the d2 must be down to permit merging
-    {s8 \stemDown \once \override Stem #'transparent = ##t d2}
+    { s8 \stemDown
+      \once \override Stem #'transparent = ##t
+      d2
+    }
   \\
-    {s4 fis4.}
+    { s4 fis4. }
   >>
   \mergeDifferentlyHeadedOff
   \mergeDifferentlyDottedOff
@@ -3310,9 +3318,9 @@ rhMusic = \relative c'' {
 }
 
 lhMusic = \relative c' {
-  r2 <c g ees>2( |
-  <d g, d>1)\arpeggio |
-  r2. d,,4 r4 r |
+  r2 <c g ees>2(
+  <d g, d>1)\arpeggio
+  r2. d,,4 r4 r
   r4
 }
 
@@ -3437,10 +3445,10 @@ We show here the effect of the two methods:
     \once \override Score.MetronomeMark #'transparent = ##t
     % Invisible tempo marking to lengthen fermata in MIDI
     \tempo 4=80
-    a\fermata
+    a4\fermata
     % New tempo for next section
     \tempo 4=100
-    a a a a
+    a4 a a a
   }
   \layout { }
   \midi { }
@@ -3459,10 +3467,10 @@ We show here the effect of the two methods:
     \once \override Score.MetronomeMark #'stencil = ##f
     % Invisible tempo marking to lengthen fermata in MIDI
     \tempo 4=80
-    a\fermata
+    a4\fermata
     % New tempo for next section
     \tempo 4=100
-    a a a a
+    a4 a a a
   }
   \layout { }
   \midi { }
@@ -3542,15 +3550,15 @@ VerseFour  = \lyricmode { O | \emphasize Tri -- ni -- ty \normal of | love and p
       \clef "treble"
       \new Voice = "Soprano"  { \voiceOne \global \SopranoMusic }
       \new Voice = "Alto" { \voiceTwo \AltoMusic }
-      \new Lyrics \lyricsto "Soprano" { \VerseOne   }
-      \new Lyrics \lyricsto "Soprano" { \VerseTwo   }
+      \new Lyrics \lyricsto "Soprano" { \VerseOne }
+      \new Lyrics \lyricsto "Soprano" { \VerseTwo }
       \new Lyrics \lyricsto "Soprano" { \VerseThree }
-      \new Lyrics \lyricsto "Soprano" { \VerseFour  }
+      \new Lyrics \lyricsto "Soprano" { \VerseFour }
     >>
     \new Staff <<
       \clef "bass"
       \new Voice = "Tenor" { \voiceOne \TenorMusic }
-      \new Voice = "Bass"  { \voiceTwo \BassMusic  }
+      \new Voice = "Bass"  { \voiceTwo \BassMusic }
     >>
   >>
 }
@@ -3582,9 +3590,11 @@ inst = #(define-music-function (parser location string) (string?)
 
 \relative c'' {
   \tempo 4=50
-  a4.\mpdolce d8 cis4--\glissando a | b4 bes a2
+  a4.\mpdolce d8 cis4--\glissando a
+  b4 bes a2
   \inst "Clarinet"
-  cis4.\< d8 e4 fis | g8(\! fis)-. e( d)-. cis2
+  cis4.\< d8 e4 fis
+  g8(\! fis)-. e( d)-. cis2
 }
 @end lilypond
 
@@ -3623,9 +3633,11 @@ Now let's modify our music (let's save this file as @file{"music.ly"}).
 
 \relative c'' @{
   \tempo 4=50
-  a4.\mpdolce d8 cis4--\glissando a | b4 bes a2
+  a4.\mpdolce d8 cis4--\glissando a
+  b4 bes a2
   \inst "Clarinet"
-  cis4.\< d8 e4 fis | g8(\! fis)-. e( d)-. cis2
+  cis4.\< d8 e4 fis
+  g8(\! fis)-. e( d)-. cis2
 @}
 @end example
 
@@ -3641,9 +3653,11 @@ inst = #(define-music-function (parser location string) (string?)
 
 \relative c'' {
   \tempo 4=50
-  a4.\mpdolce d8 cis4--\glissando a | b4 bes a2
+  a4.\mpdolce d8 cis4--\glissando a
+  b4 bes a2
   \inst "Clarinet"
-  cis4.\< d8 e4 fis | g8(\! fis)-. e( d)-. cis2
+  cis4.\< d8 e4 fis
+  g8(\! fis)-. e( d)-. cis2
 }
 @end lilypond
 
@@ -3708,9 +3722,11 @@ inst = #(define-music-function (parser location string) (string?)
 
 \relative c'' {
   \tempo 4=50
-  a4.\mpdolce d8 cis4--\glissando a | b4 bes a2
+  a4.\mpdolce d8 cis4--\glissando a
+  b4 bes a2
   \inst "Clarinet"
-  cis4.\< d8 e4 fis | g8(\! fis)-. e( d)-. cis2
+  cis4.\< d8 e4 fis
+  g8(\! fis)-. e( d)-. cis2
 }
 @end lilypond
 
@@ -3772,9 +3788,11 @@ inst = #(define-music-function (parser location string) (string?)
 
 \relative c'' {
   \tempo 4=50
-  a4.\mpdolce d8 cis4--\glissando a | b4 bes a2
+  a4.\mpdolce d8 cis4--\glissando a
+  b4 bes a2
   \inst "Clarinet"
-  cis4.\< d8 e4 fis | g8(\! fis)-. e( d)-. cis2
+  cis4.\< d8 e4 fis
+  g8(\! fis)-. e( d)-. cis2
 }
 @end lilypond
 
@@ -4010,10 +4028,10 @@ the staff.
 \relative c' {
   % Arrange to obtain color from color-notehead procedure
   \override NoteHead #'color = #color-notehead
-  a2 b |
-  c2 d |
-  e2 f |
-  g2 a |
+  a2 b
+  c2 d
+  e2 f
+  g2 a
 }
 @end lilypond