diff options
author | Keith OHara <k-ohara5a5a@oco.net> | 2015-05-31 19:49:54 -0700 |
---|---|---|
committer | Keith OHara <k-ohara5a5a@oco.net> | 2015-07-16 22:40:15 -0700 |
commit | 88cfc9ee61dece9cffff98ab7f10318633698c39 (patch) | |
tree | a759a089b3fad35a440801dcd9cfc382fd77b4e8 | |
parent | 085d2a54e3494826f41a3f5676bf99fc328ad71b (diff) |
Docs: remove implicit relative from @lilypond[verbatim]; issue 4371
Remove the lilypond-book feature of 'relative=n' in conjunctin with
'verbatim', so that examples cut-and-paste into user scores.
26 files changed, 3108 insertions, 2627 deletions
diff --git a/Documentation/contributor/doc-work.itexi b/Documentation/contributor/doc-work.itexi index f9718249a8..f017041d46 100644 --- a/Documentation/contributor/doc-work.itexi +++ b/Documentation/contributor/doc-work.itexi @@ -401,13 +401,7 @@ Most LilyPond examples throughout the documentation can be produced with: @example -@@lilypond[verbatim,quote,relative=1] -@end example - -or - -@example -@@lilypond[verbatim,quote,relative=2] +@@lilypond[verbatim,quote] @end example If using @code{\book@{@}} in your example then you must also @@ -453,8 +447,8 @@ Please avoid using extra spacing either after or within the @code{@@lilypond} parameters. @example -not: @@lilypond [verbatim, quote, relative=1] -but instead: @@lilypond[verbatim,quote,relative=1] +not: @@lilypond [verbatim, quote, fragment] +but instead: @@lilypond[verbatim,quote,fragment] @end example @item diff --git a/Documentation/essay/engraving.itely b/Documentation/essay/engraving.itely index ef13eaab77..8a919cc73c 100644 --- a/Documentation/essay/engraving.itely +++ b/Documentation/essay/engraving.itely @@ -970,8 +970,8 @@ formed by the concept of music expressions: by combining small fragments of music into larger ones, more complex music can be expressed. For example -@lilypond[quote,verbatim,fragment,relative=1] -f4 +@lilypond[quote,verbatim,fragment] +f'4 @end lilypond @noindent diff --git a/Documentation/extending/programming-interface.itely b/Documentation/extending/programming-interface.itely index f572fc9d83..7e053b8164 100644 --- a/Documentation/extending/programming-interface.itely +++ b/Documentation/extending/programming-interface.itely @@ -1331,12 +1331,12 @@ set at fixed values with @code{\override}, e.g. Properties can also be set to a Scheme procedure, -@lilypond[fragment,verbatim,quote,relative=2] +@lilypond[fragment,verbatim,quote] \override Stem.thickness = #(lambda (grob) (if (= UP (ly:grob-property grob 'direction)) 2.0 7.0)) -c b a g b a g b +\relative { c'' b a g b a g b } @end lilypond @noindent diff --git a/Documentation/learning/common-notation.itely b/Documentation/learning/common-notation.itely index c75409e717..e5b3a652a3 100644 --- a/Documentation/learning/common-notation.itely +++ b/Documentation/learning/common-notation.itely @@ -12,12 +12,8 @@ @ignore Tutorial guidelines: (different from policy.txt!) -- unless you have a really good reason, use either +- unless you have a really good reason, use @lilypond[verbatim,quote] - or - @lilypond[verbatim,quote,relative=2] - - Don't use any other relative=X commands. - use "aes" and "ees" instead of "as" and "es". I know it's not correct Dutch naming, but let's not confuse people with this @@ -79,8 +75,8 @@ lines are added using @code{\bar}, for example for an ending bar line. For a full list of bar lines see the @ruser{Bar lines}. -@lilypond[verbatim,quote,relative=2] -g1 e1 \bar "||" c2. c'4 \bar "|." +@lilypond[verbatim,quote] +\relative { g'1 e1 \bar "||" c2. c'4 \bar "|." } @end lilypond @node Bar checks @@ -107,8 +103,8 @@ warning in the console output: @example warning: barcheck failed at: 1/2 - g1 | e1 | c2. c' - | g4 c g e | c4 r r2 | + g'1 | e1 | c2. c' + | g4 c g e | c4 r r2 | @end example Although the missing duration is clear in the musical output in this @@ -164,8 +160,8 @@ from note naming conventions in Nordic and Germanic languages, like German and Dutch. To use other names for @notation{alterations}, see @ruser{Note names in other languages}. -@lilypond[verbatim,quote,relative=2] -cis4 ees fisis, aeses +@lilypond[verbatim,quote] +\relative { cis''4 ees fisis, aeses } @end lilypond @cindex key signature, setting @@ -194,11 +190,13 @@ Music Glossary: @rglos{key signature}, @rglos{major}, The @notation{key signature} is set with the command @code{\key} followed by a pitch and @code{\major} or @code{\minor}. -@lilypond[verbatim,quote,relative=1] -\key d \major -d4 fis a c | -\bar "||" \key c \minor -c,4 ees g b | +@lilypond[verbatim,quote] +\relative { + \key d \major + d'4 fis a c | + \bar "||" \key c \minor + c,4 ees g b | +} @end lilypond @smallspace @@ -226,9 +224,11 @@ the pitch assigned to a note such as @code{c} in the input. In this example: -@lilypond[verbatim,quote,relative=2] -\key d \major -cis4 d e fis +@lilypond[verbatim,quote] +\relative { + \key d \major + cis''4 d e fis +} @end lilypond @noindent @@ -240,9 +240,11 @@ the middle line of the staff.} Rather, it means @qq{there is a note with pitch B-natural.} In the key of A-flat major, it @emph{does} get an accidental: -@lilypond[verbatim,quote,relative=2] -\key aes \major -aes4 c b c +@lilypond[verbatim,quote] +\relative { + \key aes \major + aes'4 c b c +} @end lilypond Whenever you enter a pitch that is a black key on the piano, you @@ -291,8 +293,8 @@ Music Glossary: @rglos{tie}. A @notation{tie} is created by appending a tilde @code{~} to the first of the two notes being tied. -@lilypond[verbatim,quote,relative=2] -g4~ g c2~ | c4~ c8 a~ a2 | +@lilypond[verbatim,quote] +\relative { g'4~ g c2~ | c4~ c8 a~ a2 | } @end lilypond @cindex bare duration @@ -301,8 +303,8 @@ g4~ g c2~ | c4~ c8 a~ a2 | When the pitch does not change, as is always the case with tied notes, subsequent pitches may be omitted, specifying just the bare duration: -@lilypond[verbatim,quote,relative=2] -g4~ 4 c2~ | 4~ 8 a~ 2 | +@lilypond[verbatim,quote] +\relative { g'4~ 4 c2~ | 4~ 8 a~ 2 | } @end lilypond This shorthand may be useful in other places where the rhythm changes @@ -321,8 +323,8 @@ A @notation{slur} is a curve drawn across many notes. The starting note and ending note are marked with @code{(} and @code{)} respectively. -@lilypond[verbatim,quote,relative=2] -d4( c16) cis( d e c cis d) e( d4) +@lilypond[verbatim,quote] +\relative { d''4( c16) cis( d e c cis d) e( d4) } @end lilypond @node Phrasing slurs @@ -336,8 +338,8 @@ Slurs to indicate longer @notation{phrasing} can be entered with and phrasing slurs at the same time, but you cannot have simultaneous slurs or simultaneous phrasing slurs. -@lilypond[verbatim,quote,relative=2] -g4\( g8( a) b( c) b4\) +@lilypond[verbatim,quote] +\relative { g'4\( g8( a) b( c) b4\) } @end lilypond @smallspace @@ -356,8 +358,8 @@ can only be used on pairs of notes with the same pitch. Slurs indicate the @notation{articulation} of notes, and can be used on larger groups of notes. Slurs and ties can be nested. -@lilypond[verbatim,quote,relative=2] -c4~( c8 d~ 4 e) +@lilypond[verbatim,quote] +\relative { c''4(~ c8 d~ 4 e) } @end lilypond @@ -390,9 +392,11 @@ Music Glossary: @rglos{articulation}. Common @notation{articulations} can be added to a note using a dash @code{-} and a single character: -@lilypond[verbatim,quote,relative=2] -c4-^ c-+ c-- c-! -c4-> c-. c2-_ +@lilypond[verbatim,quote] +\relative { + c''4-^ c-+ c-- c-! + c4-> c-. c2-_ +} @end lilypond @node Fingerings @@ -409,8 +413,8 @@ Music Glossary: @rglos{fingering}. Similarly, @notation{fingering} indications can be added to a note using a dash (@code{-}) and the digit to be printed: -@lilypond[verbatim,quote,relative=2] -c4-3 e-5 b-2 a-1 +@lilypond[verbatim,quote] +\relative { c''4-3 e-5 b-2 a-1 } @end lilypond Articulations and fingerings are usually placed automatically, but @@ -419,8 +423,8 @@ you can specify a direction by replacing the dash (@code{-}) with articulations on the same note. However, in most cases it is best to let LilyPond determine the articulation directions. -@lilypond[verbatim,quote,relative=2] -c4_-^1 d^. f^4_2-> e^-_+ +@lilypond[verbatim,quote] +\relative { c''4_-^1 d^. f^4_2-> e^-_+ } @end lilypond @node Dynamics @@ -450,8 +454,8 @@ Music Glossary: @rglos{dynamics}, @rglos{crescendo}, @notation{Dynamic} signs are made by adding the markings (with a backslash) to the note: -@lilypond[verbatim,quote,relative=2] -c4\ff c\mf c\p c\pp +@lilypond[verbatim,quote] +\relative { c''4\ff c\mf c\p c\pp } @end lilypond @@ -460,8 +464,8 @@ the commands @code{\<} and @code{\>}. The next dynamics sign, for example @code{\f}, will end the (de)crescendo, or the command @code{\!} can be used: -@lilypond[verbatim,quote,relative=2] -c4\< c\ff\> c c\! +@lilypond[verbatim,quote] +\relative { c''4\< c\ff\> c c\! } @end lilypond @@ -484,15 +488,15 @@ Notation Reference: Text may be added to your scores: -@lilypond[verbatim,quote,relative=2] -c2^"espr" a_"legato" +@lilypond[verbatim,quote,fragment] +c''2^"espr" a'_"legato" @end lilypond Extra formatting may be added with the @code{\markup} command: -@lilypond[verbatim,quote,relative=2] -c2^\markup { \bold espr } -a2_\markup { +@lilypond[verbatim,quote,fragment] +c''2^\markup { \bold espr } +a'2_\markup { \dynamic f \italic \small { 2nd } \hspace #0.1 \dynamic p } @end lilypond @@ -525,16 +529,16 @@ Music Glossary: @rglos{beam}. All @notation{beams} are drawn automatically: -@lilypond[verbatim,quote,relative=2] -a8 ais d ees r d c16 b a8 +@lilypond[verbatim,quote] +\relative { a'8 ais d ees r d c16 b a8 } @end lilypond If you do not like the automatic beams, they may be overridden manually. To correct just an occasional beam mark the first note to be beamed with @code{[} and the last one with @code{]}. -@lilypond[verbatim,quote,relative=2] -a8[ ais] d[ ees r d] c16 b a8 +@lilypond[verbatim,quote] +\relative { a'8[ ais] d[ ees r d] c16 b a8 } @end lilypond If you want to turn off automatic beaming entirely or for an @@ -542,11 +546,13 @@ extended section of music, use the command @code{\autoBeamOff} to turn off automatic beaming and @code{\autoBeamOn} to turn it on again. -@lilypond[verbatim,quote,relative=2] -\autoBeamOff -a8 c b4 d8. c16 b4 | -\autoBeamOn -a8 c b4 d8. c16 b4 | +@lilypond[verbatim,quote] +\relative { + \autoBeamOff + a'8 c b4 d8. c16 b4 | + \autoBeamOn + a8 c b4 d8. c16 b4 | +} @end lilypond @@ -582,9 +588,11 @@ A pickup (or @notation{anacrusis}) is entered with the keyword @code{\partial}. It is followed by a duration: @code{\partial 4} is a quarter note pickup and @code{\partial 8} an eighth note. -@lilypond[verbatim,quote,relative=2] -\partial 8 f8 | -c2 d | +@lilypond[verbatim,quote] +\relative { + \partial 8 f''8 | + c2 d | +} @end lilypond @node Tuplets @@ -606,11 +614,13 @@ of notes normally filling the same duration. For triplets, there are three notes instead of two, so @notation{triplets} have 3/2 as their fraction. -@lilypond[verbatim,quote,relative=2] -\tuplet 3/2 { f8 g a } -\tuplet 3/2 { c8 r c } -\tuplet 3/2 { f,8 g16[ a g a] } -\tuplet 3/2 { d4 a8 } +@lilypond[verbatim,quote] +\relative { + \tuplet 3/2 { f''8 g a } + \tuplet 3/2 { c8 r c } + \tuplet 3/2 { f,8 g16[ a g a] } + \tuplet 3/2 { d4 a8 } +} @end lilypond @node Grace notes @@ -635,10 +645,12 @@ Music Glossary: @rglos{grace notes}, @rglos{acciaccatura}, although they can also be created by prefixing a music expression with the keyword @code{\appoggiatura} or @code{\acciaccatura}: -@lilypond[verbatim,quote,relative=2] -c2 \grace { a32 b } c2 | -c2 \appoggiatura b16 c2 | -c2 \acciaccatura b16 c2 | +@lilypond[verbatim,quote] +\relative { + c''2 \grace { a32 b } c2 | + c2 \appoggiatura b16 c2 | + c2 \acciaccatura b16 c2 | +} @end lilypond @@ -686,24 +698,24 @@ than one voice on the same staff. In LilyPond input files, music is represented by @emph{music expressions}. A single note is a music expression: -@lilypond[verbatim,quote,relative=2] -a4 +@lilypond[verbatim,quote,fragment] +a'4 @end lilypond Enclosing a note in braces creates a @emph{compound music expression}. Here we have created a compound music expression with two notes: -@lilypond[verbatim,quote,relative=2] -{ a4 g4 } +@lilypond[verbatim,quote] +\relative { a'4 g4 } @end lilypond Putting a group of music expressions (e.g. notes) in braces means that they are in sequence (i.e. each one follows the previous one). The result is another music expression: -@lilypond[verbatim,quote,relative=2] -{ { a4 g } f4 g } +@lilypond[verbatim,quote] +\relative { { a'4 g } f4 g } @end lilypond @node Analogy mathematical expressions @@ -765,13 +777,11 @@ following example, three sequences (all containing two separate notes) are combined simultaneously: @lilypond[verbatim,quote] -\relative { - << - { a'2 g } - { f2 e } - { d2 b } - >> -} +<< + \relative { a'2 g } + \relative { f'2 e } + \relative { d'2 b } +>> @end lilypond Note that we have indented each level of the input with a @@ -833,12 +843,10 @@ staff is marked by adding @code{\new Staff} before it. These and @code{>>}: @lilypond[verbatim,quote] -\relative { - << - \new Staff { \clef "treble" c''4 } - \new Staff { \clef "bass" c,,4 } - >> -} +<< + \new Staff { \clef "treble" c''4 } + \new Staff { \clef "bass" c4 } +>> @end lilypond The command @code{\new} introduces a @q{notation context.} A @@ -863,12 +871,10 @@ is because scores with transposing instruments are more common than polyrhythmic scores. @lilypond[verbatim,quote] -\relative { - << - \new Staff { \clef "treble" \key d \major \time 3/4 c''4 } - \new Staff { \clef "bass" c,,4 } - >> -} +<< + \new Staff { \clef "treble" \key d \major \time 3/4 c''4 } + \new Staff { \clef "bass" c4 } +>> @end lilypond @node Staff groups @@ -907,12 +913,10 @@ inserted inside a @code{PianoStaff}: Here is a small example: @lilypond[verbatim,quote] -\relative { - \new PianoStaff << - \new Staff { \time 2/4 c''4 e | g g, | } - \new Staff { \clef "bass" c,,4 c' | e c | } - >> -} +\new PianoStaff << + \new Staff \relative { \time 2/4 c''4 e | g g, | } + \new Staff \relative { \clef "bass" c4 c' | e c | } +>> @end lilypond Other staff groupings are introduced with @code{\new GrandStaff}, @@ -947,8 +951,8 @@ surround the pitches with @emph{single} angle brackets. Note that all the notes in a chord must have the same duration, and that the duration is placed after the closing bracket. -@lilypond[verbatim,quote,relative=2] -r4 <c e g> <c f a>2 +@lilypond[verbatim,quote] +\relative { r4 <c'' e g> <c f a>2 } @end lilypond Think of chords as almost equivalent to single notes: @@ -957,11 +961,13 @@ to a chord, and everything must go @emph{outside} the angle brackets. For example, you can combine markings like beams and ties with chords. They must be placed outside the angle brackets. -@lilypond[verbatim,quote,relative=2] -r4 <c e g>~ <c f a>2 | -<c e g>8[ <c f a> <c e g> <c f a>] - <c e g>8\>[ <c f a> <c f a> <c e g>]\! | -r4 <c e g>8.\p <c f a>16( <c e g>4-. <c f a>) | +@lilypond[verbatim,quote] +\relative { + r4 <c'' e g>~ <c f a>2 | + <c e g>8[ <c f a> <c e g> <c f a>] + <c e g>8\>[ <c f a> <c f a> <c e g>]\! | + r4 <c e g>8.\p <c f a>16( <c e g>4-. <c f a>) | +} @end lilypond @seealso @@ -1436,24 +1442,7 @@ the note on the bottom staff of the bass clef. } @end lilypond -Here is a four-octave scale: - -@lilypond[verbatim,quote] -{ - \clef "bass" - c,4 d, e, f, | - g,4 a, b, c | - d4 e f g | - a4 b c' d' | - \clef "treble" - e'4 f' g' a' | - b'4 c'' d'' e'' | - f''4 g'' a'' b'' | - c'''1 | -} -@end lilypond - -As you can see, writing a melody in the treble clef involves a lot +Writing a melody in the treble clef involves a lot of quote @code{'} marks. Consider this fragment from Mozart: @lilypond[verbatim,quote] diff --git a/Documentation/learning/fundamental.itely b/Documentation/learning/fundamental.itely index c796c5163d..2f7b4b66de 100644 --- a/Documentation/learning/fundamental.itely +++ b/Documentation/learning/fundamental.itely @@ -519,8 +519,8 @@ So, for example, a phrasing slur can start before a manually inserted beam and end before the end of the beam -- not very musical, perhaps, but possible: -@lilypond[quote,verbatim,ragged-right,relative=2] -g8\( a b[ c b\) a] g4 +@lilypond[quote,verbatim,ragged-right] +\relative { g'8\( a b[ c b\) a] g4 } @end lilypond In general, different kinds of brackets, bracket-like constructs, @@ -530,11 +530,13 @@ a slur extending into a tuplet (line 2), a beam and a slur extending into a tuplet, a tie crossing two tuplets, and a phrasing slur extending out of a tuplet (lines 3 and 4). -@lilypond[quote,verbatim,ragged-right,relative=1] -r16[ g \tuplet 3/2 { r16 e'8] } -g,16( a \tuplet 3/2 { b16 d) e } -g,8[( a \tuplet 3/2 { b8 d) e~] } | -\tuplet 5/4 { e32\( a, b d e } a4.\) +@lilypond[quote,verbatim,ragged-right] +\relative { + r16[ g' \tuplet 3/2 { r16 e'8] } + g,16( a \tuplet 3/2 { b16 d) e } + g,8[( a \tuplet 3/2 { b8 d) e~] } | + \tuplet 5/4 { e32\( a, b d e } a4.\) +} @end lilypond @@ -586,9 +588,11 @@ A single voice can contain many notes in a chord, of course, so when exactly are multiple voices needed? Look first at this example of four chords: -@lilypond[quote,verbatim,ragged-right,relative=1] -\key g \major -<d g>4 <d fis> <d a'> <d g> +@lilypond[quote,verbatim,ragged-right] +\relative { + \key g \major + <d' g>4 <d fis> <d a'> <d g> +} @end lilypond This can be expressed using just the single angle bracket chord @@ -621,22 +625,26 @@ of polyphony. Here's how we split the chords above into two voices and add both the passing note and a slur: -@lilypond[quote,verbatim,ragged-right,relative=2] -\key g \major -% Voice "1" Voice "2" -<< { g4 fis8( g) a4 g } \\ { d4 d d d } >> +@lilypond[quote,verbatim,ragged-right] +\relative { + \key g \major + % Voice "1" Voice "2" + << { g'4 fis8( g) a4 g } \\ { d4 d d d } >> +} @end lilypond Notice how the stems of the second voice now point down. Here's another simple example: -@lilypond[quote,verbatim,ragged-right,relative=2] -\key d \minor -% Voice "1" Voice "2" -<< { r4 g g4. a8 } \\ { d,2 d4 g } >> | -<< { bes4 bes c bes } \\ { g4 g g8( a) g4 } >> | -<< { a2. r4 } \\ { fis2. s4 } >> | +@lilypond[quote,verbatim,ragged-right] +\relative { + \key d \minor + % Voice "1" Voice "2" + << { r4 g' g4. a8 } \\ { d,2 d4 g } >> | + << { bes4 bes c bes } \\ { g4 g g8( a) g4 } >> | + << { a2. r4 } \\ { fis2. s4 } >> | +} @end lilypond It is not necessary to use a separate @code{<< \\ >>} construct @@ -645,19 +653,20 @@ can help the legibility of the code, but if there are many notes in each bar it may be better to split out each voice separately, like this: -@lilypond[quote,verbatim,ragged-right,relative=2] -\key d \minor -<< { - % Voice "1" - r4 g g4. a8 | - bes4 bes c bes | - a2. r4 | -} \\ { - % Voice "2" - d,2 d4 g | - g4 g g8( a) g4 | - fis2. s4 | -} >> +@lilypond[quote,verbatim,ragged-right] +<< + \key d \minor + \relative { % Voice "1" + r4 g' g4. a8 | + bes4 bes c bes | + a2. r4 | + } \\ + \relative { % Voice "2" + d'2 d4 g | + g4 g g8( a) g4 | + fis2. s4 | + } +>> @end lilypond @@ -1374,8 +1383,8 @@ appear explicitly in the input file must be added to the output. For example, compare the input and output of the following example: -@lilypond[quote,verbatim,relative=2] -cis4 cis2. | a4 a2. | +@lilypond[quote,verbatim] +\relative { cis''4 cis2. | a4 a2. | } @end lilypond The input is rather sparse, but in the output, bar lines, @@ -1814,17 +1823,19 @@ font size, which affects the size of the note heads (among other things) several times. The change is from the default value, not the most recently set value. -@lilypond[quote,verbatim,ragged-right,relative=1] -c4 d -% make note heads smaller -\set fontSize = #-4 -e4 f | -% make note heads larger -\set fontSize = #2.5 -g4 a -% return to default size -\unset fontSize -b4 c | +@lilypond[quote,verbatim,ragged-right] +\relative { + c'4 d + % make note heads smaller + \set fontSize = #-4 + e4 f | + % make note heads larger + \set fontSize = #2.5 + g4 a + % return to default size + \unset fontSize + b4 c | +} @end lilypond We have now seen how to set the values of several different types of diff --git a/Documentation/learning/tutorial.itely b/Documentation/learning/tutorial.itely index d9fcb03d65..f4e9302eae 100644 --- a/Documentation/learning/tutorial.itely +++ b/Documentation/learning/tutorial.itely @@ -691,15 +691,13 @@ online version. LilyPond input must be surrounded by @code{@{ @}} marks or a @q{@w{@code{@bs{}relative @{ @dots{} @}}}}, as we saw in -@ref{Working on input files}. For the rest of this manual, most -examples will omit this. To replicate the examples, you may copy -and paste the displayed input, but to put the pitches in the same -octaves as seen in the manual you @strong{must} add a particular -form of @code{@bs{}relative} with an explicit starting pitch -@code{c''} like this: +@ref{Working on input files}. For the rest of this manual, +some short examples will omit this. To replicate these examples, +you can copy displayed input, but paste it between @code{@{} +and @code{@}} in your input file. @example -\relative c'' @{ +@{ @dots{}example goes here@dots{} @} @end example diff --git a/Documentation/learning/tweaks.itely b/Documentation/learning/tweaks.itely index e182f2c710..c1e2cc20f3 100644 --- a/Documentation/learning/tweaks.itely +++ b/Documentation/learning/tweaks.itely @@ -253,12 +253,14 @@ color of the note head: @cindex color property, example @cindex NoteHead, example of overriding -@lilypond[quote,fragment,ragged-right,verbatim,relative=1] -c4 d -\override NoteHead.color = #red -e4 f | -\override NoteHead.color = #green -g4 a b c | +@lilypond[quote,ragged-right,verbatim] +\relative { + c'4 d + \override NoteHead.color = #red + e4 f | + \override NoteHead.color = #green + g4 a b c | +} @end lilypond @@ -289,14 +291,16 @@ of the note head to the default value for the final two notes: @cindex color property, example @cindex NoteHead, example of overriding -@lilypond[quote,fragment,ragged-right,verbatim,relative=1] -c4 d -\override NoteHead.color = #red -e4 f | -\override NoteHead.color = #green -g4 a -\revert NoteHead.color -b4 c | +@lilypond[quote,ragged-right,verbatim] +\relative { + c'4 d + \override NoteHead.color = #red + e4 f | + \override NoteHead.color = #green + g4 a + \revert NoteHead.color + b4 c | +} @end lilypond @@ -317,26 +321,30 @@ note like this: @cindex color property, example @cindex NoteHead, example of overriding -@lilypond[quote,verbatim,relative=1] -c4 d -\override NoteHead.color = #red -e4 f | -\once \override NoteHead.color = #green -g4 a -\revert NoteHead.color -b c | +@lilypond[quote,verbatim] +\relative { + c'4 d + \override NoteHead.color = #red + e4 f | + \once \override NoteHead.color = #green + g4 a + \revert NoteHead.color + b c | +} @end lilypond The @code{\once} prefix may also be used in front of many predefined commands to limit their effect to one musical moment: -@lilypond[quote,verbatim,relative=1] -c4( d) -\once \slurDashed -e4( f) | -g4( a) -\once \hideNotes -b( c) | +@lilypond[quote,verbatim] +\relative { + c'4( d) + \once \slurDashed + e4( f) | + g4( a) + \once \hideNotes + b( c) | +} @end lilypond However, predefined commands of the form @code{\@dots{}Neutral}, @@ -382,11 +390,13 @@ middle note head (the E) in a C major chord. Let's first see what @cindex font-size property, example @cindex NoteHead, example of overriding -@lilypond[quote,fragment,ragged-right,verbatim,relative=1] -<c e g>4 -\once \override NoteHead.font-size = #-3 -<c e g>4 -<c e g>4 +@lilypond[quote,ragged-right,verbatim] +\relative { + <c' e g>4 + \once \override NoteHead.font-size = #-3 + <c e g>4 + <c e g>4 +} @end lilypond We see the override affects @emph{all} the note heads in the chord. @@ -407,9 +417,11 @@ a chord would be changed in this way: @cindex font-size property, example @cindex @code{\tweak}, example -@lilypond[quote,fragment,ragged-right,verbatim,relative=1] -<c e g>4 -<c \tweak font-size #-3 e g>4 +@lilypond[quote,ragged-right,verbatim] +\relative { + <c' e g>4 + <c \tweak font-size #-3 e g>4 +} @end lilypond Note that the syntax of @code{\tweak} is different from that of the @@ -429,8 +441,8 @@ a series of articulations, as shown here: @cindex color property, example @cindex @code{\tweak}, example -@lilypond[quote,fragment,ragged-right,verbatim,relative=2] -a4^"Black" +@lilypond[quote,fragment,ragged-right,verbatim] +a'4^"Black" -\tweak color #red ^"Red" -\tweak color #green _"Green" @end lilypond @@ -450,10 +462,10 @@ directly from the following event. It is still possible to use the layout object, provided that LilyPond can trace its origin back to the original event: -@lilypond[quote,fragment,ragged-right,verbatim,relative=2] -<\tweak Accidental.color #red cis4 - \tweak Accidental.color #green es - g> +@lilypond[quote,fragment,ragged-right,verbatim] +<\tweak Accidental.color #red cis''4 + \tweak Accidental.color #green es'' + g''> @end lilypond This long form of the @code{\tweak} command can be described as @@ -486,13 +498,15 @@ printed in red on the first short tuplet bracket. @cindex direction property, example @cindex color property, example -@lilypond[quote,ragged-right,verbatim,fragment,relative=2] -\tweak direction #up -\tuplet 3/4 { - \tweak color #red - \tuplet 3/2 { c8[ c c] } - \tuplet 3/2 { c8[ c c] } - \tuplet 3/2 { c8[ c c] } +@lilypond[quote,ragged-right,verbatim] +\relative c'' { + \tweak direction #up + \tuplet 3/4 { + \tweak color #red + \tuplet 3/2 { c8[ c c] } + \tuplet 3/2 { c8[ c c] } + \tuplet 3/2 { c8[ c c] } + } } @end lilypond @@ -505,15 +519,17 @@ appearance may be modified in the usual way with @cindex transparent property, example @cindex TupletNumber, example of overriding -@lilypond[quote,ragged-right,verbatim,fragment,relative=1] -\tuplet 3/2 { c8[ c c] } -\once \override TupletNumber.text = #tuplet-number::calc-fraction-text -\tuplet 3/2 { - c8[ c] - c8[ c] - \once \override TupletNumber.transparent = ##t - \tuplet 3/2 { c8[ c c] } - \tuplet 3/2 { c8[ c c] } +@lilypond[quote,ragged-right,verbatim] +\relative { + \tuplet 3/2 { c'8[ c c] } + \once \override TupletNumber.text = #tuplet-number::calc-fraction-text + \tuplet 3/2 { + c8[ c] + c8[ c] + \once \override TupletNumber.transparent = ##t + \tuplet 3/2 { c8[ c c] } + \tuplet 3/2 { c8[ c c] } + } } @end lilypond @@ -626,12 +642,12 @@ music: @c Mozart, Die Zauberflöte Nr.7 Duett -@lilypond[quote,verbatim,relative=2] +@lilypond[quote,verbatim] { \key es \major \time 6/8 - { - r4 bes8 bes[( g]) g | + \relative { + r4 bes'8 bes[( g]) g | g8[( es]) es d[( f]) as | as8 g } @@ -711,14 +727,14 @@ close to it.} Let's do that: @cindex Slur example of overriding @cindex thickness property, example -@lilypond[quote,verbatim,relative=2] +@lilypond[quote,verbatim] { \key es \major \time 6/8 - { + \relative { % Increase thickness of all following slurs from 1.2 to 5.0 \override Slur.thickness = #5.0 - r4 bes8 bes[( g]) g | + r4 bes'8 bes[( g]) g | g8[( es]) es d[( f]) as | as8 g } @@ -780,12 +796,12 @@ repositioned as follows: @cindex Slur, example of overriding @cindex thickness property, example -@lilypond[quote,verbatim,relative=2] +@lilypond[quote,verbatim] { \key es \major \time 6/8 - { - r4 bes8 + \relative { + r4 bes'8 % Increase thickness of immediately following slur only \once \override Slur.thickness = #5.0 bes8[( g]) g | @@ -820,12 +836,12 @@ the slurs begin: @cindex Slur, example of overriding @cindex thickness property, example -@lilypond[quote,verbatim,relative=2] +@lilypond[quote,verbatim] { \key es \major \time 6/8 - { - r4 bes8 + \relative { + r4 bes'8 % Increase thickness of immediately following slur only \once \override Slur.thickness = #5.0 bes[( g]) g | @@ -848,12 +864,12 @@ after the second slur: @cindex Slur, example of overriding @cindex thickness property, example -@lilypond[quote,verbatim,relative=2] +@lilypond[quote,verbatim] { \key es \major \time 6/8 - { - r4 bes8 + \relative { + r4 bes'8 % Increase thickness of all following slurs from 1.2 to 5.0 \override Slur.thickness = #5.0 bes[( g]) g | @@ -955,12 +971,12 @@ like so: @cindex LyricText, example of overriding @cindex @code{\addlyrics}, example -@lilypond[quote,fragment,ragged-right,verbatim,relative=2] +@lilypond[quote,ragged-right,verbatim] { \key es \major \time 6/8 - { - r4 bes8 bes[( g]) g | + \relative { + r4 bes'8 bes[( g]) g | g8[( es]) es d[( f]) as | as8 g } @@ -1125,11 +1141,11 @@ the implied Context, @code{Voice}: @cindex BarLine, example of overriding @cindex stencil property, example -@lilypond[quote,fragment,ragged-right,verbatim,relative=2] -{ +@lilypond[quote,ragged-right,verbatim] +\relative { \time 12/16 \override BarLine.stencil = ##f - c4 b8 c d16 c d8 | + c''4 b8 c d16 c d8 | g,8 a16 b8 c d4 e16 | e8 } @@ -1150,11 +1166,11 @@ it by adding the correct context: @cindex BarLine, example of overriding @cindex stencil property, example -@lilypond[quote,fragment,ragged-right,verbatim,relative=2] -{ +@lilypond[quote,ragged-right,verbatim] +\relative { \time 12/16 \override Staff.BarLine.stencil = ##f - c4 b8 c d16 c d8 | + c''4 b8 c d16 c d8 | g,8 a16 b8 c d4 e16 | e8 } @@ -1165,11 +1181,11 @@ property to @code{#f} is such a frequent operation that there is a shorthand for it called @code{\omit}: @funindex \omit -@lilypond[quote,fragment,ragged-right,verbatim,relative=2] -{ +@lilypond[quote,ragged-right,verbatim] +\relative { \time 12/16 \omit Staff.BarLine - c4 b8 c d16 c d8 | + c''4 b8 c d16 c d8 | g,8 a16 b8 c d4 e16 | e8 } @@ -1183,9 +1199,9 @@ correct processing. For example, errors will be generated if the @code{point-stencil} function, which sets the stencil to an object with zero size: -@lilypond[quote,verbatim,relative=2] -{ - c4 c +@lilypond[quote,verbatim] +\relative { + c''4 c \once \override NoteHead.stencil = #point-stencil c4 c } @@ -1212,11 +1228,11 @@ required, as always, to precede the value itself in the @cindex BarLine, example of overriding @cindex break-visibility property, example -@lilypond[quote,fragment,ragged-right,verbatim,relative=2] -{ +@lilypond[quote,ragged-right,verbatim] +\relative { \time 12/16 \override Staff.BarLine.break-visibility = ##(#f #f #f) - c4 b8 c d16 c d8 | + c''4 b8 c d16 c d8 | g,8 a16 b8 c d4 e16 | e8 } @@ -1245,11 +1261,11 @@ transparent is: @cindex TimeSignature, example of overriding @cindex transparent property, example -@lilypond[quote,fragment,ragged-right,verbatim,relative=2] -{ +@lilypond[quote,ragged-right,verbatim] +\relative { \time 12/16 \override Staff.TimeSignature.transparent = ##t - c4 b8 c d16 c d8 | + c''4 b8 c d16 c d8 | g,8 a16 b8 c d4 e16 | e8 } @@ -1261,11 +1277,11 @@ frequent operation, so we have a shorthand for it called @code{\hide}: @funindex \hide -@lilypond[quote,fragment,ragged-right,verbatim,relative=2] -{ +@lilypond[quote,ragged-right,verbatim] +\relative { \time 12/16 \hide Staff.TimeSignature - c4 b8 c d16 c d8 | + c''4 b8 c d16 c d8 | g,8 a16 b8 c d4 e16 | e8 } @@ -1283,11 +1299,11 @@ instead: @cindex TimeSignature, example of overriding @cindex stencil property, example -@lilypond[quote,fragment,ragged-right,verbatim,relative=2] -{ +@lilypond[quote,ragged-right,verbatim] +\relative { \time 12/16 \omit Staff.TimeSignature - c4 b8 c d16 c d8 | + c''4 b8 c d16 c d8 | g,8 a16 b8 c d4 e16 | e8 } @@ -1327,11 +1343,11 @@ we write: @cindex BarLine, example of overriding @cindex color property, example -@lilypond[quote,fragment,ragged-right,verbatim,relative=2] -{ +@lilypond[quote,ragged-right,verbatim] +\relative { \time 12/16 \override Staff.BarLine.color = #white - c4 b8 c d16 c d8 | + c''4 b8 c d16 c d8 | g,8 a16 b8 c d4 e16 | e8 } @@ -1361,11 +1377,11 @@ converts X11 color symbols into the list of internal values like this: @cindex BarLine, example of overriding @cindex color property, example -@lilypond[quote,fragment,ragged-right,verbatim,relative=2] -{ +@lilypond[quote,ragged-right,verbatim] +\relative { \time 12/16 \override Staff.BarLine.color = #(x11-color 'white) - c4 b8 c d16 c d8 | + c''4 b8 c d16 c d8 | g,8 a16 b8 c d4 e16 | e8 } @@ -1392,11 +1408,11 @@ and to white it should be @code{(rgb-color 1 1 1)}: @cindex BarLine, example of overriding @cindex color property, example -@lilypond[quote,fragment,ragged-right,verbatim,relative=2] -{ +@lilypond[quote,ragged-right,verbatim] +\relative { \time 12/16 \override Staff.BarLine.color = #(rgb-color 1 1 1) - c4 b8 c d16 c d8 | + c''4 b8 c d16 c d8 | g,8 a16 b8 c d4 e16 | e8 } @@ -1417,8 +1433,8 @@ various shades of grey: @cindex color property, example @cindex x11-color, example of using -@lilypond[quote,fragment,ragged-right,verbatim,relative=2] -{ +@lilypond[quote,ragged-right,verbatim] +\relative { \time 12/16 \override Staff.StaffSymbol.color = #(x11-color 'grey30) \override Staff.TimeSignature.color = #(x11-color 'grey60) @@ -1426,7 +1442,7 @@ various shades of grey: \override Voice.NoteHead.color = #(x11-color 'grey85) \override Voice.Stem.color = #(x11-color 'grey85) \override Staff.BarLine.color = #(x11-color 'grey10) - c4 b8 c d16 c d8 | + c''4 b8 c d16 c d8 | g,8 a16 b8 c d4 e16 | e8 } @@ -1458,7 +1474,7 @@ how to introduce a new temporary staff, as in an @rglos{ossia}. @cindex alignAboveContext property, example @cindex @code{\with}, example -@lilypond[quote,fragment,ragged-right,verbatim,relative=2] +@lilypond[quote,ragged-right,verbatim] \new Staff ="main" { \relative { r4 g'8 g c4 c8 d | @@ -1485,7 +1501,7 @@ we simply set the stencil of each to @code{#f}, as follows: @cindex Clef, example of overriding @cindex TimeSignature, example of overriding -@lilypond[quote,fragment,ragged-right,verbatim,relative=2] +@lilypond[quote,ragged-right,verbatim] \new Staff ="main" { \relative { r4 g'8 g c4 c8 d | @@ -1548,7 +1564,7 @@ So we could replace the example above with @cindex Clef, example of overriding @cindex TimeSignature, example of overriding -@lilypond[quote,fragment,ragged-right,verbatim,relative=2] +@lilypond[quote,ragged-right,verbatim] \new Staff ="main" { \relative { r4 g'8 g c4 c8 d | @@ -1573,7 +1589,7 @@ It turns out that we can also employ the shorthands @code{\hide} and @code{\omit} for setting the @code{transparent} property and clearing the @code{stencil} here, leading to the result -@lilypond[quote,fragment,ragged-right,verbatim,relative=2] +@lilypond[quote,ragged-right,verbatim] \new Staff ="main" { \relative { r4 g'8 g c4 c8 d | @@ -1637,7 +1653,7 @@ Let's try it in our ossia example: @cindex TimeSignature, example of overriding @cindex fontSize property, example -@lilypond[quote,fragment,ragged-right,verbatim,relative=2] +@lilypond[quote,ragged-right,verbatim] \new Staff ="main" { \relative { r4 g'8 g c4 c8 d | @@ -1703,7 +1719,7 @@ objects in proportion. It is used like this: @cindex staff-space property, example @cindex stencil property, example -@lilypond[quote,fragment,ragged-right,verbatim,relative=2] +@lilypond[quote,ragged-right,verbatim] \new Staff ="main" { \relative { r4 g'8 g c4 c8 d | @@ -1810,11 +1826,11 @@ under @q{Text2}. @cindex markup example -@lilypond[quote,fragment,ragged-right,verbatim,relative=2] -c2^"Text1" -c2^"Text2" | -c2^"Text3" -c2^"Text4" | +@lilypond[quote,fragment,ragged-right,verbatim] +c''2^"Text1" +c''2^"Text2" | +c''2^"Text3" +c''2^"Text4" | @end lilypond Staves are also positioned, by default, as closely together as @@ -1878,14 +1894,14 @@ finally a bar with both slurs reverted back to the default behavior. @cindex Slur, example of overriding @cindex direction property, example -@lilypond[quote,verbatim,relative=2] -a4( g) c( a) | +@lilypond[quote,fragment,verbatim] +a'4( g') c''( a') | \override Slur.direction = #DOWN -a4( g) c( a) | +a'4( g') c''( a') | \override Slur.direction = #UP -a4( g) c( a) | +a'4( g') c''( a') | \revert Slur.direction -a4( g) c( a) | +a'4( g') c''( a') | @end lilypond Here we have used the constants @code{DOWN} and @code{UP}. @@ -1952,9 +1968,9 @@ effect of the other commands (which are implemented using Or, if just a single layout object needs to be forced up or down, the direction indicators, @code{^} or @code{_}, may be used: -@lilypond[quote,verbatim,relative=2] -a4( g) c( a) | -a4^( g) c_( a) | +@lilypond[quote,fragment,verbatim] +a'4( g') c''( a') | +a'4^( g') c''_( a') | @end lilypond @node Fingering @@ -1978,12 +1994,14 @@ specifying @code{DOWN} and @code{UP}: @cindex Fingering, example of overriding @cindex direction property, example -@lilypond[quote,verbatim,relative=2] -c4-5 a-3 f-1 c'-5 | -\override Fingering.direction = #DOWN -c4-5 a-3 f-1 c'-5 | -\override Fingering.direction = #UP -c4-5 a-3 f-1 c'-5 | +@lilypond[quote,verbatim] +\relative { + c''4-5 a-3 f-1 c'-5 | + \override Fingering.direction = #DOWN + c4-5 a-3 f-1 c'-5 | + \override Fingering.direction = #UP + c4-5 a-3 f-1 c'-5 | +} @end lilypond However, overriding the @code{direction} property is not the @@ -1994,10 +2012,12 @@ example using this method: @cindex fingering example -@lilypond[quote,verbatim,relative=2] -c4-5 a-3 f-1 c'-5 | -c4_5 a_3 f_1 c'_5 | -c4^5 a^3 f^1 c'^5 | +@lilypond[quote,verbatim] +\relative { + c''4-5 a-3 f-1 c'-5 | + c4_5 a_3 f_1 c'_5 | + c4^5 a^3 f^1 c'^5 | +} @end lilypond The @code{direction} property is ignored for chords, but the @@ -2007,10 +2027,12 @@ notes of a chord, as shown: @cindex fingering example -@lilypond[quote,verbatim,relative=2] -<c-5 g-3>4 -<c-5 g-3 e-2>4 -<c-5 g-3 e-2 c-1>4 +@lilypond[quote,verbatim] +\relative { + <c''-5 g-3>4 + <c-5 g-3 e-2>4 + <c-5 g-3 e-2 c-1>4 +} @end lilypond @noindent @@ -2019,10 +2041,12 @@ individual fingering numbers above or below: @cindex fingering example -@lilypond[quote,verbatim,relative=2] -<c-5 g-3 e-2 c-1>4 -<c^5 g_3 e_2 c_1>4 -<c^5 g^3 e^2 c_1>4 +@lilypond[quote,verbatim] +\relative { + <c''-5 g-3 e-2 c-1>4 + <c^5 g_3 e_2 c_1>4 + <c^5 g^3 e^2 c_1>4 +} @end lilypond Even greater control over the placement of fingering of the @@ -2060,22 +2084,24 @@ Here are a few examples: @cindex @code{\set}, example of using @cindex fingeringOrientations property, example -@lilypond[quote,fragment,ragged-right,verbatim,relative=1] -\set fingeringOrientations = #'(left) -<f-2>4 -<c-1 e-2 g-3 b-5>4 -\set fingeringOrientations = #'(left) -<f-2>4 -<c-1 e-2 g-3 b-5>4 | -\set fingeringOrientations = #'(up left down) -<f-2>4 -<c-1 e-2 g-3 b-5>4 -\set fingeringOrientations = #'(up left) -<f-2>4 -<c-1 e-2 g-3 b-5>4 | -\set fingeringOrientations = #'(right) -<f-2>4 -<c-1 e-2 g-3 b-5>4 +@lilypond[quote,ragged-right,verbatim] +\relative { + \set fingeringOrientations = #'(left) + <f'-2>4 + <c-1 e-2 g-3 b-5>4 + \set fingeringOrientations = #'(left) + <f-2>4 + <c-1 e-2 g-3 b-5>4 | + \set fingeringOrientations = #'(up left down) + <f-2>4 + <c-1 e-2 g-3 b-5>4 + \set fingeringOrientations = #'(up left) + <f-2>4 + <c-1 e-2 g-3 b-5>4 | + \set fingeringOrientations = #'(right) + <f-2>4 + <c-1 e-2 g-3 b-5>4 +} @end lilypond @noindent @@ -2084,23 +2110,25 @@ could be reduced. The default value can be seen from the @code{Fingering} object in the IR to be @w{@code{-5}}, so let's try @w{@code{-7}}: -@lilypond[quote,fragment,ragged-right,verbatim,relative=1] -\override Fingering.font-size = #-7 -\set fingeringOrientations = #'(left) -<f-2>4 -<c-1 e-2 g-3 b-5>4 -\set fingeringOrientations = #'(left) -<f-2>4 -<c-1 e-2 g-3 b-5>4 | -\set fingeringOrientations = #'(up left down) -<f-2>4 -<c-1 e-2 g-3 b-5>4 -\set fingeringOrientations = #'(up left) -<f-2>4 -<c-1 e-2 g-3 b-5>4 | -\set fingeringOrientations = #'(right) -<f-2>4 -<c-1 e-2 g-3 b-5>4 +@lilypond[quote,ragged-right,verbatim] +\relative { + \override Fingering.font-size = #-7 + \set fingeringOrientations = #'(left) + <f'-2>4 + <c-1 e-2 g-3 b-5>4 + \set fingeringOrientations = #'(left) + <f-2>4 + <c-1 e-2 g-3 b-5>4 | + \set fingeringOrientations = #'(up left down) + <f-2>4 + <c-1 e-2 g-3 b-5>4 + \set fingeringOrientations = #'(up left) + <f-2>4 + <c-1 e-2 g-3 b-5>4 | + \set fingeringOrientations = #'(right) + <f-2>4 + <c-1 e-2 g-3 b-5>4 +} @end lilypond @node Outside-staff objects @@ -2195,7 +2223,7 @@ these. @cindex TextSpanner, example of overriding @cindex bound-details property, example -@lilypond[quote,fragment,ragged-right,verbatim,relative=1] +@lilypond[quote,fragment,ragged-right,verbatim] % Set details for later Text Spanner \override TextSpanner.bound-details.left.text = \markup { \small \bold Slower } @@ -2203,18 +2231,18 @@ these. \dynamicUp % Start Ottava Bracket \ottava #1 -c'4 \startTextSpan +c''4 \startTextSpan % Add Dynamic Text and hairpin -c4\pp\< -c4 +c''4\pp\< +c''4 % Add Text Script -c4^Text | -c4 c +c''4^Text | +c''4 c'' % Add Dynamic Text and terminate hairpin -c4\ff c \stopTextSpan | +c''4\ff c'' \stopTextSpan | % Stop Ottava Bracket \ottava #0 -c,4 c c c | +c'4 c' c' c' | @end lilypond This example also shows how to create Text Spanners -- @@ -2245,7 +2273,7 @@ in the @code{Staff} context: @cindex TextSpanner, example of overriding @cindex bound-details property, example -@lilypond[quote,fragment,ragged-right,verbatim,relative=1] +@lilypond[quote,fragment,ragged-right,verbatim] % Set details for later Text Spanner \override TextSpanner.bound-details.left.text = \markup { \small \bold Slower } @@ -2255,19 +2283,19 @@ in the @code{Staff} context: \once \override Staff.OttavaBracket.outside-staff-priority = #340 % Start Ottava Bracket \ottava #1 -c'4 \startTextSpan +c''4 \startTextSpan % Add Dynamic Text -c4\pp +c''4\pp % Add Dynamic Line Spanner -c4\< +c''4\< % Add Text Script -c4^Text | -c4 c +c''4^Text | +c''4 c'' % Add Dynamic Text -c4\ff c \stopTextSpan | +c''4\ff c'' \stopTextSpan | % Stop Ottava Bracket \ottava #0 -c,4 c c c | +c'4 c' c' c' | @end lilypond Note that some of these objects, in particular bar numbers, @@ -2292,14 +2320,16 @@ can be set to a numerical value to cause it to be placed along with other outside-staff objects according to that value. Here's an example showing the effect of the two methods: -@lilypond[quote,verbatim,relative=2] -c4( c^\markup { \tiny \sharp } d4.) c8 | -c4( -\once \override TextScript.avoid-slur = #'inside -\once \override TextScript.outside-staff-priority = ##f -c4^\markup { \tiny \sharp } d4.) c8 | -\once \override Slur.outside-staff-priority = #500 -c4( c^\markup { \tiny \sharp } d4.) c8 | +@lilypond[quote,verbatim] +\relative c'' { + c4( c^\markup { \tiny \sharp } d4.) c8 | + c4( + \once \override TextScript.avoid-slur = #'inside + \once \override TextScript.outside-staff-priority = ##f + c4^\markup { \tiny \sharp } d4.) c8 | + \once \override Slur.outside-staff-priority = #500 + c4( c^\markup { \tiny \sharp } d4.) c8 | +} @end lilypond Changing the @code{outside-staff-priority} can also be used to @@ -2314,12 +2344,12 @@ in the IR or in the tables above, and increase the priority of @cindex TextScript, example of overriding @cindex outside-staff-priority property, example -@lilypond[quote,fragment,ragged-right,verbatim,relative=2] -c2^"Text1" -c2^"Text2" | +@lilypond[quote,fragment,ragged-right,verbatim] +c''2^"Text1" +c''2^"Text2" | \once \override TextScript.outside-staff-priority = #500 -c2^"Text3" -c2^"Text4" | +c''2^"Text3" +c''2^"Text4" | @end lilypond This certainly lifts @qq{Text3} above @qq{Text4} but it also lifts it @@ -2345,12 +2375,12 @@ as far as laying out the music is concerned. The @code{\textLengthOn} command reverses this behavior, causing the notes to be spaced out as far as is necessary to accommodate the text: -@lilypond[quote,fragment,ragged-right,verbatim,relative=2] +@lilypond[quote,fragment,ragged-right,verbatim] \textLengthOn % Cause notes to space out to accommodate text -c2^"Text1" -c2^"Text2" | -c2^"Text3" -c2^"Text4" | +c''2^"Text1" +c''2^"Text2" | +c''2^"Text3" +c''2^"Text4" | @end lilypond The command to revert to the default behavior is @@ -2371,25 +2401,27 @@ example to show how markup text interacts with such notes. @cindex TextScript, example of overriding @cindex outside-staff-priority property, example -@lilypond[quote,fragment,ragged-right,verbatim,relative=2] -% This markup is short enough to fit without collision -c2^"Tex" c'' | -R1 | - -% This is too long to fit, so it is displaced upwards -c,,2^"Text" c'' | -R1 | - -% Turn off collision avoidance -\once \override TextScript.outside-staff-priority = ##f -c,,2^"Long Text " c'' | -R1 | - -% Turn off collision avoidance -\once \override TextScript.outside-staff-priority = ##f -\textLengthOn % and turn on textLengthOn -c,,2^"Long Text " % Spaces at end are honored -c''2 | +@lilypond[quote,ragged-right,verbatim] +\relative { + % This markup is short enough to fit without collision + c''2^"Tex" c'' | + R1 | + + % This is too long to fit, so it is displaced upwards + c,,2^"Text" c'' | + R1 | + + % Turn off collision avoidance + \once \override TextScript.outside-staff-priority = ##f + c,,2^"Long Text " c'' | + R1 | + + % Turn off collision avoidance + \once \override TextScript.outside-staff-priority = ##f + \textLengthOn % and turn on textLengthOn + c,,2^"Long Text " % Spaces at end are honored + c''2 | +} @end lilypond @node Dynamics placement @@ -2406,13 +2438,15 @@ all within-staff objects such as phrasing slurs and bar numbers. This can give quite acceptable results, as this example shows: -@lilypond[quote,fragment,ragged-right,verbatim,relative=1] -\clef "bass" -\key aes \major -\time 9/8 -\dynamicUp -bes4.~\f\< \( bes4 bes8 des4\ff\> c16 bes\! | -ees,2.~\)\mf ees4 r8 | +@lilypond[quote,ragged-right,verbatim] +\relative { + \clef "bass" + \key aes \major + \time 9/8 + \dynamicUp + bes4.~\f\< \( bes4 bes8 des4\ff\> c16 bes\! | + ees,2.~\)\mf ees4 r8 | +} @end lilypond However, if the notes and attached dynamics are close @@ -2421,9 +2455,9 @@ by displacing later dynamic markings further away, but this may not be the optimum placement, as this rather artificial example shows: -@lilypond[quote,fragment,ragged-right,verbatim,relative=2] +@lilypond[quote,ragged-right,verbatim,fragment] \dynamicUp -a4\f b\mf a\mp b\p +\relative { a'4\f b\mf a\mp b\p } @end lilypond @noindent @@ -2476,11 +2510,11 @@ Let's see if this works in our previous example: @cindex extra-spacing-width property, example -@lilypond[quote,fragment,ragged-right,verbatim,relative=2] +@lilypond[quote,ragged-right,verbatim,fragment] \dynamicUp % Extend width by 1 staff space \override DynamicText.extra-spacing-width = #'(-0.5 . 0.5) -a4\f b\mf a\mp b\p +\relative { a'4\f b\mf a\mp b\p } @end lilypond @noindent @@ -2989,8 +3023,8 @@ above or below notes. @cindex Script, example of overriding @cindex padding property, example -@lilypond[quote,fragment,relative=1,verbatim] -c2\fermata +@lilypond[quote,fragment,verbatim] +c'2\fermata \override Script.padding = #3 b2\fermata @end lilypond @@ -2998,15 +3032,15 @@ b2\fermata @cindex MetronomeMark, example of overriding @cindex padding property, example -@lilypond[quote,fragment,relative=1,verbatim] +@lilypond[quote,fragment,verbatim] % This will not work, see below \override MetronomeMark.padding = #3 \tempo 4 = 120 -c1 | +c'1 | % This works \override Score.MetronomeMark.padding = #3 \tempo 4 = 80 -d1 | +d'1 | @end lilypond Note in the second example how important it is to figure out what @@ -3085,9 +3119,9 @@ example taken from the previous section: @cindex DynamicLineSpanner, example of overriding @cindex staff-padding property, example -@lilypond[quote,fragment,ragged-right,verbatim,relative=2] +@lilypond[quote,fragment,ragged-right,verbatim] \override DynamicLineSpanner.staff-padding = #3 -a4\f b\mf a\p b\mp +\relative { a'4\f b\mf a\p b\mp } @end lilypond @@ -3101,11 +3135,11 @@ right edge with the reference point of the parent note: @cindex StringNumber, example of overriding @cindex self-alignment-X property, example -@lilypond[quote,fragment,ragged-right,verbatim,relative=3] +@lilypond[quote,fragment,ragged-right,verbatim] \voiceOne -<a\2> +<a''\2> \once \override StringNumber.self-alignment-X = #RIGHT -<a\2> +<a''\2> @end lilypond @node The staff-position property @@ -3121,8 +3155,8 @@ handling between notes and between notes and rests is done only for notes and rests that occur at the same time. Here's an example of a collision of this type: -@lilypond[quote,verbatim,fragment,ragged-right, relative=1] -<< { c4 c c c } \\ { R1 } >> +@lilypond[quote,verbatim,ragged-right] +<< \relative { c'4 c c c } \\ { R1 } >> @end lilypond The best solution here is to move the multimeasure rest down, since the @@ -3134,9 +3168,9 @@ to move it, say, four half-staff spaces down to @w{@code{-8}}. @cindex MultiMeasureRest, example of overriding @cindex staff-position property, example -@lilypond[quote,verbatim,fragment,ragged-right, relative=1] +@lilypond[quote,verbatim,ragged-right] << - { c4 c c c } + \relative { c'4 c c c } \\ \override MultiMeasureRest.staff-position = #-8 { R1 } @@ -3163,10 +3197,10 @@ the left, and 1.8 staff space downwards: @cindex Fingering, example of overriding @cindex extra-offset property, example -@lilypond[quote,relative=1,verbatim] -f4-5 +@lilypond[quote,fragment,verbatim] +f'4-5 \once \override Fingering.extra-offset = #'(-0.3 . -1.8) -f4-5 +f'4-5 @end lilypond @@ -3186,8 +3220,8 @@ manually. Here's an example in which the phrasing slur and slur collide: -@lilypond[quote,verbatim,fragment,ragged-right,relative=2] -a8 \( ( a'16 ) a \) +@lilypond[quote,verbatim,ragged-right] +\relative { a'8 \( ( a'16 ) a \) } @end lilypond @cindex PhrasingSlur, example of overriding @@ -3200,9 +3234,9 @@ centre line and the right end to 4.5 above, and LilyPond will select the phrasing slur from the candidates it has found with its end points closest to these: -@lilypond[quote,verbatim,fragment,ragged-right,relative=2] +@lilypond[quote,verbatim,fragment,ragged-right] \once \override PhrasingSlur.positions = #'(2.5 . 4.5) -a8 \( ( a'16 ) a \) +a'8 \( ( a''16 ) a'' \) @end lilypond This is an improvement, but why not lower the right end of the slur @@ -3216,23 +3250,23 @@ do this, see @ruser{Modifying ties and slurs}. Here's a further example. We see that the beams collide with the ties: -@lilypond[quote,verbatim,fragment,ragged-right,relative=1] +@lilypond[quote,verbatim,ragged-right] { \time 4/2 << - { c1~ 2. e8 f } + \relative { c'1~ 2. e8 f } \\ - { - e'8 e e e + \relative { + e''8 e e e e e e e f2 g } >> << - { c,,1~ 2. e8 f } + \relative { c'1~ 2. e8 f } \\ - { - e'8 e e e + \relative { + e''8 e e e e e e e f2 g } @@ -3248,24 +3282,24 @@ say, 1: @cindex Beam, example of overriding @cindex positions property, example -@lilypond[quote,verbatim,ragged-right,relative=1] +@lilypond[quote,verbatim,ragged-right] { \time 4/2 << - { c1~ 2. e8 f } + \relative { c'1~ 2. e8 f } \\ - { + \relative { \override Beam.positions = #'(-1 . -1) - e'8 e e e + e''8 e e e e e e e f2 g } >> << - { c,,1~ 2. e8 f } + \relative { c'1~ 2. e8 f } \\ - { - e'8 e e e + \relative { + e''8 e e e e e e e f2 g \revert Beam.positions @@ -3890,8 +3924,8 @@ voices using ties. Normally, only notes in the same voice can be connected with ties. By using two voices, with the tied notes in one of them -@lilypond[quote,fragment,relative=2] -<< { b8~ 8\noBeam } \\ { b8[ g] } >> +@lilypond[quote] +<< { b'8~ 8\noBeam } \\ { b'8[ g'] } >> @end lilypond @noindent @@ -3904,15 +3938,15 @@ appears to cross voices: @cindex @code{\omit}, example @cindex example of @code{\omit} -@lilypond[quote,fragment,relative=2,verbatim] +@lilypond[quote,verbatim] << { \once \omit Stem \once \omit Flag - b8~ 8\noBeam + b'8~ 8\noBeam } \\ - { b8[ g] } + { b'8[ g'] } >> @end lilypond diff --git a/Documentation/notation/ancient.itely b/Documentation/notation/ancient.itely index 91a56f3b53..685c3329f5 100644 --- a/Documentation/notation/ancient.itely +++ b/Documentation/notation/ancient.itely @@ -430,10 +430,10 @@ mensural C clef @code{mensural-c3}, @code{mensural-c4},@* @code{mensural-c5} @tab -@lilypond[relative=1,notime] +@lilypond[fragment,notime] \clef "mensural-c2" \override NoteHead.style = #'mensural - c1 + c'1 @end lilypond @item @@ -441,10 +441,10 @@ mensural F clef @tab @code{mensural-f} @tab -@lilypond[relative=1,notime] +@lilypond[fragment,notime] \clef "mensural-f" \override NoteHead.style = #'mensural - c1 + c'1 @end lilypond @item @@ -452,10 +452,10 @@ mensural G clef @tab @code{mensural-g} @tab -@lilypond[relative=1,notime] +@lilypond[fragment,notime] \clef "mensural-g" \override NoteHead.style = #'mensural - c1 + c'1 @end lilypond @item @@ -465,10 +465,10 @@ black mensural C clef @code{blackmensural-c3}, @code{blackmensural-c4},@* @code{blackmensural-c5} @tab -@lilypond[relative=1,notime] +@lilypond[fragment,notime] \clef "blackmensural-c2" \override NoteHead.style = #'mensural - c1 + c'1 @end lilypond @item @@ -477,8 +477,8 @@ neomensural C clef @code{neomensural-c1}, @code{neomensural-c2},@* @code{neomensural-c3}, @code{neomensural-c4} @tab -@lilypond[relative=1,notime] - \clef "neomensural-c2" c1 +@lilypond[fragment,notime] + \clef "neomensural-c2" c'1 @end lilypond @item @@ -489,10 +489,10 @@ petrucci style C clefs, for use on different staff lines @code{petrucci-c3}, @code{petrucci-c4},@* @code{petrucci-c5} @tab -@lilypond[relative=1,notime] +@lilypond[fragment,notime] \clef "petrucci-c2" \override NoteHead.style = #'mensural - c1 + c'1 @end lilypond @item @@ -502,10 +502,10 @@ petrucci style F clefs, for use on different staff lines @code{petrucci-f3}, @code{petrucci-f4},@* @code{petrucci-f5} @tab -@lilypond[relative=1,notime] +@lilypond[fragment,notime] \clef "petrucci-f3" \override NoteHead.style = #'mensural - c1 + c'1 @end lilypond @item @@ -513,10 +513,10 @@ petrucci style G clef @tab @code{petrucci-g} @tab -@lilypond[relative=1,notime] +@lilypond[fragment,notime] \clef "petrucci-g" \override NoteHead.style = #'mensural - c1 + c'1 @end lilypond @end multitable @@ -596,8 +596,8 @@ to select ancient time signatures. Supported styles are @code{neomensural} style. The following examples show the differences in style: -@lilypond[ragged-right,relative=1,quote] -{ +@lilypond[ragged-right,quote] +\relative c' { \textLengthOn \time 2/2 @@ -729,13 +729,15 @@ Use the @code{flag-style} property of grob @code{Stem} to select ancient flags. Besides the @code{default} flag style, only the @code{mensural} style is supported. -@lilypond[quote,fragment,ragged-right,verbatim,relative=1] -\override Flag.style = #'mensural -\override Stem.thickness = #1.0 -\override NoteHead.style = #'mensural -\autoBeamOff -c8 d e f c16 d e f c32 d e f s8 -c'8 d e f c16 d e f c32 d e f +@lilypond[quote,fragment,ragged-right,verbatim] +\relative c' { + \override Flag.style = #'mensural + \override Stem.thickness = #1.0 + \override NoteHead.style = #'mensural + \autoBeamOff + c8 d e f c16 d e f c32 d e f s8 + c'8 d e f c16 d e f c32 d e f +} @end lilypond Note that the innermost flare of each mensural flag is @@ -862,10 +864,12 @@ switched on by setting @code{suggestAccidentals} to true. @funindex suggestAccidentals -@lilypond[verbatim,relative=1] -fis gis -\set suggestAccidentals = ##t -ais bis +@lilypond[verbatim] +\relative { + fis' gis + \set suggestAccidentals = ##t + ais bis +} @end lilypond This will treat @emph{every} subsequent accidental as @@ -1086,14 +1090,14 @@ Editio Vaticana style do clef @code{vaticana-do1}, @code{vaticana-do2},@* @code{vaticana-do3} @tab -@lilypond[relative=1,notime] +@lilypond[fragment,notime] \override Staff.StaffSymbol.line-count = #4 \override Staff.StaffSymbol.color = #red \override Staff.LedgerLineSpanner.color = #red \hide Voice.Stem \override NoteHead.style = #'vaticana.punctum \clef "vaticana-do2" - c + c' @end lilypond @item @@ -1101,14 +1105,14 @@ Editio Vaticana style fa clef @tab @code{vaticana-fa1}, @code{vaticana-fa2} @tab -@lilypond[relative=1,notime] +@lilypond[fragment,notime] \override Staff.StaffSymbol.line-count = #4 \override Staff.StaffSymbol.color = #red \override Staff.LedgerLineSpanner.color = #red \hide Voice.Stem \override NoteHead.style = #'vaticana.punctum \clef "vaticana-fa2" - c + c' @end lilypond @item @@ -1117,14 +1121,14 @@ Editio Medicaea style do clef @code{medicaea-do1}, @code{medicaea-do2},@* @code{medicaea-do3} @tab -@lilypond[relative=1,notime] +@lilypond[fragment,notime] \override Staff.StaffSymbol.line-count = #4 \override Staff.StaffSymbol.color = #red \override Staff.LedgerLineSpanner.color = #red \hide Voice.Stem \override NoteHead.style = #'medicaea.punctum \clef "medicaea-do2" - c + c' @end lilypond @item @@ -1132,14 +1136,14 @@ Editio Medicaea style fa clef @tab @code{medicaea-fa1}, @code{medicaea-fa2} @tab -@lilypond[relative=1,notime] +@lilypond[fragment,notime] \override Staff.StaffSymbol.line-count = #4 \override Staff.StaffSymbol.color = #red \override Staff.LedgerLineSpanner.color = #red \hide Voice.Stem \override NoteHead.style = #'medicaea.punctum \clef "medicaea-fa2" - c + c' @end lilypond @item @@ -1148,14 +1152,14 @@ hufnagel style do clef @code{hufnagel-do1}, @code{hufnagel-do2},@* @code{hufnagel-do3} @tab -@lilypond[relative=1,notime] +@lilypond[fragment,notime] \override Staff.StaffSymbol.line-count = #4 \override Staff.StaffSymbol.color = #red \override Staff.LedgerLineSpanner.color = #red \hide Voice.Stem \override NoteHead.style = #'hufnagel.punctum \clef "hufnagel-do2" - c + c' @end lilypond @item @@ -1163,14 +1167,14 @@ hufnagel style fa clef @tab @code{hufnagel-fa1}, @code{hufnagel-fa2} @tab -@lilypond[relative=1,notime] +@lilypond[fragment,notime] \override Staff.StaffSymbol.line-count = #4 \override Staff.StaffSymbol.color = #red \override Staff.LedgerLineSpanner.color = #red \hide Voice.Stem \override NoteHead.style = #'hufnagel.punctum \clef "hufnagel-fa2" - c + c' @end lilypond @item @@ -1178,13 +1182,13 @@ hufnagel style combined do/fa clef @tab @code{hufnagel-do-fa} @tab -@lilypond[relative=1,notime] +@lilypond[fragment,notime] \override Staff.StaffSymbol.color = #red \override Staff.LedgerLineSpanner.color = #red \hide Voice.Stem \override NoteHead.style = #'hufnagel.punctum \clef "hufnagel-do-fa" - c + c' @end lilypond @end multitable @@ -2437,10 +2441,10 @@ Kievan notation that were used in Galicia to notate Rusyn plainchant. There is only one clef used in Kievan notation (the Tse-fa-ut Clef). It is used to indicate the position of @code{c}: -@lilypond[quote,relative=1,notime,verbatim] +@lilypond[quote,fragment,notime,verbatim] \clef "kievan-do" \kievanOn - c + c' @end lilypond @seealso @@ -2508,11 +2512,11 @@ in Kievan notation. The sharp sign is not used in Synodal music but may occur in earlier manuscripts. It has been included primarily for the sake of compatibility. -@lilypond[quote,relative=1,notime,verbatim] +@lilypond[quote,fragment,notime,verbatim] \clef "kievan-do" \override Accidental.glyph-name-alist = #alteration-kievan-glyph-name-alist -bes' dis, +bes' dis' @end lilypond @seealso @@ -2532,10 +2536,10 @@ A decorative figure is commonly placed at the end of a piece of Kievan notation, which may be called the Kievan final bar line. It can be invoked as @code{\bar "k"}. -@lilypond[quote,relative=1,notime,verbatim] +@lilypond[quote,fragment,notime,verbatim] \kievanOn \clef "kievan-do" - c \bar "k" + c' \bar "k" @end lilypond @seealso diff --git a/Documentation/notation/changing-defaults.itely b/Documentation/notation/changing-defaults.itely index 6b9c7410f5..2472775923 100644 --- a/Documentation/notation/changing-defaults.itely +++ b/Documentation/notation/changing-defaults.itely @@ -347,33 +347,31 @@ context. The @code{\new} prefix without a name is commonly used to create scores with many staves: -@lilypond[quote,verbatim,relative=2] +@lilypond[quote,verbatim] << - \new Staff { + \new Staff \relative { % leave the Voice context to be created implicitly - c4 c - } - \new Staff { - d4 d + c''4 c } + \new Staff \relative { + d''4 d +} >> @end lilypond @noindent and to place several voices into one staff: -@lilypond[quote,verbatim,relative=2] -<< - \new Staff << - \new Voice { - \voiceOne - c8 c c4 c c - } - \new Voice { - \voiceTwo - g4 g g g - } - >> +@lilypond[quote,verbatim] +\new Staff << + \new Voice \relative { + \voiceOne + c''8 c c4 c c + } + \new Voice \relative { + \voiceTwo + g'4 g g g + } >> @end lilypond @@ -388,18 +386,16 @@ action taken: @code{\new} with or without a name will always create a fresh, distinct, context, even if one with the same name already exists: -@lilypond[quote,verbatim,relative=2] -<< - \new Staff << - \new Voice = "A" { - \voiceOne - c8 c c4 c c - } - \new Voice = "A" { - \voiceTwo - g4 g g g - } - >> +@lilypond[quote,verbatim] +\new Staff << + \new Voice = "A" \relative { + \voiceOne + c''8 c c4 c c + } + \new Voice = "A" \relative { + \voiceTwo + g'4 g g g + } >> @end lilypond @@ -727,16 +723,16 @@ where the @dots{} should be the name of an engraver. Here is a simple example which removes @code{Time_signature_engraver} and @code{Clef_engraver} from a @code{Staff} context, -@lilypond[quote,relative=1,verbatim] +@lilypond[quote,verbatim] << - \new Staff { - f2 g + \new Staff \relative { + f'2 g } \new Staff \with { \remove "Time_signature_engraver" \remove "Clef_engraver" - } { - f2 g2 + } \relative { + f'2 g2 } >> @end lilypond @@ -1469,8 +1465,8 @@ Installed Files: Suppose we want to move the fingering indication in the fragment below: -@lilypond[quote,relative=2,verbatim] -c-2 +@lilypond[quote,fragment,verbatim] +c''-2 @end lilypond If you visit the documentation on fingering instructions (in @@ -1685,8 +1681,8 @@ is directly generated from this definition. Recall that we wanted to change the position of the @b{2} in -@lilypond[quote,relative=2,verbatim] -c-2 +@lilypond[quote,fragment,verbatim] +c''-2 @end lilypond Since the @b{2} is vertically positioned next to its note, we have to @@ -1726,9 +1722,9 @@ between the note and the fingering: Inserting this command before the Fingering object is created, i.e., before @code{c2}, yields the following result: -@lilypond[quote,relative=2,verbatim] +@lilypond[quote,fragment,verbatim] \once \override Voice.Fingering.padding = #3 -c-2 +c''-2 @end lilypond @@ -1832,12 +1828,12 @@ unit). Since the command specifies @code{Staff} as context, it only applies to the current staff. Other staves will keep their normal appearance. Here we see the command in action: -@lilypond[quote,verbatim,relative=2] -c4 +@lilypond[quote,fragment,verbatim] +c''4 \override Staff.Stem.thickness = #4.0 -c4 -c4 -c4 +c''4 +c''4 +c''4 @end lilypond The @code{\override} command changes the definition of the @code{Stem} @@ -1848,11 +1844,11 @@ Analogous to @code{\set}, the @var{context} argument may be left out, causing the default context @code{Voice} to be used. Adding @code{\once} applies the change during one timestep only. -@lilypond[quote,verbatim,relative=2] -c4 +@lilypond[quote,fragment,verbatim] +c''4 \once \override Stem.thickness = #4.0 -c4 -c4 +c''4 +c''4 @end lilypond The @code{\override} must be done before the object is @@ -1860,11 +1856,11 @@ started. Therefore, when altering @emph{Spanner} objects such as slurs or beams, the @code{\override} command must be executed at the moment when the object is created. In this example, -@lilypond[quote,verbatim,relative=2] +@lilypond[quote,fragment,verbatim] \override Slur.thickness = #3.0 -c8[( c +c''8[( c'' \override Beam.beam-thickness = #0.6 -c8 c]) +c''8 c'']) @end lilypond @noindent @@ -1942,7 +1938,7 @@ this. Context properties are modified with @code{\set}. For example, multimeasure rests will be combined into a single bar if the context property @code{skipBars} is set to @code{#t}: -@lilypond[quote,verbatim,relative=2] +@lilypond[quote,fragment,verbatim] R1*2 \set Score.skipBars = ##t R1*2 @@ -1952,17 +1948,16 @@ If the @var{context} argument is left out, then the property will be set in the current bottom context (typically @code{ChordNames}, @code{Voice}, @code{TabVoice}, or @code{Lyrics}). -@lilypond[quote,verbatim,relative=2] +@lilypond[quote,fragment,verbatim] \set Score.autoBeaming = ##f -<< - { - e8 e e e - \set autoBeaming = ##t - e8 e e e - } \\ { - c8 c c c c8 c c c - } ->> +\relative { + e''8 e e e + \set autoBeaming = ##t + e8 e e e +} \\ +\relative { + c''8 c c c c8 c c c +} @end lilypond The change is applied @q{on-the-fly}, during the music, so that the @@ -1974,7 +1969,7 @@ that you wish to change -- for example, attempting to set the @code{Voice}, will have no effect, because skipBars is a property of the @code{Score} context. -@lilypond[quote,verbatim,relative=2] +@lilypond[quote,fragment,verbatim] R1*2 \set skipBars = ##t R1*2 @@ -1999,18 +1994,17 @@ the definition only if it is set in @var{context}. Properties that have been set in enclosing contexts will not be altered by an unset in an enclosed context: -@lilypond[quote,verbatim,relative=2] +@lilypond[quote,fragment,verbatim] \set Score.autoBeaming = ##t -<< - { - \unset autoBeaming - e8 e e e - \unset Score.autoBeaming - e8 e e e - } \\ { - c8 c c c c8 c c c - } ->> +\relative { + \unset autoBeaming + e''8 e e e + \unset Score.autoBeaming + e8 e e e +} \\ +\relative { + c''8 c c c c8 c c c +} @end lilypond Like @code{\set}, the @var{context} argument does not have to be @@ -2029,11 +2023,11 @@ are equivalent if the current bottom context is @code{Voice}. Preceding a @code{\set} command by @code{\once} makes the setting apply to only a single time-step: -@lilypond[quote,verbatim,relative=2] -c4 +@lilypond[quote,fragment,verbatim] +c''4 \once \set fontSize = #4.7 -c4 -c4 +c''4 +c''4 @end lilypond A full description of all available context properties is in the @@ -2075,27 +2069,27 @@ For example, we can increase the thickness of a note stem by overriding the @code{thickness} property of the @code{Stem} object: -@lilypond[quote,verbatim,relative=2] -c4 c +@lilypond[quote,fragment,verbatim] +c''4 c'' \override Voice.Stem.thickness = #3.0 -c4 c +c''4 c'' @end lilypond If no context is specified in an @code{\override}, the bottom context is used: -@lilypond[quote,verbatim,relative=2] -{ \override Staff.Stem.thickness = #3.0 - << - { - e4 e - \override Stem.thickness = #0.5 - e4 e - } \\ { - c4 c c c - } - >> -} +@lilypond[quote,fragment,verbatim] +\override Staff.Stem.thickness = #3.0 +<< + \relative { + e''4 e + \override Stem.thickness = #0.5 + e4 e + } \\ + \relative { + c''4 c c c + } +>> @end lilypond Some tweakable options are called @q{subproperties} and reside inside @@ -2126,31 +2120,32 @@ The syntax for the @code{\revert} command is For example, -@lilypond[quote,verbatim,relative=2] -c4 -\override Voice.Stem.thickness = #3.0 -c4 c -\revert Voice.Stem.thickness -c4 +@lilypond[quote,verbatim] +\relative { + c''4 + \override Voice.Stem.thickness = #3.0 + c4 c + \revert Voice.Stem.thickness + c4 +} @end lilypond The effects of @code{\override} and @code{\revert} apply to all grobs in the affected context from the current time forward: -@lilypond[quote,verbatim,relative=2] -{ - << - { - e4 - \override Staff.Stem.thickness = #3.0 - e4 e e - } \\ { - c4 c c - \revert Staff.Stem.thickness - c4 - } - >> -} +@lilypond[quote,verbatim] +<< + \relative { + e''4 + \override Staff.Stem.thickness = #3.0 + e4 e e + } \\ + \relative { + c''4 c c + \revert Staff.Stem.thickness + c4 + } +>> @end lilypond @funindex \once @@ -2159,19 +2154,18 @@ grobs in the affected context from the current time forward: @code{\once} can be used with @code{\override} to affect only the current time step: -@lilypond[quote,verbatim,relative=2] -{ - << - { - \override Stem.thickness = #3.0 - e4 e e e - } \\ { - c4 - \once \override Stem.thickness = #3.0 - c4 c c - } - >> -} +@lilypond[quote,verbatim] +<< + \relative c { + \override Stem.thickness = #3.0 + e''4 e e e + } \\ + \relative { + c''4 + \once \override Stem.thickness = #3.0 + c4 c c + } +>> @end lilypond @@ -2241,16 +2235,18 @@ graphical objects. For objects that are created directly from an item in the input file, you can use the @code{\tweak} command. For example: -@lilypond[relative=2,verbatim,quote] -< c - \tweak color #red - d - g - \tweak duration-log #1 - a -> 4 --\tweak padding #8 --^ +@lilypond[verbatim,quote] +\relative { + < c'' + \tweak color #red + d + g + \tweak duration-log #1 + a + > 4 + -\tweak padding #8 + -^ +} @end lilypond @@ -2276,15 +2272,15 @@ note, and able to modify it. So, this works: -@lilypond[relative=2,verbatim,quote] -<\tweak color #red c>4 +@lilypond[verbatim,fragment,quote] +<\tweak color #red c''>4 @end lilypond @noindent but this does not: -@lilypond[relative=2,verbatim,quote] -\tweak color #red c4 +@lilypond[verbatim,fragment,quote] +\tweak color #red c''4 @end lilypond @end ignore @@ -2313,20 +2309,20 @@ include the following: In this example, the color of one note head and the type of another note head are modified within a single chord: -@lilypond[relative=2,verbatim,quote] -< c +@lilypond[verbatim,fragment,quote] +< c'' \tweak color #red - d - g + d'' + g'' \tweak duration-log #1 - a + a'' > 4 @end lilypond @code{\tweak} can be used to modify slurs: -@lilypond[verbatim,quote,relative=1] -c-\tweak thickness #5 ( d e f) +@lilypond[verbatim,quote] +\relative { c'-\tweak thickness #5 ( d e f) } @end lilypond @@ -2337,10 +2333,10 @@ Tweaking a whole chord does not do anything since its music event only acts as a container, and all layout objects are created from events inside of the @code{EventChord}: -@lilypond[relative=2,verbatim,quote] -\tweak color #red c4 -\tweak color #red <c e>4 -<\tweak color #red c e>4 +@lilypond[verbatim,fragment,quote] +\tweak color #red c''4 +\tweak color #red <c'' e''>4 +<\tweak color #red c'' e''>4 @end lilypond The simple @code{\tweak} command cannot be used to modify any object @@ -2354,10 +2350,10 @@ Such indirectly created layout objects can be tweaked using the form of the @code{\tweak} command in which the grob name is specified explicitly: -@lilypond[relative=2,verbatim,quote] +@lilypond[fragment,verbatim,quote] \tweak Stem.color #red -\tweak Beam.color #green c8 e -<c e \tweak Accidental.font-size #-3 ges>4 +\tweak Beam.color #green c''8 e'' +<c'' e'' \tweak Accidental.font-size #-3 ges''>4 @end lilypond @code{\tweak} cannot be used to modify clefs or time @@ -2368,14 +2364,14 @@ insertion of extra elements required to specify the context. Several @code{\tweak} commands may be placed before a notational element -- all affect it: -@lilypond[verbatim,quote,relative=1] -c --\tweak style #'dashed-line --\tweak dash-fraction #0.2 --\tweak thickness #3 --\tweak color #red - \glissando -f' +@lilypond[verbatim,fragment,quote] +c' + -\tweak style #'dashed-line + -\tweak dash-fraction #0.2 + -\tweak thickness #3 + -\tweak color #red + \glissando +f'' @end lilypond The music stream which is generated from a section of an input file, @@ -2715,11 +2711,13 @@ but a direction indicator is @strong{always} required before Direction indicators affect only the next note: -@lilypond[verbatim,quote,relative=2] -c2( c) -c2_( c) -c2( c) -c2^( c) +@lilypond[verbatim,quote] +\relative { + c''2( c) + c2_( c) + c2( c) + c2^( c) +} @end lilypond @node The direction property @@ -2761,13 +2759,15 @@ TrillPitchGroup - not tried These indications affect all notes until they are canceled. -@lilypond[verbatim,quote,relative=2] -c2( c) -\slurDown -c2( c) -c2( c) -\slurNeutral -c2( c) +@lilypond[verbatim,quote] +\relative { + c''2( c) + \slurDown + c2( c) + c2( c) + \slurNeutral + c2( c) +} @end lilypond In polyphonic music, it is generally better to specify an explicit @@ -2889,22 +2889,22 @@ note positions are not influenced by the staff line positions. implicitly defined by the number of elements in the list of values for @code{'line-positions}.} -@lilypond[verbatim,quote,relative=1] +@lilypond[verbatim,quote] \new Staff \with { \override StaffSymbol.line-positions = #'(7 3 0 -4 -6 -7) } -{ a4 e' f b | d1 } +\relative { a4 e' f b | d1 } @end lilypond The width of a staff can be modified. The units are staff spaces. The spacing of objects inside the staff is not affected by this setting. -@lilypond[verbatim,quote,relative=1] +@lilypond[verbatim,quote] \new Staff \with { \override StaffSymbol.width = #23 } -{ a4 e' f b | d1 } +\relative { a4 e' f b | d1 } @end lilypond @@ -2962,17 +2962,17 @@ Works not at all for: @end ignore -@lilypond[verbatim,quote,relative=2] -a~ a -a +@lilypond[verbatim,quote,fragment] +a'~ a' +a' % increase the length of the tie -\tweak minimum-length #5 -~ a +~ a' @end lilypond -@lilypond[verbatim,quote,relative=2] -a1 -\compressMMRests { +@lilypond[verbatim,quote] +\relative \compressMMRests { + a'1 R1*23 % increase the length of the rest bar \once \override MultiMeasureRest.minimum-length = #20 @@ -2981,26 +2981,30 @@ a1 } @end lilypond -@lilypond[verbatim,quote,relative=2] -a \< a a a \! -% increase the length of the hairpin -\override Hairpin.minimum-length = #20 -a \< a a a \! +@lilypond[verbatim,quote] +\relative { + a' \< a a a \! + % increase the length of the hairpin + \override Hairpin.minimum-length = #20 + a \< a a a \! +} @end lilypond This override can also be used to increase the length of slurs and phrasing slurs: -@lilypond[verbatim,quote,relative=2] -a( g) -a --\tweak minimum-length #5 -( g) +@lilypond[verbatim,quote] +\relative { + a'( g) + a + -\tweak minimum-length #5 + ( g) -a\( g\) -a --\tweak minimum-length #5 -\( g\) + a\( g\) + a + -\tweak minimum-length #5 + \( g\) +} @end lilypond For some layout objects, the @code{minimum-length} property becomes @@ -3010,31 +3014,31 @@ be set to @code{ly:spanner::set-spacing-rods}. For example, the minimum length of a glissando has no effect unless the @code{springs-and-rods} property is set: -@lilypond[verbatim,quote,relative=1] +@lilypond[verbatim,fragment,quote] % default -e \glissando c' +e' \glissando c'' % not effective alone \once \override Glissando.minimum-length = #20 -e, \glissando c' +e' \glissando c'' % effective only when both overrides are present \once \override Glissando.minimum-length = #20 \once \override Glissando.springs-and-rods = #ly:spanner::set-spacing-rods -e, \glissando c' +e' \glissando c'' @end lilypond The same is true of the @code{Beam} object: -@lilypond[verbatim,quote,relative=1] +@lilypond[verbatim,fragment,quote] % not effective alone \once \override Beam.minimum-length = #20 -e8 e e e +e'8 e' e' e' % effective only when both overrides are present \once \override Beam.minimum-length = #20 \once \override Beam.springs-and-rods = #ly:spanner::set-spacing-rods -e8 e e e +e'8 e' e' e' @end lilypond @subsubsubheading The @code{to-barline} property @@ -3046,10 +3050,12 @@ end instead on the immediately preceding bar line. If set to false, the spanner will extend beyond the bar line and end on the note itself: -@lilypond[verbatim,quote,relative=2] -a \< a a a a \! a a a \break -\override Hairpin.to-barline = ##f -a \< a a a a \! a a a +@lilypond[verbatim,quote] +\relative { + a' \< a a a a \! a a a \break + \override Hairpin.to-barline = ##f + a \< a a a a \! a a a +} @end lilypond This property is not effective for all spanners. For example, @@ -3080,11 +3086,11 @@ properties which need to be specified are nested two levels down within the property hierarchy, but the syntax of the @code{\override} command is quite simple: -@lilypond[relative=2,quote,verbatim] -e2 \glissando b +@lilypond[quote,fragment,verbatim] +e''2 \glissando b' \once \override Glissando.bound-details.left.Y = #3 \once \override Glissando.bound-details.right.Y = #-2 -e2 \glissando b +e''2 \glissando b' @end lilypond The units for the @code{Y} property are @code{staff-space}s, @@ -3100,11 +3106,11 @@ In case of a line break, the values for the end points are specified by the @code{left-broken} and @code{right-broken} sub-lists of @code{bound-details}. For example: -@lilypond[relative=2,ragged-right,verbatim,quote] +@lilypond[ragged-right,fragment,verbatim,quote] \override Glissando.breakable = ##t \override Glissando.bound-details.right-broken.Y = #-3 -c1 \glissando \break -f1 +c''1 \glissando \break +f''1 @end lilypond @@ -3141,10 +3147,10 @@ recommended that @code{text} be used instead. This is a markup that is evaluated to yield the stencil. It is used to put @i{cresc.}, @i{tr} and other text on horizontal spanners. -@lilypond[quote,ragged-right,relative=2,verbatim] +@lilypond[quote,ragged-right,fragment,verbatim] \override TextSpanner.bound-details.left.text = \markup { \small \bold Slower } -c2\startTextSpan b c a\stopTextSpan +\relative { c''2\startTextSpan b c a\stopTextSpan } @end lilypond @item stencil-align-dir-y @@ -3155,13 +3161,14 @@ end-point, centered on the line, as defined by the @code{X} and or @code{stencil-offset} will move the symbol at the edge vertically relative to the end point of the line: -@lilypond[relative=1,quote,verbatim] +@lilypond[quote,fragment,verbatim] \override TextSpanner.bound-details.left.stencil-align-dir-y = #-2 \override TextSpanner.bound-details.right.stencil-align-dir-y = #UP \override TextSpanner.bound-details.left.text = #"ggg" \override TextSpanner.bound-details.right.text = #"hhh" -c4^\startTextSpan c c c \stopTextSpan + +\relative { c'4^\startTextSpan c c c \stopTextSpan } @end lilypond Note that negative values move the text @emph{up}, contrary to the @@ -3187,11 +3194,13 @@ is terminated after exactly one note, or at the following bar line if @code{to-barline} is true and a bar line occurs before the next note. -@lilypond[verbatim,quote,ragged-right,relative=2] -\endSpanners -c2 \startTextSpan c2 c2 -\endSpanners -c2 \< c2 c2 +@lilypond[verbatim,quote,ragged-right] +\relative c'' { + \endSpanners + c2 \startTextSpan c2 c2 + \endSpanners + c2 \< c2 c2 +} @end lilypond When using @code{\endSpanners} it is not necessary to close @@ -3247,7 +3256,7 @@ is overridden to @code{#f} no function will be called and the object will not be drawn. The default action can be recovered with @code{\revert}. -@lilypond[quote,verbatim,relative=1] +@lilypond[quote,fragment,verbatim] a1 a \override Score.BarLine.stencil = ##f a a @@ -3257,7 +3266,7 @@ a a a This rather common operation has a shortcut @code{\omit}: -@lilypond[quote,verbatim,relative=1] +@lilypond[quote,fragment,verbatim] a1 a \omit Score.BarLine a a @@ -3275,18 +3284,18 @@ Every layout object has a transparent property which by default is set to @code{#f}. If set to @code{#t} the object still occupies space but is made invisible. -@lilypond[quote,verbatim,relative=2] -a4 a +@lilypond[quote,fragment,verbatim] +a'4 a' \once \override NoteHead.transparent = ##t -a a +a' a' @end lilypond This rather common operation has a shortcut @code{\hide}: -@lilypond[quote,verbatim,relative=2] -a4 a +@lilypond[quote,fragment,verbatim] +a'4 a' \once \hide NoteHead -a a +a' a' @end lilypond @node Painting objects white @@ -3308,9 +3317,9 @@ points will be determined by the order in which they are drawn, and this may leave a ghostly image of the white object, as shown here: -@lilypond[quote,verbatim,relative=2] +@lilypond[quote,fragment,verbatim] \override Staff.Clef.color = #white -a1 +a'1 @end lilypond This may be avoided by changing the order of printing the objects. @@ -3329,10 +3338,10 @@ value of @code{1}, is drawn after the staff lines (default the @code{Clef} object must be given in a lower value of @code{layer}, say @w{@code{-1}}, so that it is drawn earlier: -@lilypond[quote,verbatim,relative=2] +@lilypond[quote,fragment,verbatim] \override Staff.Clef.color = #white \override Staff.Clef.layer = #-1 -a1 +a'1 @end lilypond @node Using break-visibility @@ -3420,14 +3429,16 @@ default setting of this property: The example below shows the use of the vector form to control the visibility of bar lines: -@lilypond[quote,verbatim,relative=1,ragged-right] -f4 g a b -f4 g a b -% Remove bar line at the end of the current line -\once \override Score.BarLine.break-visibility = ##(#f #t #t) -\break -f4 g a b -f4 g a b +@lilypond[quote,verbatim,ragged-right] +\relative { + f'4 g a b + f4 g a b + % Remove bar line at the end of the current line + \once \override Score.BarLine.break-visibility = ##(#f #t #t) + \break + f4 g a b + f4 g a b +} @end lilypond Although all three components of the vector used to override @@ -3466,16 +3477,18 @@ following example the key signature following the explicit change to B-flat major is still visible, even though @code{all-invisible} is set. -@lilypond[quote,verbatim,relative=1,ragged-right] -\key g \major -f4 g a b -% Try to remove all key signatures -\override Staff.KeySignature.break-visibility = #all-invisible -\key bes \major -f4 g a b -\break -f4 g a b -f4 g a b +@lilypond[quote,verbatim,ragged-right] +\relative { + \key g \major + f'4 g a b + % Try to remove all key signatures + \override Staff.KeySignature.break-visibility = #all-invisible + \key bes \major + f4 g a b + \break + f4 g a b + f4 g a b +} @end lilypond The visibility of such explicit key signature and clef changes is @@ -3492,15 +3505,17 @@ signatures and clefs at the beginning of lines; @code{break-visibility} must still be overridden in the appropriate object to remove these. -@lilypond[quote,verbatim,relative=1,ragged-right] -\key g \major -f4 g a b -\set Staff.explicitKeySignatureVisibility = #all-invisible -\override Staff.KeySignature.break-visibility = #all-invisible -\key bes \major -f4 g a b \break -f4 g a b -f4 g a b +@lilypond[quote,verbatim,ragged-right] +\relative { + \key g \major + f'4 g a b + \set Staff.explicitKeySignatureVisibility = #all-invisible + \override Staff.KeySignature.break-visibility = #all-invisible + \key bes \major + f4 g a b \break + f4 g a b + f4 g a b +} @end lilypond @subsubsubheading Visibility of cancelling accidentals @@ -3509,16 +3524,18 @@ To remove the cancelling accidentals printed at an explicit key change, set the Staff context property @code{printKeyCancellation} to @code{#f}: -@lilypond[quote,verbatim,relative=1,ragged-right] -\key g \major -f4 g a b -\set Staff.explicitKeySignatureVisibility = #all-invisible -\set Staff.printKeyCancellation = ##f -\override Staff.KeySignature.break-visibility = #all-invisible -\key bes \major -f4 g a b \break -f4 g a b -f4 g a b +@lilypond[quote,verbatim,ragged-right] +\relative { + \key g \major + f'4 g a b + \set Staff.explicitKeySignatureVisibility = #all-invisible + \set Staff.printKeyCancellation = ##f + \override Staff.KeySignature.break-visibility = #all-invisible + \key bes \major + f4 g a b \break + f4 g a b + f4 g a b +} @end lilypond With these overrides only the accidentals before the notes remain @@ -3529,30 +3546,34 @@ the cancelling accidentals would be the @emph{only} indication of the key change. In this case setting @code{printKeyCancellation} to @code{#f} has no effect: -@lilypond[quote,verbatim,relative=1,ragged-right] -\key g \major -f4 g a b -\set Staff.explicitKeySignatureVisibility = #all-invisible -\set Staff.printKeyCancellation = ##f -\key c \major -f4 g a b \break -f4 g a b -f4 g a b +@lilypond[quote,verbatim,ragged-right] +\relative { + \key g \major + f'4 g a b + \set Staff.explicitKeySignatureVisibility = #all-invisible + \set Staff.printKeyCancellation = ##f + \key c \major + f4 g a b \break + f4 g a b + f4 g a b +} @end lilypond To suppress the cancelling accidentals even when the key is changed to C@tie{}major or A@tie{}minor, override the visibility of the @code{KeyCancellation} grob instead: -@lilypond[quote,verbatim,relative=1,ragged-right] -\key g \major -f4 g a b -\set Staff.explicitKeySignatureVisibility = #all-invisible -\override Staff.KeyCancellation.break-visibility = #all-invisible -\key c \major -f4 g a b \break -f4 g a b -f4 g a b +@lilypond[quote,verbatim,ragged-right] +\relative { + \key g \major + f'4 g a b + \set Staff.explicitKeySignatureVisibility = #all-invisible + \override Staff.KeyCancellation.break-visibility = #all-invisible + \key c \major + f4 g a b \break + f4 g a b + f4 g a b +} @end lilypond @c TODO Add visibility of cautionary accidentals before notes @@ -3612,16 +3633,18 @@ between them, in the style requested. Here is an example showing the different line styles available, and how to tune them. -@lilypond[relative=2,ragged-right,verbatim,quote] -d2 \glissando d'2 -\once \override Glissando.style = #'dashed-line -d,2 \glissando d'2 -\override Glissando.style = #'dotted-line -d,2 \glissando d'2 -\override Glissando.style = #'zigzag -d,2 \glissando d'2 -\override Glissando.style = #'trill -d,2 \glissando d'2 +@lilypond[ragged-right,verbatim,quote] +\relative { + d''2 \glissando d'2 + \once \override Glissando.style = #'dashed-line + d,2 \glissando d'2 + \override Glissando.style = #'dotted-line + d,2 \glissando d'2 + \override Glissando.style = #'zigzag + d,2 \glissando d'2 + \override Glissando.style = #'trill + d,2 \glissando d'2 +} @end lilypond The locations of the end-points of the spanner are computed @@ -3629,10 +3652,12 @@ on-the-fly for every graphic object, but it is possible to override these: @c TODO Complete -@lilypond[relative=2,ragged-right,verbatim,quote] -e2 \glissando f -\once \override Glissando.bound-details.right.Y = #-2 -e2 \glissando f +@lilypond[ragged-right,verbatim,quote] +\relative { + e''2 \glissando f + \once \override Glissando.bound-details.right.Y = #-2 + e2 \glissando f +} @end lilypond The value for @code{Y} is set to @w{@code{-2}} for the right end @@ -3680,10 +3705,10 @@ There are only a few situations where the rotation of layout objects is useful; the following example shows one situation where they may be: -@lilypond[quote,verbatim,relative=1] -g4\< e' d' f\! +@lilypond[quote,fragment,verbatim] +g4\< e' d'' f''\! \override Hairpin.rotation = #'(20 -1 0) -g,,4\< e' d' f\! +g4\< e' d'' f''\! @end lilypond @node Rotating markup @@ -3699,12 +3724,12 @@ rotated text. In the following example the to disable the automatic collision avoidance, which would push some of the text too high. -@lilypond[quote,verbatim,relative=1] +@lilypond[quote,fragment,verbatim] \override TextScript.outside-staff-priority = ##f g4^\markup { \rotate #30 "a G" } b^\markup { \rotate #30 "a B" } -des^\markup { \rotate #30 "a D-Flat" } -fis^\markup { \rotate #30 "an F-Sharp" } +des'^\markup { \rotate #30 "a D-Flat" } +fis'^\markup { \rotate #30 "an F-Sharp" } @end lilypond @node Advanced tweaks @@ -3805,13 +3830,13 @@ properties of many objects. The following example shows three notes with the default fingering position and the positions with @code{X-offset} and @code{Y-offset} modified. -@lilypond[verbatim,quote,relative=2] -a-3 -a +@lilypond[verbatim,fragment,quote] +a'-3 +a' -\tweak X-offset #0 -\tweak Y-offset #0 -3 -a +a' -\tweak X-offset #-1 -\tweak Y-offset #1 -3 @@ -3886,7 +3911,7 @@ value of @code{self-alignment-X}, but the @code{\tweak} command can be used to separately align several annotations on a single note: -@lilypond[quote,verbatim,relative=1] +@lilypond[quote,verbatim,fragment] a' -\tweak self-alignment-X #-1 ^"left-aligned" @@ -3924,8 +3949,8 @@ be aligned in both directions simultaneously. The following example shows how to adjust a fingering mark so that it nestles close to the note head. -@lilypond[quote,verbatim,relative=2] -a +@lilypond[quote,verbatim,fragment] +a' -\tweak self-alignment-X #0.5 % move horizontally left -\tweak Y-offset #ly:self-alignment-interface::y-aligned-on-self -\tweak self-alignment-Y #-1 % move vertically up @@ -3976,26 +4001,26 @@ objects other than bar lines. These objects include @code{ambitus}, Each type of object has its own default reference point, to which rehearsal marks are aligned: -@lilypond[verbatim,quote,relative=1] +@lilypond[verbatim,quote,fragment] % The rehearsal mark will be aligned to the right edge of the Clef \override Score.RehearsalMark.break-align-symbols = #'(clef) \key a \major \clef treble \mark "↓" -e1 +e'1 % The rehearsal mark will be aligned to the left edge of the Time Signature \override Score.RehearsalMark.break-align-symbols = #'(time-signature) \key a \major \clef treble \time 3/4 \mark "↓" -e2. +e'2. % The rehearsal mark will be centered above the Breath Mark \override Score.RehearsalMark.break-align-symbols = #'(breathing-sign) \key a \major \clef treble \time 4/4 -e1 +e'1 \breathe \mark "↓" @end lilypond @@ -4009,20 +4034,20 @@ list are visible the object is aligned to the bar line. If the bar line is invisible the object is aligned to the place where the bar line would be. -@lilypond[verbatim,quote,relative=1] +@lilypond[verbatim,quote,fragment] % The rehearsal mark will be aligned to the right edge of the Key Signature \override Score.RehearsalMark.break-align-symbols = #'(key-signature clef) \key a \major \clef treble \mark "↓" -e1 +e'1 % The rehearsal mark will be aligned to the right edge of the Clef \set Staff.explicitKeySignatureVisibility = #all-invisible \override Score.RehearsalMark.break-align-symbols = #'(key-signature clef) \key a \major \clef bass \mark "↓" -gis,,1 +gis,1 % The rehearsal mark will be centered above the Bar Line \set Staff.explicitKeySignatureVisibility = #all-invisible \set Staff.explicitClefVisibility = #all-invisible @@ -4030,50 +4055,50 @@ gis,,1 \key a \major \clef treble \mark "↓" -e''1 +e'1 @end lilypond The alignment of the rehearsal mark relative to the notation object can be changed, as shown in the following example. In a score with multiple staves, this setting should be done for all the staves. -@lilypond[verbatim,quote,relative=1] +@lilypond[verbatim,quote,fragment] % The RehearsalMark will be aligned with the right edge of the Key Signature \override Score.RehearsalMark.break-align-symbols = #'(key-signature) \key a \major \clef treble \time 4/4 \mark "↓" -e1 +e'1 % The RehearsalMark will be centered above the Key Signature \once \override Score.KeySignature.break-align-anchor-alignment = #CENTER \mark "↓" \key a \major -e1 +e'1 % The RehearsalMark will be aligned with the left edge of the Key Signature \once \override Score.KeySignature.break-align-anchor-alignment = #LEFT \key a \major \mark "↓" -e1 +e'1 @end lilypond The rehearsal mark can also be offset to the right or left of the left edge by an arbitrary amount. The units are staff-spaces: -@lilypond[verbatim,quote,relative=1] +@lilypond[verbatim,quote,fragment] % The RehearsalMark will be aligned with the left edge of the Key Signature % and then shifted right by 3.5 staff-spaces \override Score.RehearsalMark.break-align-symbols = #'(key-signature) \once \override Score.KeySignature.break-align-anchor = #3.5 \key a \major \mark "↓" -e1 +e'1 % The RehearsalMark will be aligned with the left edge of the Key Signature % and then shifted left by 2 staff-spaces \once \override Score.KeySignature.break-align-anchor = #-2 \key a \major \mark "↓" -e1 +e'1 @end lilypond @@ -4205,11 +4230,11 @@ the same operations on the curve. In this example the automatic placement of the tie is not optimum, and @code{\tieDown} would not help. -@lilypond[verbatim,quote,relative=1] +@lilypond[verbatim,quote] << - { e1~ 1 } + { e'1~ 1 } \\ - { r4 <g c,> <g c,> <g c,> } + \relative { r4 <g' c,> <g c,> <g c,> } >> @end lilypond @@ -4245,14 +4270,14 @@ is being used. So, using the same example as above and the @code{\once\override} form of @code{\shape}, this will raise the tie by half a staff-space: -@lilypond[verbatim,quote,relative=1] +@lilypond[verbatim,quote] << { \shape #'((0 . 0.5) (0 . 0.5) (0 . 0.5) (0 . 0.5)) Tie - e1~ 1 + e'1~ 1 } \\ - { r4 <g c,> <g c,> <g c,> } + \relative { r4 <g' c,> <g c,> <g c,> } >> @end lilypond @@ -4260,13 +4285,13 @@ This positioning of the tie is better, but maybe it should be raised more in the center. The following example does this, this time using the alternative @code{\tweak} form: -@lilypond[verbatim,quote,relative=1] +@lilypond[verbatim,quote] << { - e1-\shape #'((0 . 0.5) (0 . 1) (0 . 1) (0 . 0.5)) ~ e + e'1-\shape #'((0 . 0.5) (0 . 1) (0 . 1) (0 . 0.5)) ~ e' } \\ - { r4 <g c,> <g c,> <g c,> } + \relative { r4 <g' c,> <g c,> <g c,> } >> @end lilypond @@ -4274,11 +4299,13 @@ Changes to the horizontal positions of the control points may be made in the same way, and two different curves starting at the same musical moment may also be shaped: -@lilypond[verbatim,quote,ragged-right,relative=2] -c8(\( a) a'4 e c\) -\shape #'((0.7 . -0.4) (0.5 . -0.4) (0.3 . -0.3) (0 . -0.2)) Slur -\shape #'((0 . 0) (0 . 0.5) (0 . 0.5) (0 . 0)) PhrasingSlur -c8(\( a) a'4 e c\) +@lilypond[verbatim,quote,ragged-right] +\relative { + c''8(\( a) a'4 e c\) + \shape #'((0.7 . -0.4) (0.5 . -0.4) (0.3 . -0.3) (0 . -0.2)) Slur + \shape #'((0 . 0) (0 . 0.5) (0 . 0.5) (0 . 0)) PhrasingSlur + c8(\( a) a'4 e c\) +} @end lilypond The @code{\shape} function can also displace the control points of @@ -4288,35 +4315,41 @@ particular segment are not needed, the empty list can serve as a placeholder. In this example the line break makes the single slur look like two: -@lilypond[verbatim,quote,ragged-right,relative=1] -c4( f g c -\break -d,4 c' f, c) +@lilypond[verbatim,quote,ragged-right] +\relative { + c'4( f g c + \break + d,4 c' f, c) +} @end lilypond Changing the shapes of the two halves of the slur makes it clearer that the slur continues over the line break: -@lilypond[verbatim,quote,ragged-right,relative=1] +@lilypond[verbatim,quote,ragged-right] % () may be used as a shorthand for ((0 . 0) (0 . 0) (0 . 0) (0 . 0)) % if any of the segments does not need to be changed -\shape #'( - (( 0 . 0) (0 . 0) (0 . 0) (0 . 1)) - ((0.5 . 1.5) (1 . 0) (0 . 0) (0 . -1.5)) - ) Slur -c4( f g c -\break -d,4 c' f, c) +\relative c' { + \shape #'( + (( 0 . 0) (0 . 0) (0 . 0) (0 . 1)) + ((0.5 . 1.5) (1 . 0) (0 . 0) (0 . -1.5)) + ) Slur + c4( f g c + \break + d,4 c' f, c) +} @end lilypond If an S-shaped curve is required the control points must always be adjusted manually --- LilyPond will never select such shapes automatically. -@lilypond[verbatim,quote,relative=2] -c8( e b-> f d' a e-> g) -\shape #'((0 . -1) (5.5 . -0.5) (-5.5 . -10.5) (0 . -5.5)) PhrasingSlur -c8\( e b-> f d' a e-> g\) +@lilypond[verbatim,quote] +\relative c'' { + c8( e b-> f d' a e-> g) + \shape #'((0 . -1) (5.5 . -0.5) (-5.5 . -10.5) (0 . -5.5)) PhrasingSlur + c8\( e b-> f d' a e-> g\) +} @end lilypond @subsubsubheading Specifying control points explicitly @@ -4338,23 +4371,25 @@ specified relative to a single note. Here is an example of this. It shows one way of indicating a slur extending into alternative sections of a volta repeat. -@lilypond[verbatim,quote,relative=2] -c1 -\repeat volta 3 { c4 d( e f } -\alternative { - { g2) d } - { - g2 - % create a slur and move it to a new position - % the <> is just an empty chord to carry the slur termination - -\tweak control-points #'((-2 . 3.8) (-1 . 3.9) (0 . 4) (1 . 3.4)) ( <> ) - f, - } - { - e'2 - % create a slur and move it to a new position - -\tweak control-points #'((-2 . 3) (-1 . 3.1) (0 . 3.2) (1 . 2.4)) ( <> ) - f, +@lilypond[verbatim,quote] +\relative { + c''1 + \repeat volta 3 { c4 d( e f } + \alternative { + { g2) d } + { + g2 + % create a slur and move it to a new position + % the <> is just an empty chord to carry the slur termination + -\tweak control-points #'((-2 . 3.8) (-1 . 3.9) (0 . 4) (1 . 3.4)) ( <> ) + f, + } + { + e'2 + % create a slur and move it to a new position + -\tweak control-points #'((-2 . 3) (-1 . 3.1) (0 . 3.2) (1 . 2.4)) ( <> ) + f, + } } } @end lilypond @@ -4393,12 +4428,14 @@ each of its segments. In the example below, overriding @code{thickness} affects the slur on either side of the line break. -@lilypond[verbatim,quote,ragged-right,relative=2] -r2 -\once\override Slur.thickness = 10 -c8( d e f -\break -g8 f e d) r2 +@lilypond[verbatim,quote,ragged-right] +\relative c'' { + r2 + \once\override Slur.thickness = 10 + c8( d e f + \break + g8 f e d) r2 +} @end lilypond Independently modifying the appearance of individual pieces @@ -4430,12 +4467,14 @@ using @code{\revert} with @var{property}. The following code applies an independent @code{\override} to each of the slur segments in the previous example: -@lilypond[verbatim,quote,ragged-right,relative=2] -r2 -\alterBroken thickness #'(10 1) Slur -c8( d e f -\break -g8 f e d) r2 +@lilypond[verbatim,quote,ragged-right] +\relative c'' { + r2 + \alterBroken thickness #'(10 1) Slur + c8( d e f + \break + g8 f e d) r2 +} @end lilypond The @code{\alterBroken} command may be used with any spanner @@ -4446,12 +4485,14 @@ phrasing slur in a source by dashing only the segment which has been added. The following example illustrates how this can be done, in this case using the @code{\tweak} form of the command: -@lilypond[verbatim,quote,ragged-right,relative=2] +@lilypond[verbatim,quote,ragged-right] % The empty list is conveniently used below, because it is the % default setting of dash-definition, resulting in a solid curve. -c2-\alterBroken dash-definition #'(() ((0 1.0 0.4 0.75))) \(e -\break -g2 e\) +\relative { + c''2-\alterBroken dash-definition #'(() ((0 1.0 0.4 0.75))) \(e + \break + g2 e\) +} @end lilypond It is important to understand that @code{\alterBroken} will set diff --git a/Documentation/notation/chords.itely b/Documentation/notation/chords.itely index 3a98f7fa86..bd396425a4 100644 --- a/Documentation/notation/chords.itely +++ b/Documentation/notation/chords.itely @@ -68,11 +68,13 @@ absolute pitches are one octave higher than in note mode. Chord mode and note mode can be mixed in sequential music: -@lilypond[verbatim,quote,ragged-right,relative=1] -<c e g>2 <g b d> -\chordmode { c2 f } -<c e g>2 <g' b d> -\chordmode { f2 g } +@lilypond[verbatim,quote,ragged-right] +\relative { + <c' e g>2 <g b d> + \chordmode { c2 f } + <c e g>2 <g' b d> + \chordmode { f2 g } +} @end lilypond @seealso @@ -434,7 +436,7 @@ chordmusic = \relative { Rests passed to a @code{ChordNames} context will cause the @code{noChordSymbol} markup to be displayed. -@lilypond[verbatim, quote, relative=1] +@lilypond[verbatim,quote] << \new ChordNames \chordmode { c1 diff --git a/Documentation/notation/editorial.itely b/Documentation/notation/editorial.itely index 01425135c1..0588a3fa48 100644 --- a/Documentation/notation/editorial.itely +++ b/Documentation/notation/editorial.itely @@ -144,15 +144,17 @@ An individual layout object can be resized by using the @code{\tweak} or @code{\override} commands to adjust its @code{font-size} property: -@lilypond[quote,verbatim,relative=1] -% resize a note head -<f \tweak font-size -4 b e>-5 -% resize a fingering -bes-\tweak font-size 0 -3 -% resize an accidental -\once \override Accidental.font-size = -4 bes!-^ -% resize an articulation -\once \override Script.font-size = 4 bes!-^ +@lilypond[quote,verbatim] +\relative { + % resize a note head + <f' \tweak font-size -4 b e>-5 + % resize a fingering + bes-\tweak font-size 0 -3 + % resize an accidental + \once \override Accidental.font-size = -4 bes!-^ + % resize an articulation + \once \override Script.font-size = 4 bes!-^ +} @end lilypond The default @code{font-size} value for each layout object is @@ -168,14 +170,16 @@ value is 0. See @rinternals{All layout objects}. The @code{fontSize} context property adjusts the relative size of all glyph-based notational elements in a context: -@lilypond[verbatim,quote,relative=2] -\time 3/4 -d4---5 c8( b a g) | -\set fontSize = -6 -e'4-- c!8-4( b a g) | -\set fontSize = 0 -fis4---3 e8( d) fis4 | -g2. +@lilypond[verbatim,quote] +\relative { + \time 3/4 + d''4---5 c8( b a g) | + \set fontSize = -6 + e'4-- c!8-4( b a g) | + \set fontSize = 0 + fis4---3 e8( d) fis4 | + g2. +} @end lilypond The @code{fontSize} value is a number indicating the size relative @@ -212,19 +216,19 @@ property} for individual layout objects, before any glyphs are printed. This can cause confusion when setting individual @code{font-size} properties while @code{fontSize} is already set: -@lilypond[verbatim,quote,relative=2] +@lilypond[verbatim,quote,fragment] % the default font-size for NoteHead is 0 % the default font-size for Fingering is -5 -c4-3 +c''4-3 \set fontSize = -3 % the effective font size for NoteHead is now -3 % the effective font size for Fingering is now -8 -c4-3 +c''4-3 \override Fingering.font-size = 0 % the effective font size for Fingering is now -3 -c4-3 +c''4-3 @end lilypond The following shorthand commands are also available: @@ -239,19 +243,21 @@ The following shorthand commands are also available: @item @code{\huge} @tab @code{\set fontSize = 2} @tab 126% @end multitable -@lilypond[verbatim,quote,relative=2] -\teeny -c4.-> d8---3 -\tiny -c4.-> d8---3 -\small -c4.-> d8---3 -\normalsize -c4.-> d8---3 -\large -c4.-> d8---3 -\huge -c4.-> d8---3 +@lilypond[verbatim,quote] +\relative c'' { + \teeny + c4.-> d8---3 + \tiny + c4.-> d8---3 + \small + c4.-> d8---3 + \normalsize + c4.-> d8---3 + \large + c4.-> d8---3 + \huge + c4.-> d8---3 +} @end lilypond @@ -329,14 +335,16 @@ and @code{\revert} commands: Fingering instructions can be entered using @samp{@var{note}-@var{digit}}: -@lilypond[verbatim,quote,relative=2] -c4-1 d-2 f-4 e-3 +@lilypond[verbatim,quote] +\relative { c''4-1 d-2 f-4 e-3 } @end lilypond Markup texts or strings may be used for finger changes. -@lilypond[verbatim,quote,relative=2] -c4-1 d-2 f\finger \markup \tied-lyric #"4~3" c\finger "2 - 3" +@lilypond[verbatim,quote] +\relative { + c''4-1 d-2 f\finger \markup \tied-lyric #"4~3" c\finger "2 - 3" +} @end lilypond @cindex thumb-script @@ -347,8 +355,8 @@ c4-1 d-2 f\finger \markup \tied-lyric #"4~3" c\finger "2 - 3" A thumb-script can be added (e.g. cello music) to indicate that a note should be played with the thumb. -@lilypond[verbatim,quote,relative=2] -<a_\thumb a'-3>2 <b_\thumb b'-3> +@lilypond[verbatim,quote] +\relative { <a'_\thumb a'-3>2 <b_\thumb b'-3> } @end lilypond @cindex fingering chords @@ -358,8 +366,10 @@ that a note should be played with the thumb. Fingerings for chords can also be added to individual notes by adding them after the pitches. -@lilypond[verbatim,quote,relative=2] -<c-1 e-2 g-3 b-5>2 <d-1 f-2 a-3 c-5> +@lilypond[verbatim,quote] +\relative { + <c''-1 e-2 g-3 b-5>2 <d-1 f-2 a-3 c-5> +} @end lilypond Fingering instructions may be manually placed above or below the @@ -409,26 +419,30 @@ Internals Reference: Hidden (or invisible or transparent) notes can be useful in preparing theory or composition exercises. -@lilypond[verbatim,quote,relative=2] -c4 d -\hideNotes -e4 f -\unHideNotes -g a -\hideNotes -b -\unHideNotes -c +@lilypond[verbatim,quote] +\relative { + c''4 d + \hideNotes + e4 f + \unHideNotes + g a + \hideNotes + b + \unHideNotes + c +} @end lilypond Note heads, stems, and flags, and rests are invisible. Beams are invisible if they start on a hidden note. Objects that are attached to invisible notes are still visible. -@lilypond[verbatim,quote,relative=2] -e8(\p f g a)-- -\hideNotes -e8(\p f g a)-- +@lilypond[verbatim,quote] +\relative c'' { + e8(\p f g a)-- + \hideNotes + e8(\p f g a)-- +} @end lilypond @@ -476,13 +490,13 @@ Internals Reference: Individual objects may be assigned colors. Valid color names are listed in the @ref{List of colors}. -@lilypond[verbatim,quote,relative=2] +@lilypond[verbatim,quote,fragment] \override NoteHead.color = #red -c4 c +c''4 c'' \override NoteHead.color = #(x11-color 'LimeGreen) -d +d'' \override Stem.color = #blue -e +e'' @end lilypond @@ -497,22 +511,24 @@ its name. If @code{x11-color} cannot make sense of the parameter then the color returned defaults to black. -@lilypond[verbatim,quote,relative=2] -\override Staff.StaffSymbol.color = #(x11-color 'SlateBlue2) -\set Staff.instrumentName = \markup { - \with-color #(x11-color 'navy) "Clarinet" -} +@lilypond[verbatim,quote] +\relative c'' { + \override Staff.StaffSymbol.color = #(x11-color 'SlateBlue2) + \set Staff.instrumentName = \markup { + \with-color #(x11-color 'navy) "Clarinet" + } -gis8 a -\override Beam.color = #(x11-color "medium turquoise") -gis a -\override Accidental.color = #(x11-color 'DarkRed) -gis a -\override NoteHead.color = #(x11-color "LimeGreen") -gis a -% this is deliberate nonsense; note that the stems remain black -\override Stem.color = #(x11-color 'Boggle) -b2 cis + gis8 a + \override Beam.color = #(x11-color "medium turquoise") + gis a + \override Accidental.color = #(x11-color 'DarkRed) + gis a + \override NoteHead.color = #(x11-color "LimeGreen") + gis a + % this is deliberate nonsense; note that the stems remain black + \override Stem.color = #(x11-color 'Boggle) + b2 cis +} @end lilypond @cindex rgb-color @@ -524,18 +540,20 @@ b2 cis Exact RGB colors can be specified using the Scheme function @code{rgb-color}. -@lilypond[verbatim,quote,relative=2] -\override Staff.StaffSymbol.color = #(x11-color 'SlateBlue2) -\set Staff.instrumentName = \markup { - \with-color #(x11-color 'navy) "Clarinet" -} +@lilypond[verbatim,quote] +\relative c'' { + \override Staff.StaffSymbol.color = #(x11-color 'SlateBlue2) + \set Staff.instrumentName = \markup { + \with-color #(x11-color 'navy) "Clarinet" + } -\override Stem.color = #(rgb-color 0 0 0) -gis8 a -\override Stem.color = #(rgb-color 1 1 1) -gis8 a -\override Stem.color = #(rgb-color 0 0 0.5) -gis4 a + \override Stem.color = #(rgb-color 0 0 0) + gis8 a + \override Stem.color = #(rgb-color 1 1 1) + gis8 a + \override Stem.color = #(rgb-color 0 0 0.5) + gis4 a +} @end lilypond @seealso @@ -584,18 +602,22 @@ Objects may be parenthesized by prefixing @code{\parenthesize} to the music event. When prefixed to a chord, it parenthesizes every note. Individual notes inside a chord may also be parenthesized. -@lilypond[verbatim,quote,relative=2] -c2 \parenthesize d -c2 \parenthesize <c e g> -c2 <c \parenthesize e g> +@lilypond[verbatim,quote] +\relative { + c''2 \parenthesize d + c2 \parenthesize <c e g> + c2 <c \parenthesize e g> +} @end lilypond Non-note objects may be parenthesized as well. For articulations, a hyphen is needed before the @code{\parenthesize} command. -@lilypond[verbatim,quote,relative=2] -c2-\parenthesize -. d -c2 \parenthesize r +@lilypond[verbatim,quote] +\relative { + c''2-\parenthesize -. d + c2 \parenthesize r +} @end lilypond @seealso @@ -701,9 +723,9 @@ Elements of notation can be marked and named with the help of a square balloon. The primary purpose of this feature is to explain notation. -@lilypond[verbatim,quote,relative=2] +@lilypond[verbatim,quote] \new Voice \with { \consists "Balloon_engraver" } -{ +\relative c'' { \balloonGrobText #'Stem #'(3 . 4) \markup { "I'm a Stem" } a8 \balloonGrobText #'Rest #'(-4 . -4) \markup { "I'm a rest" } @@ -721,9 +743,9 @@ attach text to an individual note. Balloon text does not influence note spacing, but this can be altered: -@lilypond[verbatim,quote,relative=2] +@lilypond[verbatim,quote] \new Voice \with { \consists "Balloon_engraver" } -{ +\relative c'' { \balloonGrobText #'Stem #'(3 . 4) \markup { "I'm a Stem" } a8 \balloonGrobText #'Rest #'(-4 . -4) \markup { "I'm a rest" } diff --git a/Documentation/notation/expressive.itely b/Documentation/notation/expressive.itely index a6dc9178b6..52259c6c95 100644 --- a/Documentation/notation/expressive.itely +++ b/Documentation/notation/expressive.itely @@ -127,9 +127,11 @@ this syntax: The possible values for @code{@var{name}} are listed in @ref{List of articulations}. For example: -@lilypond[verbatim,quote,relative=2] -c4\staccato c\mordent b2\turn -c1\fermata +@lilypond[verbatim,quote] +\relative { + c''4\staccato c\mordent b2\turn + c1\fermata +} @end lilypond @cindex marcato @@ -147,9 +149,11 @@ articulation. Predefined shorthands exist for @notation{marcato}, @notation{accent}, @notation{staccato}, and @notation{portato}. Their corresponding output appears as follows: -@lilypond[verbatim,quote,relative=2] -c4-^ c-+ c-- c-! -c4-> c-. c2-_ +@lilypond[verbatim,quote] +\relative { + c''4-^ c-+ c-- c-! + c4-> c-. c2-_ +} @end lilypond The rules for the default placement of articulations are defined @@ -166,10 +170,10 @@ command, @code{\fermataMarkup}, is available for attaching a fermata to a multi-measure rest (and only a multi-measure rest). This creates a @code{MultiMeasureRestText} object. -@lilypond[verbatim,quote,relative=2] +@lilypond[verbatim,quote,fragment] \override Script.color = #red \override MultiMeasureRestText.color = #blue -a2\fermata r\fermata +a'2\fermata r\fermata R1\fermataMarkup @end lilypond @@ -272,10 +276,12 @@ such as @code{c4\ff}. The available dynamic marks are marks may be manually placed above or below the staff; see @ref{Direction and placement}. -@lilypond[verbatim,quote,relative=2] -c2\ppp c\mp -c2\rfz c^\mf -c2_\spp c^\ff +@lilypond[verbatim,quote] +\relative c'' { + c2\ppp c\mp + c2\rfz c^\mf + c2_\spp c^\ff +} @end lilypond @cindex hairpin @@ -300,14 +306,16 @@ absolute dynamic, or another crescendo or decrescendo mark. @code{\>}. @notation{Hairpins} are engraved by default using this notation. -@lilypond[verbatim,quote,relative=2] -c2\< c\! -d2\< d\f -e2\< e\> -f2\> f\! -e2\> e\mp -d2\> d\> -c1\! +@lilypond[verbatim,quote] +\relative c'' { + c2\< c\! + d2\< d\f + e2\< e\> + f2\> f\! + e2\> e\mp + d2\> d\> + c1\! +} @end lilypond A hairpin that is terminated with @code{\!} will end at the @@ -319,8 +327,10 @@ hairpin will then start at the right edge of the same note instead of the usual left edge had it been terminated with @code{\!} before. -@lilypond[verbatim,quote,relative=2] -c1\< | c4 a c\< a | c4 a c\! a\< | c4 a c a\! +@lilypond[verbatim,quote] +\relative { + c''1\< | c4 a c\< a | c4 a c\! a\< | c4 a c a\! +} @end lilypond Hairpins that are terminated with absolute dynamic marks instead of @@ -328,8 +338,10 @@ Hairpins that are terminated with absolute dynamic marks instead of of the absolute dynamic itself can alter where the preceding hairpin ends. -@lilypond[verbatim,quote,relative=2] -c1\< | c4 a c\mf a | c1\< | c4 a c\ffff a +@lilypond[verbatim,quote] +\relative { + c''1\< | c4 a c\mf a | c1\< | c4 a c\ffff a +} @end lilypond @cindex multiple dynamic marks on one note @@ -338,9 +350,11 @@ Spacer rests are needed to engrave multiple marks on one note. This is particularly useful when adding a @notation{crescendo} and @notation{decrescendo} to the same note: -@lilypond[verbatim,quote,relative=2] -c4\< c\! d\> e\! -<< f1 { s4 s4\< s4\> s4\! } >> +@lilypond[verbatim,quote] +\relative { + c''4\< c\! d\> e\! + << f1 { s4 s4\< s4\> s4\! } >> +} @end lilypond @cindex espressivo articulation @@ -352,9 +366,11 @@ The @code{\espressivo} command can be used to indicate a crescendo and decrescendo on the same note. However, be warned that this is implemented as an articulation, not a dynamic. -@lilypond[verbatim,quote,relative=2] -c2 b4 a -g1\espressivo +@lilypond[verbatim,quote] +\relative { + c''2 b4 a + g1\espressivo +} @end lilypond @funindex \cresc @@ -367,11 +383,13 @@ Textual crescendo marks begin with @code{\cresc}. Textual decrescendos begin with @code{\decresc} or @code{\dim}. Extender lines are engraved as required. -@lilypond[verbatim,quote,relative=2] -g8\cresc a b c b c d e\mf | -f8\decresc e d c e\> d c b | -a1\dim ~ | -a2. r4\! | +@lilypond[verbatim,quote] +\relative { + g'8\cresc a b c b c d e\mf | + f8\decresc e d c e\> d c b | + a1\dim ~ | + a2. r4\! | +} @end lilypond @funindex \crescTextCresc @@ -388,18 +406,20 @@ a2. r4\! | @funindex dimHairpin Textual marks for dynamic changes can also replace hairpins: -@lilypond[verbatim,quote,relative=2] -\crescTextCresc -c4\< d e f\! | -\dimTextDecresc -g4\> e d c\! | -\dimTextDecr -e4\> d c b\! | -\dimTextDim -d4\> c b a\! | -\crescHairpin -\dimHairpin -c4\< d\! e\> d\! | +@lilypond[verbatim,quote] +\relative c'' { + \crescTextCresc + c4\< d e f\! | + \dimTextDecresc + g4\> e d c\! | + \dimTextDecr + e4\> d c b\! | + \dimTextDim + d4\> c b a\! | + \crescHairpin + \dimHairpin + c4\< d\! e\> d\! | +} @end lilypond @@ -669,10 +689,12 @@ doits. @warning{In polyphonic music, a slur must be terminated in the same voice it began.} -@lilypond[verbatim,quote,relative=2] -f4( g a) a8 b( -a4 g2 f4) -<c e>2( <b d>2) +@lilypond[verbatim,quote] +\relative { + f''4( g a) a8 b( + a4 g2 f4) + <c e>2( <b d>2) +} @end lilypond @cindex slurs, manual placement @@ -715,14 +737,16 @@ once. For details, see @ref{Phrasing slurs}. Slurs can be solid, dotted, or dashed. Solid is the default slur style: -@lilypond[verbatim,quote,relative=1] -c4( e g2) -\slurDashed -g4( e c2) -\slurDotted -c4( e g2) -\slurSolid -g4( e c2) +@lilypond[verbatim,quote] +\relative { + c'4( e g2) + \slurDashed + g4( e c2) + \slurDotted + c4( e g2) + \slurSolid + g4( e c2) +} @end lilypond @funindex \slurHalfDashed @@ -735,14 +759,16 @@ Slurs can also be made half-dashed (the first half dashed, the second half solid) or half-solid (the first half solid, the second half dashed): -@lilypond[verbatim,quote,relative=1] -c4( e g2) -\slurHalfDashed -g4( e c2) -\slurHalfSolid -c4( e g2) -\slurSolid -g4( e c2) +@lilypond[verbatim,quote] +\relative { + c'4( e g2) + \slurHalfDashed + g4( e c2) + \slurHalfSolid + c4( e g2) + \slurSolid + g4( e c2) +} @end lilypond @funindex \slurDashPattern @@ -751,14 +777,16 @@ g4( e c2) Custom dash patterns for slurs can be defined: -@lilypond[verbatim,quote,relative=1] -c4( e g2) -\slurDashPattern #0.7 #0.75 -g4( e c2) -\slurDashPattern #0.5 #2.0 -c4( e g2) -\slurSolid -g4( e c2) +@lilypond[verbatim,quote] +\relative { + c'4( e g2) + \slurDashPattern #0.7 #0.75 + g4( e c2) + \slurDashPattern #0.5 #2.0 + c4( e g2) + \slurSolid + g4( e c2) +} @end lilypond @@ -823,9 +851,11 @@ Internals Reference: musical sentence are written using the commands @code{\(} and @code{\)} respectively: -@lilypond[verbatim,quote,relative=2] -c4\( d( e) f( -e2) d\) +@lilypond[verbatim,quote] +\relative { + c''4\( d( e) f( + e2) d\) +} @end lilypond @funindex \phrasingSlurUp @@ -866,14 +896,16 @@ Simultaneous or overlapping phrasing slurs are not permitted. Phrasing slurs can be solid, dotted, or dashed. Solid is the default style for phrasing slurs: -@lilypond[verbatim,quote,relative=1] -c4\( e g2\) -\phrasingSlurDashed -g4\( e c2\) -\phrasingSlurDotted -c4\( e g2\) -\phrasingSlurSolid -g4\( e c2\) +@lilypond[verbatim,quote] +\relative { + c'4\( e g2\) + \phrasingSlurDashed + g4\( e c2\) + \phrasingSlurDotted + c4\( e g2\) + \phrasingSlurSolid + g4\( e c2\) +} @end lilypond @funindex phrasingSlurHalfDashed @@ -887,14 +919,16 @@ Phrasing slurs can also be made half-dashed (the first half dashed, the second half solid) or half-solid (the first half solid, the second half dashed): -@lilypond[verbatim,quote,relative=1] -c4\( e g2\) -\phrasingSlurHalfDashed -g4\( e c2\) -\phrasingSlurHalfSolid -c4\( e g2\) -\phrasingSlurSolid -g4\( e c2\) +@lilypond[verbatim,quote] +\relative { + c'4\( e g2\) + \phrasingSlurHalfDashed + g4\( e c2\) + \phrasingSlurHalfSolid + c4\( e g2\) + \phrasingSlurSolid + g4\( e c2\) +} @end lilypond @funindex \phrasingSlurDashPattern @@ -905,14 +939,16 @@ g4\( e c2\) Custom dash patterns for phrasing slurs can be defined: -@lilypond[verbatim,quote,relative=1] -c4\( e g2\) -\phrasingSlurDashPattern #0.7 #0.75 -g4\( e c2\) -\phrasingSlurDashPattern #0.5 #2.0 -c4\( e g2\) -\phrasingSlurSolid -g4\( e c2\) +@lilypond[verbatim,quote] +\relative { + c'4\( e g2\) + \phrasingSlurDashPattern #0.7 #0.75 + g4\( e c2\) + \phrasingSlurDashPattern #0.5 #2.0 + c4\( e g2\) + \phrasingSlurSolid + g4\( e c2\) +} @end lilypond Dash pattern definitions for phrasing slurs have the same structure @@ -956,8 +992,8 @@ Internals Reference: Breath marks are entered using @code{\breathe}: -@lilypond[verbatim,quote,relative=2] -c2. \breathe d4 +@lilypond[verbatim,quote] +{ c''2. \breathe d''4 } @end lilypond Unlike other expressive marks, a breath mark is not associated with @@ -969,8 +1005,8 @@ and phrasing slurs must be placed before @code{\breathe}. A breath mark will end an automatic beam; to override this behavior, see @ref{Manual beams}. -@lilypond[verbatim,quote,relative=2] -c8 \breathe d e f g2 +@lilypond[verbatim,quote] +\relative { c''8 \breathe d e f g2 } @end lilypond Musical indicators for breath marks in ancient notation, @@ -1023,13 +1059,15 @@ is indicated with a plus or minus (up or down). The number indicates the pitch interval that the fall or doit will extend @emph{beyond} the main note. -@lilypond[verbatim,quote,relative=2] -c2\bendAfter #+4 -c2\bendAfter #-4 -c2\bendAfter #+6.5 -c2\bendAfter #-6.5 -c2\bendAfter #+8 -c2\bendAfter #-8 +@lilypond[verbatim,quote] +\relative c'' { + c2\bendAfter #+4 + c2\bendAfter #-4 + c2\bendAfter #+6.5 + c2\bendAfter #-6.5 + c2\bendAfter #+8 + c2\bendAfter #-8 +} @end lilypond @snippets @@ -1068,10 +1106,12 @@ follow a linear path: glissandos, arpeggios, and trills. A @notation{glissando} is created by appending @code{\glissando} to a note: -@lilypond[verbatim,quote,relative=2] -g2\glissando g' -c2\glissando c, -\afterGrace f,1\glissando f'16 +@lilypond[verbatim,quote] +\relative { + g'2\glissando g' + c2\glissando c, + \afterGrace f,1\glissando f'16 +} @end lilypond A glissando can connect notes across staves: @@ -1099,20 +1139,22 @@ the connections between the notes are defined by setting numbered from zero in the order in which they appear in the input @file{.ly} file. -@lilypond[verbatim,quote,relative=2] -<c, e>1\glissando g' | -<c, e>1\glissando | -<g' b> | -\break -\set glissandoMap = #'((0 . 1) (1 . 0)) -<c, g'>1\glissando | -<d a'> | -\set glissandoMap = #'((0 . 0) (0 . 1) (0 . 2)) -c1\glissando | -<d f a> | -\set glissandoMap = #'((2 . 0) (1 . 0) (0 . 1)) -<f d a'>1\glissando | -<c c'> | +@lilypond[verbatim,quote] +\relative { + <c' e>1\glissando g' | + <c, e>1\glissando | + <g' b> | + \break + \set glissandoMap = #'((0 . 1) (1 . 0)) + <c, g'>1\glissando | + <d a'> | + \set glissandoMap = #'((0 . 0) (0 . 1) (0 . 2)) + c1\glissando | + <d f a> | + \set glissandoMap = #'((2 . 0) (1 . 0) (0 . 1)) + <f d a'>1\glissando | + <c c'> | +} @end lilypond Different styles of glissandi can be created. For details, see @@ -1169,24 +1211,26 @@ supported. An @notation{arpeggio} on a chord (also known as a broken chord) is denoted by appending @code{\arpeggio} to the chord construct: -@lilypond[verbatim,quote,relative=1] -<c e g c>1\arpeggio +@lilypond[verbatim,quote] +\relative { <c' e g c>1\arpeggio } @end lilypond Different types of arpeggios may be written. @code{\arpeggioNormal} reverts to a normal arpeggio: -@lilypond[verbatim,quote,relative=1] -<c e g c>2\arpeggio +@lilypond[verbatim,quote] +\relative { + <c' e g c>2\arpeggio -\arpeggioArrowUp -<c e g c>2\arpeggio + \arpeggioArrowUp + <c e g c>2\arpeggio -\arpeggioArrowDown -<c e g c>2\arpeggio + \arpeggioArrowDown + <c e g c>2\arpeggio -\arpeggioNormal -<c e g c>2\arpeggio + \arpeggioNormal + <c e g c>2\arpeggio +} @end lilypond @cindex arpeggio symbols, special @@ -1201,20 +1245,22 @@ Different types of arpeggios may be written. Special @emph{bracketed} arpeggio symbols can be created: -@lilypond[verbatim,quote,relative=1] -<c e g c>2 +@lilypond[verbatim,quote] +\relative { + <c' e g c>2 -\arpeggioBracket -<c e g c>2\arpeggio + \arpeggioBracket + <c e g c>2\arpeggio -\arpeggioParenthesis -<c e g c>2\arpeggio + \arpeggioParenthesis + <c e g c>2\arpeggio -\arpeggioParenthesisDashed -<c e g c>2\arpeggio + \arpeggioParenthesisDashed + <c e g c>2\arpeggio -\arpeggioNormal -<c e g c>2\arpeggio + \arpeggioNormal + <c e g c>2\arpeggio +} @end lilypond The dash properties of the parenthesis arpeggio are controlled @@ -1294,44 +1340,52 @@ Short trills without an extender line are printed with Longer trills with an extender line are made with @code{\startTrillSpan} and @code{\stopTrillSpan}: -@lilypond[verbatim,quote,relative=2] -d1\startTrillSpan -d1 -c2\stopTrillSpan -r2 +@lilypond[verbatim,quote] +\relative { + d''1\startTrillSpan + d1 + c2\stopTrillSpan + r2 +} @end lilypond A trill spanner crossing a line break will restart exactly above the first note on the new line. -@lilypond[ragged-right,verbatim,quote,relative=2] -d1\startTrillSpan -\break -d1 -c2\stopTrillSpan -r2 +@lilypond[ragged-right,verbatim,quote] +\relative { + d''1\startTrillSpan + \break + d1 + c2\stopTrillSpan + r2 +} @end lilypond Consecutive trill spans will work without explicit @code{\stopTrillSpan} commands, since successive trill spanners will automatically become the right bound of the previous trill. -@lilypond[verbatim,quote,relative=2] -d1\startTrillSpan -d1 -b1\startTrillSpan -d2\stopTrillSpan -r2 +@lilypond[verbatim,quote] +\relative { + d''1\startTrillSpan + d1 + b1\startTrillSpan + d2\stopTrillSpan + r2 +} @end lilypond Trills can also be combined with grace notes. The syntax of this construct and the method to precisely position the grace notes are described in @ref{Grace notes}. -@lilypond[verbatim,quote,relative=2] -d1~\afterGrace -d1\startTrillSpan { c32[ d]\stopTrillSpan } -c2 r2 +@lilypond[verbatim,quote] +\relative { + d''1~\afterGrace + d1\startTrillSpan { c32[ d]\stopTrillSpan } + c2 r2 +} @end lilypond @cindex pitched trills @@ -1344,12 +1398,14 @@ be typeset with the @code{\pitchedTrill} command. The first argument is the main note, and the second is the @emph{trilled} note, printed as a stemless note head in parentheses. -@lilypond[verbatim,quote,relative=2] -\pitchedTrill -d2\startTrillSpan fis -d2 -c2\stopTrillSpan -r2 +@lilypond[verbatim,quote] +\relative { + \pitchedTrill + d''2\startTrillSpan fis + d2 + c2\stopTrillSpan + r2 +} @end lilypond @cindex pitched trill with accidental @@ -1359,19 +1415,21 @@ Subsequent accidentals of the same note in the same measure will need to be added manually. Only the accidental of the first pitched trill in a measure is printed. -@lilypond[verbatim,quote,relative=2] -\pitchedTrill -eis4\startTrillSpan fis -eis4\stopTrillSpan -\pitchedTrill -eis4\startTrillSpan cis -eis4\stopTrillSpan -\pitchedTrill -eis4\startTrillSpan fis -eis4\stopTrillSpan -\pitchedTrill -eis4\startTrillSpan fis! -eis4\stopTrillSpan +@lilypond[verbatim,quote] +\relative { + \pitchedTrill + eis''4\startTrillSpan fis + eis4\stopTrillSpan + \pitchedTrill + eis4\startTrillSpan cis + eis4\stopTrillSpan + \pitchedTrill + eis4\startTrillSpan fis + eis4\stopTrillSpan + \pitchedTrill + eis4\startTrillSpan fis! + eis4\stopTrillSpan +} @end lilypond @predefined diff --git a/Documentation/notation/fretted-strings.itely b/Documentation/notation/fretted-strings.itely index e1ccd070a6..1ce12cd706 100644 --- a/Documentation/notation/fretted-strings.itely +++ b/Documentation/notation/fretted-strings.itely @@ -99,10 +99,10 @@ Notation Reference: The string on which a note should be played may be indicated by appending @code{\@var{number}} to a note. -@lilypond[verbatim,quote,relative=0] +@lilypond[verbatim,quote,fragment] \clef "treble_8" c4\5 e\4 g2\3 -<c,\5 e\4 g\3>1 +<c\5 e\4 g\3>1 @end lilypond When fingerings and string indications are used together, their @@ -111,7 +111,7 @@ in the code @emph{only} if they appear inside of an explicit chord: applied to whole chords or single notes @emph{outside} of chords, fingerings are placed using a different mechanism. -@lilypond[verbatim,quote,relative=1] +@lilypond[verbatim,quote,fragment] \clef "treble_8" g4\3-0 g-0\3 @@ -123,11 +123,12 @@ String numbers may also, as is customary with unfretted strings, be printed in Roman numerals and placed below the staff rather than above. -@lilypond[verbatim,quote,relative=2] -c2\2 +@lilypond[verbatim,quote,fragment] +\clef "treble_8" +c'2\2 a\3 \romanStringNumbers -c\2 +c'\2 \set stringNumberOrientations = #'(down) a\3 \arabicStringNumbers @@ -1647,14 +1648,14 @@ Right-hand fingerings @var{p-i-m-a} must be entered using @warning{If the number is entered in Scheme notation, remember to append a space before following it with a closing @code{>} or similar.} -@lilypond[quote,verbatim,relative=0] +@lilypond[quote,verbatim,fragment] \clef "treble_8" c4\rightHandFinger #1 e\rightHandFinger #2 g\rightHandFinger #3 -c\rightHandFinger #4 -<c,\rightHandFinger #1 e\rightHandFinger #2 - g\rightHandFinger #3 c\rightHandFinger #4 >1 +c'\rightHandFinger #4 +<c\rightHandFinger #1 e\rightHandFinger #2 + g\rightHandFinger #3 c'\rightHandFinger #4 >1 @end lilypond For convenience, you can abbreviate @code{\rightHandFinger} to something @@ -1708,14 +1709,16 @@ or, for experienced users, a typesetter like GuitarTeX. This example demonstrates how to include guitar position and barring indications. -@lilypond[quote,ragged-right,verbatim,relative=0] -\clef "treble_8" -b16 d g b e -\textSpannerDown -\override TextSpanner.bound-details.left.text = #"XII " -g16\startTextSpan -b16 e g e b g\stopTextSpan -e16 b g d +@lilypond[quote,ragged-right,verbatim,fragment] +\relative { + \clef "treble_8" + b,16 d g b e + \textSpannerDown + \override TextSpanner.bound-details.left.text = #"XII " + g16\startTextSpan + b16 e g e b g\stopTextSpan + e16 b g d +} @end lilypond @seealso diff --git a/Documentation/notation/input.itely b/Documentation/notation/input.itely index 5578eb941e..e311de51e3 100644 --- a/Documentation/notation/input.itely +++ b/Documentation/notation/input.itely @@ -2598,12 +2598,14 @@ This property is also used to control output to the MIDI file. Note that it skips all events, including tempo and instrument changes. You have been warned. -@lilypond[quote,relative=2,ragged-right,verbatim] -c8 d -\set Score.skipTypesetting = ##t -e8 e e e e e e e -\set Score.skipTypesetting = ##f -c8 d b bes a g c2 +@lilypond[quote,ragged-right,verbatim] +\relative { + c''8 d + \set Score.skipTypesetting = ##t + e8 e e e e e e e + \set Score.skipTypesetting = ##f + c8 d b bes a g c2 +} @end lilypond In polyphonic music, @code{Score.skipTypesetting} will affect all diff --git a/Documentation/notation/keyboards.itely b/Documentation/notation/keyboards.itely index fbb2e616fa..631268ec9e 100644 --- a/Documentation/notation/keyboards.itely +++ b/Documentation/notation/keyboards.itely @@ -373,11 +373,11 @@ staff based on the first note named in the chord construct. Whenever a voice switches to another staff, a line connecting the notes can be printed automatically: -@lilypond[quote,verbatim,relative=1] +@lilypond[quote,verbatim] \new PianoStaff << \new Staff = "one" { \showStaffSwitch - c1 + c'1 \change Staff = "two" b2 a } @@ -487,13 +487,15 @@ produced: @notation{sustain}, @notation{sostenuto} (@notation{sos.}), and @notation{una corda} (@notation{U.C.}). Sustain pedals are also found on vibraphones and celestas. -@lilypond[quote,verbatim,relative=2] -c4\sustainOn d e g -<c, f a>1\sustainOff -c4\sostenutoOn e g c, -<bes d f>1\sostenutoOff -c4\unaCorda d e g -<d fis a>1\treCorde +@lilypond[quote,verbatim] +\relative { + c''4\sustainOn d e g + <c, f a>1\sustainOff + c4\sostenutoOn e g c, + <bes d f>1\sostenutoOff + c4\unaCorda d e g + <d fis a>1\treCorde +} @end lilypond @cindex pedal indication styles @@ -512,15 +514,17 @@ There are three styles of pedal indications: text, bracket, and mixed. The sustain pedal and the una corda pedal use the text style by default while the sostenuto pedal uses mixed by default. -@lilypond[quote,verbatim,relative=2] -c4\sustainOn g c2\sustainOff -\set Staff.pedalSustainStyle = #'mixed -c4\sustainOn g c d -d\sustainOff\sustainOn g, c2\sustainOff -\set Staff.pedalSustainStyle = #'bracket -c4\sustainOn g c d -d\sustainOff\sustainOn g, c2 -\bar "|." +@lilypond[quote,verbatim] +\relative { + c''4\sustainOn g c2\sustainOff + \set Staff.pedalSustainStyle = #'mixed + c4\sustainOn g c d + d\sustainOff\sustainOn g, c2\sustainOff + \set Staff.pedalSustainStyle = #'bracket + c4\sustainOn g c d + d\sustainOff\sustainOn g, c2 + \bar "|." +} @end lilypond The placement of the pedal commands matches the physical movement of the @@ -641,20 +645,20 @@ is controlled by a single pedal. From the player's left to right, the pedals are D, C, and B on the left and E, F, G, and A on the right. The position of the pedals may be indicated with text marks: -@lilypond[quote,verbatim,relative=2] +@lilypond[quote,verbatim,fragment] \textLengthOn -cis1_\markup \concat \vcenter { +cis''1_\markup \concat \vcenter { [D \flat C \sharp B|E \sharp F \sharp G A \flat] } -c!1_\markup \concat \vcenter { +c''!1_\markup \concat \vcenter { [ C \natural ] } @end lilypond or pedal diagrams: -@lilypond[quote,verbatim,relative=2] +@lilypond[quote,verbatim,fragment] \textLengthOn -cis1_\markup { \harp-pedal #"^v-|vv-^" } -c!1_\markup { \harp-pedal #"^o--|vv-^" } +cis''1_\markup { \harp-pedal #"^v-|vv-^" } +c''!1_\markup { \harp-pedal #"^o--|vv-^" } @end lilypond The @code{\harp-pedal} command accepts a string of characters, where diff --git a/Documentation/notation/pitches.itely b/Documentation/notation/pitches.itely index a327ec19d7..322d5e41b4 100644 --- a/Documentation/notation/pitches.itely +++ b/Documentation/notation/pitches.itely @@ -360,16 +360,16 @@ is made by adding @code{isis} or @code{eses}. This syntax is derived from Dutch note naming conventions. To use other names for accidentals, see @ref{Note names in other languages}. -@lilypond[verbatim,quote,relative=2] -ais1 aes aisis aeses +@lilypond[verbatim,quote,fragment] +\relative c'' { ais1 aes aisis aeses } @end lilypond A natural pitch is entered as a simple note name; no suffix is required. A natural sign will be printed when needed to cancel the effect of an earlier accidental or key signature. -@lilypond[verbatim,quote,relative=2] -a4 aes a2 +@lilypond[verbatim,quote,fragment] +\relative c'' { a4 aes a2 } @end lilypond @cindex quarter tones @@ -379,8 +379,8 @@ a4 aes a2 Quarter tones may be added; the following is a series of Cs with increasing pitches: -@lilypond[verbatim,quote,relative=2] -ceseh1 ces ceh c cih cis cisih +@lilypond[verbatim,quote,fragment] +\relative c'' { ceseh1 ces ceh c cih cis cisih } @end lilypond @@ -403,8 +403,8 @@ cautionary accidental (i.e., an accidental within parentheses) can be obtained by adding the question mark@tie{}@code{?} after the pitch. -@lilypond[verbatim,quote,relative=2] -cis cis cis! cis? c c c! c? +@lilypond[verbatim,quote,fragment] +\relative c'' { cis cis cis! cis? c c c! c? } @end lilypond @cindex accidental on tied note @@ -413,10 +413,12 @@ cis cis cis! cis? c c c! c? Accidentals on tied notes are only printed at the beginning of a new system: -@lilypond[verbatim,quote,relative=2,ragged-right] -cis1~ 1~ -\break -cis +@lilypond[verbatim,quote,fragment,ragged-right] +\relative c'' { + cis1~ 1~ + \break + cis +} @end lilypond @@ -556,8 +558,8 @@ are accepted in LilyPond. Similarly, both @code{es} and @code{eeses}@tie{}/@tie{}@code{eses}. Sometimes only these contracted names are defined in the corresponding language files. -@lilypond[verbatim,quote,relative=2] -a2 as e es a ases e eses +@lilypond[verbatim,quote,fragment] +\relative c'' { a2 as e es a ases e eses } @end lilypond @@ -1116,23 +1118,23 @@ This section discusses how to alter the output of pitches. Without any explicit command, the default clef for LilyPond is the treble (or @emph{G}) clef. -@lilypond[verbatim,quote,relative=1,ragged-right] -c2 c +@lilypond[verbatim,quote,fragment,ragged-right] +c'2 c' @end lilypond However, the clef can be changed by using the @code{\clef} command and an appropriate clef name. @emph{Middle C} is shown in each of the following examples. -@lilypond[verbatim,quote,relative=1] +@lilypond[verbatim,quote,fragment] \clef treble -c2 c +c'2 c' \clef alto -c2 c +c'2 c' \clef tenor -c2 c +c'2 c' \clef bass -c2 c +c'2 c' @end lilypond For the full range of possible clef names see @ref{Clef styles}. @@ -1161,29 +1163,29 @@ and@tie{}@code{_15} and@tie{}@code{^15} transpose by two octaves. Other integers can be used if required. Clef names containing non-alphabetic characters must be enclosed in quotes -@lilypond[verbatim,quote,relative=1] +@lilypond[verbatim,quote,fragment] \clef treble -c2 c +c'2 c' \clef "treble_8" -c2 c +c'2 c' \clef "bass^15" -c2 c +c'2 c' \clef "alto_2" -c2 c +c'2 c' \clef "G_8" -c2 c +c'2 c' \clef "F^5" -c2 c +c'2 c' @end lilypond Optional octavation can be obtained by enclosing the numeric argument in parentheses or brackets: -@lilypond[verbatim,quote,relative=1] +@lilypond[verbatim,quote,fragment] \clef "treble_(8)" -c2 c +c'2 c' \clef "bass^[15]" -c2 c +c'2 c' @end lilypond The pitches are displayed as if the numeric argument were @@ -1194,14 +1196,14 @@ the new clef symbol to be printed at the end of the previous line, as a @emph{warning} clef, as well as the beginning of the next. This @emph{warning} clef can be suppressed. -@lilypond[verbatim,quote,relative=1] -\clef treble { c2 c } \break -\clef bass { c2 c } \break +@lilypond[verbatim,quote,fragment] +\clef treble { c'2 c' } \break +\clef bass { c'2 c' } \break \clef alto \set Staff.explicitClefVisibility = #end-of-line-invisible - { c2 c } \break + { c'2 c' } \break \unset Staff.explicitClefVisibility -\clef bass { c2 c } \break +\clef bass { c'2 c' } \break @end lilypond By default, a clef that has previously been printed will not be @@ -1209,37 +1211,37 @@ re-printed if the same @code{\clef} command is issued again and will be ignored. The the command @code{\set Staff.forceClef = ##t} changes this behaviour. -@lilypond[verbatim,quote,relative=1] +@lilypond[verbatim,quote,fragment] \clef treble - c1 + c'1 \clef treble - c1 + c'1 \set Staff.forceClef = ##t - c1 + c'1 \clef treble - c1 + c'1 @end lilypond When there is a manual clef change, the glyph of the changed clef will be smaller than normal. This behaviour can be overridden. -@lilypond[verbatim,quote,relative=1] +@lilypond[verbatim,quote,fragment] \clef "treble" - c1 + c'1 \clef "bass" - c1 + c'1 \clef "treble" - c1 + c'1 \override Staff.Clef.full-size-change = ##t \clef "bass" - c1 + c'1 \clef "treble" - c1 + c'1 \revert Staff.Clef.full-size-change \clef "bass" - c1 + c'1 \clef "treble" - c1 + c'1 @end lilypond @snippets @@ -1272,13 +1274,13 @@ grobs. So any @code{\override} done to the @var{Clef} will also need to be applied, as a separate @code{\override}, to the @var{ClefModifier} grob. -@lilypond[fragment,quote,verbatim,relative=1] +@lilypond[fragment,quote,verbatim] \new Staff \with { \override Clef.color = #blue \override ClefModifier.color = #red } -\clef "treble_8" c4 +\clef "treble_8" c'4 @end lilypond @@ -1345,11 +1347,13 @@ standard mode names, also called @notation{church modes}: @code{\ionian}, @code{\dorian}, @code{\phrygian}, @code{\lydian}, @code{\mixolydian}, @code{\aeolian}, and @code{\locrian}. -@lilypond[verbatim,quote,relative=2] -\key g \major -fis1 -f -fis +@lilypond[verbatim,quote,fragment] +\relative { + \key g \major + fis''1 + f + fis +} @end lilypond Additional modes can be defined, by listing the alterations @@ -1374,14 +1378,14 @@ printed. If a single position is specified in an entry, the accidentals are placed within the octave ending at that staff position. -@lilypond[verbatim, quote,relative=0] +@lilypond[verbatim, quote,fragment] \override Staff.KeySignature.flat-positions = #'((-5 . 5)) \override Staff.KeyCancellation.flat-positions = #'((-5 . 5)) -\clef bass \key es \major es g bes d -\clef treble \bar "||" \key es \major es g bes d +\clef bass \key es \major es g bes d' +\clef treble \bar "||" \key es \major es' g' bes' d'' \override Staff.KeySignature.sharp-positions = #'(2) -\bar "||" \key b \major b fis b2 +\bar "||" \key b \major b' fis' b'2 @end lilypond @snippets @@ -1429,18 +1433,20 @@ Internals Reference: @notation{Ottava brackets} introduce an extra transposition of an octave for the staff: -@lilypond[verbatim,quote,relative=2] -a2 b -\ottava #-2 -a2 b -\ottava #-1 -a2 b -\ottava #0 -a2 b -\ottava #1 -a2 b -\ottava #2 -a2 b +@lilypond[verbatim,quote] +\relative a' { + a2 b + \ottava #-2 + a2 b + \ottava #-1 + a2 b + \ottava #0 + a2 b + \ottava #1 + a2 b + \ottava #2 + a2 b +} @end lilypond @snippets @@ -2964,16 +2970,18 @@ This section suggests ways of altering note heads. The appearance of note heads may be altered: -@lilypond[verbatim,quote,relative=2] -c4 b -\override NoteHead.style = #'cross -c4 b -\revert NoteHead.style -a b -\override NoteHead.style = #'harmonic -a b -\revert NoteHead.style -c4 d e f +@lilypond[verbatim,quote] +\relative c'' { + c4 b + \override NoteHead.style = #'cross + c4 b + \revert NoteHead.style + a b + \override NoteHead.style = #'harmonic + a b + \revert NoteHead.style + c4 d e f +} @end lilypond To see all note head styles, see @ref{Note head styles}. @@ -2983,22 +2991,26 @@ intentions. The following generic predefined commands modify the note head in both staff and tablature contexts and can be used to represent any musical meaning: -@lilypond[verbatim,quote,relative=2] -c4 b -\xNotesOn - a b c4 b -\xNotesOff -c4 d +@lilypond[verbatim,quote] +\relative { + c''4 b + \xNotesOn + a b c4 b + \xNotesOff + c4 d +} @end lilypond The music function form of this predefined command may be used inside and outside chords to generate crossed note heads in both staff and tablature contexts: -@lilypond[verbatim,quote,relative=2] -c4 b -\xNote { e f } -c b < g \xNote c f > b +@lilypond[verbatim,quote] +\relative { + c''4 b + \xNote { e f } + c b < g \xNote c f > b +} @end lilypond As synonyms for @code{\xNote}, @code{\xNotesOn} and @code{\xNotesOff}, @@ -3007,8 +3019,10 @@ be used. The term @notation{dead note} is commonly used by guitarists. There is also a similar shorthand for diamond shapes: -@lilypond[verbatim,quote,relative=2] -<c f\harmonic>2 <d a'\harmonic>4 <c g'\harmonic> f\harmonic +@lilypond[verbatim,quote] +\relative c'' { + <c f\harmonic>2 <d a'\harmonic>4 <c g'\harmonic> f\harmonic +} @end lilypond @predefined @@ -3133,17 +3147,19 @@ notation was popular in nineteenth-century American song books. Shape note heads can be produced in Sacred Harp, Southern Harmony, Funk (Harmonica Sacra), Walker, and Aiken (Christian Harmony) styles: -@lilypond[verbatim,quote,relative=2] -\aikenHeads -c, d e f g2 a b1 c \break -\sacredHarpHeads -c,4 d e f g2 a b1 c \break -\southernHarmonyHeads -c,4 d e f g2 a b1 c \break -\funkHeads -c,4 d e f g2 a b1 c \break -\walkerHeads -c,4 d e f g2 a b1 c \break +@lilypond[verbatim,quote] +\relative c'' { + \aikenHeads + c, d e f g2 a b1 c \break + \sacredHarpHeads + c,4 d e f g2 a b1 c \break + \southernHarmonyHeads + c,4 d e f g2 a b1 c \break + \funkHeads + c,4 d e f g2 a b1 c \break + \walkerHeads + c,4 d e f g2 a b1 c \break +} @end lilypond @funindex \key @@ -3164,21 +3180,22 @@ of the scale is determined by the @code{\key} command. When writing in a minor key, the scale step can be determined from the relative major: -@lilypond[verbatim,quote,relative=2] -\key a \minor -\aikenHeads -a b c d e2 f g1 a \break -\aikenHeadsMinor -a,4 b c d e2 f g1 a \break -\sacredHarpHeadsMinor -a,2 b c d \break -\southernHarmonyHeadsMinor -a2 b c d \break -\funkHeadsMinor -a2 b c d \break -\walkerHeadsMinor -a2 b c d \break - +@lilypond[verbatim,quote] +\relative c'' { + \key a \minor + \aikenHeads + a b c d e2 f g1 a \break + \aikenHeadsMinor + a,4 b c d e2 f g1 a \break + \sacredHarpHeadsMinor + a,2 b c d \break + \southernHarmonyHeadsMinor + a2 b c d \break + \funkHeadsMinor + a2 b c d \break + \walkerHeadsMinor + a2 b c d \break +} @end lilypond @@ -3234,11 +3251,11 @@ Improvisation is sometimes denoted with slashed note heads, where the performer may choose any pitch but should play the specified rhythm. Such note heads can be created: -@lilypond[verbatim,quote,relative=2] +@lilypond[verbatim,quote] \new Voice \with { \consists "Pitch_squash_engraver" -} { - e8 e g a a16( bes) a8 g +} \relative { + e''8 e g a a16( bes) a8 g \improvisationOn e8 ~ 2 ~ 8 f4 f8 ~ diff --git a/Documentation/notation/repeats.itely b/Documentation/notation/repeats.itely index 8d9312716d..ed3083090b 100644 --- a/Documentation/notation/repeats.itely +++ b/Documentation/notation/repeats.itely @@ -88,20 +88,24 @@ where @code{@var{musicexpr}} is a music expression. A single repeat without an alternate ending: -@lilypond[verbatim,quote,relative=2] -\repeat volta 2 { c4 d e f } -c2 d -\repeat volta 2 { d4 e f g } +@lilypond[verbatim,quote] +\relative { + \repeat volta 2 { c''4 d e f } + c2 d + \repeat volta 2 { d4 e f g } +} @end lilypond An @q{opening} repeat mark is not, by default, printed in the first full measure. However it is possible to add one by using @code{\bar ".|:"} before the first note. -@lilypond[verbatim,fragment,quote,relative=2] -\repeat volta 2 { \bar ".|:" c4 d e f } -c2 d -\repeat volta 2 { d4 e f g } +@lilypond[verbatim,fragment,quote] +\relative { + \repeat volta 2 { \bar ".|:" c''4 d e f } + c2 d + \repeat volta 2 { d4 e f g } +} @end lilypond Alternative endings can be produced using @code{\alternative}. Each @@ -122,36 +126,42 @@ repeats are given the first alternative. A single repeat with one alternate ending: -@lilypond[verbatim,quote,relative=2] -\repeat volta 2 { c4 d e f | } -\alternative { - { c2 e | } - { f2 g | } +@lilypond[verbatim,quote] +\relative { + \repeat volta 2 { c''4 d e f | } + \alternative { + { c2 e | } + { f2 g | } + } + c1 } -c1 @end lilypond Multiple repeats with one alternate ending: -@lilypond[verbatim,quote,relative=2] -\repeat volta 4 { c4 d e f | } -\alternative { - { c2 e | } - { f2 g | } +@lilypond[verbatim,quote] +\relative { + \repeat volta 4 { c''4 d e f | } + \alternative { + { c2 e | } + { f2 g | } + } + c1 } -c1 @end lilypond Multiple repeats with more than one alternate ending: -@lilypond[verbatim,quote,relative=2] -\repeat volta 3 { c4 d e f | } -\alternative { - { c2 e | } - { f2 g | } - { a2 g | } +@lilypond[verbatim,quote] +\relative { + \repeat volta 3 { c''4 d e f | } + \alternative { + { c2 e | } + { f2 g | } + { a2 g | } + } + c1 } -c1 @end lilypond @warning{If there are two or more alternatives, nothing should appear @@ -179,20 +189,21 @@ measure. In such cases, the repeat signs do not constitute true bar lines. Do not use @code{\partial} commands or bar checks where these repeat signs are printed: -@lilypond[verbatim,quote,relative=1] -% no \partial here -c4 e g % no bar check here -% no \partial here -\repeat volta 4 { - e4 | - c2 e | +@lilypond[verbatim,quote] +\relative { % no \partial here + c'4 e g % no bar check here % no \partial here - g4 g g % no bar check here + \repeat volta 4 { + e4 | + c2 e | + % no \partial here + g4 g g % no bar check here + } + % no \partial here + g4 | + a2 a | + g1 | } -% no \partial here -g4 | -a2 a | -g1 | @end lilypond Similarly, if a repeat begins with the initial partial measure of @@ -200,18 +211,20 @@ a score and has no alternate endings, the same conditions apply as in the above example, except that in this case the @code{\partial} command is required at the beginning of the score: -@lilypond[verbatim,quote,relative=1] -\partial 4 % required -\repeat volta 4 { - e4 | - c2 e | +@lilypond[verbatim,quote] +\relative { + \partial 4 % required + \repeat volta 4 { + e'4 | + c2 e | + % no \partial here + g4 g g % no bar check here + } % no \partial here - g4 g g % no bar check here + g4 | + a2 a | + g1 | } -% no \partial here -g4 | -a2 a | -g1 | @end lilypond @cindex repeats, with ties @@ -222,12 +235,14 @@ g1 | Ties may be added to a second ending: -@lilypond[verbatim,quote,relative=2] -c1 -\repeat volta 2 { c4 d e f~ } -\alternative { - { f2 d } - { f2\repeatTie f, } +@lilypond[verbatim,quote] +\relative { + c''1 + \repeat volta 2 { c4 d e f~ } + \alternative { + { f2 d } + { f2\repeatTie f, } + } } @end lilypond @@ -244,48 +259,56 @@ corresponding @qq{D.S.} mark must be added manually. Away from a repeat: -@lilypond[verbatim,quote,relative=1] -e1 -\inStaffSegno -f2 g a b -c1_"D.S." \bar "|." +@lilypond[verbatim,quote] +\relative { + e'1 + \inStaffSegno + f2 g a b + c1_"D.S." \bar "|." +} @end lilypond At the start of a repeat: -@lilypond[verbatim,quote,relative=1] -e1 -\repeat volta 2 { - \inStaffSegno % start repeat - f2 g a b +@lilypond[verbatim,quote] +\relative { + e'1 + \repeat volta 2 { + \inStaffSegno % start repeat + f2 g a b + } + c1_"D.S." \bar "|." } -c1_"D.S." \bar "|." @end lilypond At the end of a repeat: -@lilypond[verbatim,quote,relative=1] -e1 -\repeat volta 2 { +@lilypond[verbatim,quote] +\relative { + e'1 + \repeat volta 2 { + f2 g a b + \inStaffSegno % end repeat + } f2 g a b - \inStaffSegno % end repeat + c1_"D.S." \bar "|." } -f2 g a b -c1_"D.S." \bar "|." @end lilypond Between two repeats: -@lilypond[verbatim,quote,relative=1] -e1 -\repeat volta 2 { - f2 g a b -} -\inStaffSegno % double repeat -\repeat volta 2 { - f2 g a b +@lilypond[verbatim,quote] +\relative { + e'1 + \repeat volta 2 { + f2 g a b + } + \inStaffSegno % double repeat + \repeat volta 2 { + f2 g a b + } + c1_"D.S." \bar "|." } -c1_"D.S." \bar "|." @end lilypond Alternative bar line symbols can be obtained by setting (in the Score @@ -295,17 +318,19 @@ required bar line type. The alternative bar line types must be selected from the pre-defined types or types previously defined with the @code{\defineBarLine} command (see @ref{Bar lines}). -@lilypond[verbatim,quote,relative=1] +@lilypond[verbatim,quote] \defineBarLine ":|.S[" #'(":|." "S[" "") \defineBarLine "]" #'("]" "" "") -e1 -\repeat volta 2 { - f2 g a b - \once \set Score.endRepeatSegnoType = ":|.S[" - \inStaffSegno +\relative { + e'1 + \repeat volta 2 { + f2 g a b + \once \set Score.endRepeatSegnoType = ":|.S[" + \inStaffSegno + } + f2 g \bar "]" a b + c1_"D.S." \bar "|." } -f2 g \bar "]" a b -c1_"D.S." \bar "|." @end lilypond @snippets @@ -430,11 +455,13 @@ layout of repeats. Its value is a Scheme list of repeat commands. @item start-repeat Print a @code{.|:} bar line. -@lilypond[verbatim,quote,relative=2] -c1 -\set Score.repeatCommands = #'(start-repeat) -d4 e f g -c1 +@lilypond[verbatim,quote] +\relative { + c''1 + \set Score.repeatCommands = #'(start-repeat) + d4 e f g + c1 +} @end lilypond As per standard engraving practice, repeat signs are not printed @@ -443,37 +470,43 @@ at the beginning of a piece. @item end-repeat Print a @code{:|.} bar line: -@lilypond[verbatim,quote,relative=2] -c1 -d4 e f g -\set Score.repeatCommands = #'(end-repeat) -c1 +@lilypond[verbatim,quote] +\relative { + c''1 + d4 e f g + \set Score.repeatCommands = #'(end-repeat) + c1 +} @end lilypond @item (volta @var{number}) @dots{} (volta #f) Create a new volta with the specified number. The volta bracket must be explicitly terminated, or it will not be printed. -@lilypond[verbatim,quote,relative=2] -f4 g a b -\set Score.repeatCommands = #'((volta "2")) -g4 a g a -\set Score.repeatCommands = #'((volta #f)) -c1 +@lilypond[verbatim,quote] +\relative { + f''4 g a b + \set Score.repeatCommands = #'((volta "2")) + g4 a g a + \set Score.repeatCommands = #'((volta #f)) + c1 +} @end lilypond @end table Multiple repeat commands may occur at the same point: -@lilypond[verbatim,quote,relative=2] -f4 g a b -\set Score.repeatCommands = #'((volta "2, 5") end-repeat) -g4 a g a -c1 -\set Score.repeatCommands = #'((volta #f) (volta "95") end-repeat) -b1 -\set Score.repeatCommands = #'((volta #f)) +@lilypond[verbatim,quote] +\relative { + f''4 g a b + \set Score.repeatCommands = #'((volta "2, 5") end-repeat) + g4 a g a + c1 + \set Score.repeatCommands = #'((volta #f) (volta "95") end-repeat) + b1 + \set Score.repeatCommands = #'((volta #f)) +} @end lilypond @cindex volta bracket with text @@ -536,9 +569,11 @@ where @code{@var{musicexpr}} is a music expression and @code{@var{repeatcount}} is the number of times @code{@var{musicexpr}} is repeated. -@lilypond[verbatim,quote,relative=2] -\repeat unfold 2 { c4 d e f } -c1 +@lilypond[verbatim,quote] +\relative { + \repeat unfold 2 { c''4 d e f } + c1 +} @end lilypond In some cases, especially in a @code{\relative} context, the @@ -557,55 +592,63 @@ a'4 b c | a'4 b c Unfold repeats can be made with alternate endings. -@lilypond[verbatim,quote,relative=2] -\repeat unfold 2 { c4 d e f } -\alternative { - { c2 g' } - { c,2 b } +@lilypond[verbatim,quote] +\relative { + \repeat unfold 2 { c''4 d e f } + \alternative { + { c2 g' } + { c,2 b } + } + c1 } -c1 @end lilypond If there are more repeats than there are alternate endings, the first alternative is applied multiple times until the remaining alternatives make up the total number of repeats. -@lilypond[verbatim,quote,relative=2] -\repeat unfold 4 { c4 d e f } -\alternative { - { c2 g' } - { c,2 b } - { e2 d } - } -c1 +@lilypond[verbatim,quote] +\relative { + \repeat unfold 4 { c''4 d e f } + \alternative { + { c2 g' } + { c,2 b } + { e2 d } + } + c1 +} @end lilypond If there are more alternate endings than repeats then only the first alternatives are applied. The remaining alternatives will be ignored and not printed. -@lilypond[verbatim,quote,relative=2] -\repeat unfold 2 { c4 d e f } -\alternative { - { c2 g' } - { c,2 b } - { e2 d } +@lilypond[verbatim,quote] +\relative { + \repeat unfold 2 { c''4 d e f } + \alternative { + { c2 g' } + { c,2 b } + { e2 d } + } + c1 } -c1 @end lilypond It is also possible to nest multiple @code{unfold} functions (with or without alternate endings). -@lilypond[verbatim,quote,relative=2] -\repeat unfold 2 { - \repeat unfold 2 { c4 d e f } - \alternative { - { c2 g' } - { c,2 b } +@lilypond[verbatim,quote] +\relative { + \repeat unfold 2 { + \repeat unfold 2 { c''4 d e f } + \alternative { + { c2 g' } + { c,2 b } + } } + c1 } -c1 @end lilypond Chord constructs can be repeated by the chord repetition symbol @@ -664,34 +707,42 @@ where @code{@var{musicexpr}} is a music expression. Patterns that are shorter than one measure are replaced by slashes. -@lilypond[verbatim,quote,relative=2] -\repeat percent 4 { c128 d e f } -\repeat percent 4 { c64 d e f } -\repeat percent 5 { c32 d e f } -\repeat percent 4 { c16 d e f } -\repeat percent 4 { c8 d } -\repeat percent 4 { c4 } -\repeat percent 2 { c2 } +@lilypond[verbatim,quote] +\relative c'' { + \repeat percent 4 { c128 d e f } + \repeat percent 4 { c64 d e f } + \repeat percent 5 { c32 d e f } + \repeat percent 4 { c16 d e f } + \repeat percent 4 { c8 d } + \repeat percent 4 { c4 } + \repeat percent 2 { c2 } +} @end lilypond Patterns of one or two measures are replaced by percent-like symbols. -@lilypond[verbatim,quote,relative=2] -\repeat percent 2 { c4 d e f } -\repeat percent 2 { c2 d } -\repeat percent 2 { c1 } +@lilypond[verbatim,quote] +\relative c'' { + \repeat percent 2 { c4 d e f } + \repeat percent 2 { c2 d } + \repeat percent 2 { c1 } +} @end lilypond -@lilypond[verbatim,quote,relative=2] -\repeat percent 3 { c4 d e f | c2 g' } +@lilypond[verbatim,quote] +\relative { + \repeat percent 3 { c''4 d e f | c2 g' } +} @end lilypond Patterns that are shorter than one measure but contain mixed durations use a double-percent symbol. -@lilypond[verbatim,quote,relative=2] -\repeat percent 4 { c8. <d f>16 } -\repeat percent 2 { \tuplet 3/2 { r8 c d } e4 } +@lilypond[verbatim,quote] +\relative { + \repeat percent 4 { c''8. <d f>16 } + \repeat percent 2 { \tuplet 3/2 { r8 c d } e4 } +} @end lilypond @snippets @@ -747,10 +798,12 @@ slashes to a single note. To place tremolo marks between notes, use @code{\repeat} with tremolo style: -@lilypond[quote,verbatim,relative=2] -\repeat tremolo 8 { c16 d } -\repeat tremolo 6 { c16 d } -\repeat tremolo 2 { c16 d } +@lilypond[quote,verbatim] +\relative c'' { + \repeat tremolo 8 { c16 d } + \repeat tremolo 6 { c16 d } + \repeat tremolo 2 { c16 d } +} @end lilypond The @code{\repeat tremolo} syntax expects exactly two notes within @@ -781,9 +834,11 @@ subdivision (it must be at least 8). If @code{@var{N}} is 8, one beam is added to the note's stem. If @code{@var{N}} is omitted, the last value is used: -@lilypond[quote,verbatim,relative=2] -c2:8 c:32 -c: c: +@lilypond[quote,verbatim] +\relative { + c''2:8 c:32 + c: c: +} @end lilypond @snippets diff --git a/Documentation/notation/rhythms.itely b/Documentation/notation/rhythms.itely index ef109528a1..da24f57b49 100644 --- a/Documentation/notation/rhythms.itely +++ b/Documentation/notation/rhythms.itely @@ -60,21 +60,25 @@ whole you must use the @code{\longa} (a double breve) and specified. Shorter values are possible, but only as beamed notes. @c Two 64th notes are needed to obtain beams -@lilypond[quote,verbatim,relative=2] -\time 8/1 -c\longa c\breve c1 c2 -c4 c8 c16 c32 c64 c128 c128 +@lilypond[quote,verbatim] +\relative { + \time 8/1 + c''\longa c\breve c1 c2 + c4 c8 c16 c32 c64 c128 c128 +} @end lilypond Here are the same durations with automatic beaming turned off. @c not strictly "writing rhythms"; more of a "displaying" thing, @c but it's ok here. -gp -@lilypond[quote,verbatim,relative=2] -\time 8/1 -\autoBeamOff -c\longa c\breve c1 c2 -c4 c8 c16 c32 c64 c128 c128 +@lilypond[quote,verbatim] +\relative { + \time 8/1 + \autoBeamOff + c''\longa c\breve c1 c2 + c4 c8 c16 c32 c64 c128 c128 +} @end lilypond A note with the duration of a quadruple breve may be entered with @@ -89,17 +93,19 @@ If the duration is omitted, it is set to the previously entered duration. The default for the first note is a quarter note. -@lilypond[quote,verbatim,relative=2] -a a a2 a a4 a a1 a +@lilypond[quote,verbatim] +\relative { a' a a2 a a4 a a1 a } @end lilypond Durations occuring on their own within a music sequence will take their pitches from the preceding note or chord. -@lilypond[quote,verbatim,relative=2] -\time 8/1 -c \longa \breve 1 2 -4 8 16 32 64 128 128 +@lilypond[quote,verbatim] +\relative { + \time 8/1 + c'' \longa \breve 1 2 + 4 8 16 32 64 128 128 +} @end lilypond @cindex notes, dotted @@ -113,8 +119,8 @@ To obtain dotted note lengths, place a dot (@code{.}) after the duration. Double-dotted notes are specified by appending two dots, and so on. -@lilypond[quote,verbatim,relative=2] -a4 b c4. b8 a4. b4.. c8. +@lilypond[quote,verbatim] +\relative { a'4 b c4. b8 a4. b4.. c8. } @end lilypond Some durations cannot be represented with just binary durations @@ -210,9 +216,11 @@ The fraction's numerator will be printed over or under the notes, optionally with a bracket. The most common tuplets are triplets (3@tie{}notes sound within the duration normally allowed for@tie{}2). -@lilypond[quote,verbatim,relative=2] -a2 \tuplet 3/2 { b4 4 4 } -c4 c \tuplet 3/2 { b4 a g } +@lilypond[quote,verbatim] +\relative { + a'2 \tuplet 3/2 { b4 4 4 } + c4 c \tuplet 3/2 { b4 a g } +} @end lilypond @cindex tuplet grouping @@ -222,8 +230,10 @@ When entering long passages of tuplets, having to write a separate to specify the duration of one tuplet group directly before the music in order to have the tuplets grouped automatically: -@lilypond[quote,verbatim,relative=2] -g2 r8 \tuplet 3/2 8 { cis16 d e e f g g f e } +@lilypond[quote,verbatim] +\relative { + g'2 r8 \tuplet 3/2 8 { cis16 d e e f g g f e } +} @end lilypond @cindex tuplet bracket placement @@ -237,18 +247,22 @@ g2 r8 \tuplet 3/2 8 { cis16 d e e f g g f e } Tuplet brackets may be manually placed above or below the staff: -@lilypond[quote,verbatim,relative=2] -\tupletUp \tuplet 3/2 { c8 d e } -\tupletNeutral \tuplet 3/2 { c8 d e } -\tupletDown \tuplet 3/2 { f,8 g a } -\tupletNeutral \tuplet 3/2 { f8 g a } +@lilypond[quote,verbatim] +\relative { + \tupletUp \tuplet 3/2 { c''8 d e } + \tupletNeutral \tuplet 3/2 { c8 d e } + \tupletDown \tuplet 3/2 { f,8 g a } + \tupletNeutral \tuplet 3/2 { f8 g a } +} @end lilypond Tuplets may be nested: -@lilypond[quote,verbatim,relative=2] -\autoBeamOff -c4 \tuplet 5/4 { f8 e f \tuplet 3/2 { e[ f g] } } f4 +@lilypond[quote,verbatim] +\relative { + \autoBeamOff + c''4 \tuplet 5/4 { f8 e f \tuplet 3/2 { e[ f g] } } f4 +} @end lilypond Modifying nested tuplets which begin at the same musical moment must be @@ -335,16 +349,18 @@ the preceding note will include any scaling factor. In the following example, the first three notes take up exactly two beats, but no triplet bracket is printed. -@lilypond[quote,relative=2,verbatim] -\time 2/4 -% Alter durations to triplets -a4*2/3 gis a -% Normal durations -a4 a -% Double the duration of chord -<a d>4*2 -% Duration of quarter, appears like sixteenth -b16*4 c4 +@lilypond[quote,verbatim] +\relative { + \time 2/4 + % Alter durations to triplets + a'4*2/3 gis a + % Normal durations + a4 a + % Double the duration of chord + <a d>4*2 + % Duration of quarter, appears like sixteenth + b16*4 c4 +} @end lilypond The duration of spacer rests may also be modified by @@ -364,17 +380,19 @@ the internal duration of the notes will be multiplied by the fraction @emph{num}/@emph{den}. Here is an example showing how music can be compressed and expanded: -@lilypond[quote,relative=2,verbatim] -\time 2/4 -% Normal durations -<c a>4 c8 a -% Scale music by *2/3 -\scaleDurations 2/3 { - <c a f>4. c8 a f -} -% Scale music by *2 -\scaleDurations 2/1 { - <c' a>4 c8 b +@lilypond[quote,verbatim] +\relative { + \time 2/4 + % Normal durations + <c'' a>4 c8 a + % Scale music by *2/3 + \scaleDurations 2/3 { + <c a f>4. c8 a f + } + % Scale music by *2 + \scaleDurations 2/1 { + <c' a>4 c8 b + } } @end lilypond @@ -419,15 +437,15 @@ A tie is entered by appending a tilde symbol (@code{~}) to the first of each pair of notes being tied. This indicates that the note should be tied to the following note, which must be at the same pitch. -@lilypond[quote,verbatim,relative=2] -a2~ 4~ 16 r r8 +@lilypond[quote,verbatim] +{ a'2~ 4~ 16 r r8 } @end lilypond Ties can make use of the @q{last explicit pitch} interpretation of isolated durations: -@lilypond[quote,verbatim,relative=2] -a2~ 4~ 16 r r8 +@lilypond[quote,verbatim] +{ a'2~ 4~ 16 r r8 } @end lilypond Ties are used either when the note crosses a bar line, or when @@ -454,10 +472,12 @@ match are connected. When no note heads match, no ties will be created. Chords may be partially tied by placing the ties inside the chord. -@lilypond[quote,verbatim,relative=1] -<c e g>2 ~ 2 -<c e g>4~ <c e g c> -<c~ e g~ b> <c e g b> +@lilypond[quote,verbatim] +\relative c' { + <c e g>2~ 2 | + <c e g>4~ <c e g c> + <c~ e g~ b> <c e g b> | +} @end lilypond @cindex repeating ties @@ -471,13 +491,16 @@ the chord. When a second alternative of a repeat starts with a tied note, you have to specify the repeated tie as follows: -@lilypond[quote,relative=2,verbatim] -\repeat volta 2 { c g <c e>2~ } -\alternative { - % First alternative: following note is tied normally - { <c e>2. r4 } - % Second alternative: following note has a repeated tie - { <c e>2\repeatTie d4 c } } +@lilypond[quote,verbatim] +\relative { + \repeat volta 2 { c'' g <c e>2~ } + \alternative { + % First alternative: following note is tied normally + { <c e>2. r4 } + % Second alternative: following note has a repeated tie + { <c e>2\repeatTie d4 c } + } +} @end lilypond @cindex laissez vibrer @@ -491,8 +514,8 @@ notes must not be damped at the end. It is used in notation for piano, harp and other string and percussion instruments. They can be entered as follows: -@lilypond[quote,verbatim,relative=1] -<c f g>1\laissezVibrer +@lilypond[quote,verbatim,fragment] +<c' f' g'>1\laissezVibrer @end lilypond @cindex ties, placement @@ -523,28 +546,32 @@ Ties may be made to curve up or down manually; see Ties may be made dashed, dotted, or a combination of solid and dashed. -@lilypond[quote, verbatim, relative=1] -\tieDotted -c2~ 2 -\tieDashed -c2~ 2 -\tieHalfDashed -c2~ 2 -\tieHalfSolid -c2~ 2 -\tieSolid -c2~ 2 +@lilypond[quote, verbatim] +\relative c' { + \tieDotted + c2~ 2 + \tieDashed + c2~ 2 + \tieHalfDashed + c2~ 2 + \tieHalfSolid + c2~ 2 + \tieSolid + c2~ 2 +} @end lilypond Custom dash patterns can be specified: -@lilypond[quote, verbatim, relative=1] -\tieDashPattern #0.3 #0.75 -c2~ 2 -\tieDashPattern #0.7 #1.5 -c2~ 2 -\tieSolid -c2~ 2 +@lilypond[quote, verbatim] +\relative c' { + \tieDashPattern #0.3 #0.75 + c2~ 2 + \tieDashPattern #0.7 #1.5 + c2~ 2 + \tieSolid + c2~ 2 +} @end lilypond Dash pattern definitions for ties have the same structure as dash @@ -554,16 +581,18 @@ patterns, see @ref{Slurs}. Override @var{whiteout-box} and @var{layer} layout properties of objects that should cause a gap in ties. -@lilypond[verbatim,quote,ragged-right,relative=2] -\override Tie.layer = #-2 -\override Staff.TimeSignature.layer = #-1 -\override Staff.KeySignature.layer = #-1 -\override Staff.TimeSignature.whiteout-box = ##t -\override Staff.KeySignature.whiteout-box = ##t -b2 b~ -\time 3/4 -\key a \major -b r4 +@lilypond[verbatim,quote,ragged-right] +\relative { + \override Tie.layer = #-2 + \override Staff.TimeSignature.layer = #-1 + \override Staff.KeySignature.layer = #-1 + \override Staff.TimeSignature.whiteout = ##t + \override Staff.KeySignature.whiteout = ##t + b'2 b~ + \time 3/4 + \key a \major + b r4 +} @end lilypond @predefined @@ -648,7 +677,7 @@ commands: @c \time 16/1 is used to avoid spurious bar lines @c and long tracts of empty measures -@lilypond[quote,verbatim,relative=2] +@lilypond[quote,verbatim] \new Staff { % These two lines are just to prettify this example \time 16/1 @@ -679,8 +708,8 @@ be placed at the staff position where the note would appear. This allows for precise manual formatting of polyphonic music, since the automatic rest collision formatter will not move these rests. -@lilypond[quote,verbatim,relative=2] -a4\rest d4\rest +@lilypond[quote,verbatim] +\relative { a'4\rest d4\rest } @end lilypond @snippets @@ -726,9 +755,11 @@ are rests from 128th to maxima (8 x whole). An invisible rest (also called a @q{spacer rest}) can be entered like a note with the note name@tie{}@code{s}: -@lilypond[verbatim,quote,relative=2] -c4 c s c -s2 c +@lilypond[verbatim,quote] +\relative c'' { + c4 c s c | + s2 c | +} @end lilypond @cindex lyrics, skip @@ -740,10 +771,10 @@ command @code{\skip} is used to skip a musical moment. the lyrics derive their durations from the notes in an associated melody through @code{\addlyrics} or @code{\lyricsto}. -@lilypond[quote,verbatim,relative=2] +@lilypond[quote,verbatim] << { - a2 \skip2 a2 a2 + a'2 \skip2 a'2 a'2 } \new Lyrics { \lyricmode { @@ -756,14 +787,14 @@ melody through @code{\addlyrics} or @code{\lyricsto}. Because @code{\skip} is a command, it does not affect the default durations of following notes, unlike@tie{}@code{s}. -@lilypond[quote,verbatim,relative=2] +@lilypond[quote,verbatim] << { - \repeat unfold 8 { a4 } + \repeat unfold 8 { a'4 } } { - a4 \skip 2 a | - s2 a + a'4 \skip 2 a' | + s2 a' } >> @end lilypond @@ -773,16 +804,16 @@ A spacer rest implicitly causes @code{Staff} and @code{Voice} contexts to be created if none exist, just like notes and rests do: -@lilypond[quote,verbatim,relative=2] -s1 s s +@lilypond[quote,verbatim] +{ s1 s s } @end lilypond @code{\skip} simply skips musical time; it creates no output of any kind. -@lilypond[quote,verbatim,relative=2] +@lilypond[quote,verbatim] % This is valid input, but does nothing -\skip 1 \skip1 \skip 1 +{ \skip 1 \skip1 \skip 1 } @end lilypond @seealso @@ -817,13 +848,13 @@ Internals Reference: Rests for one or more full measures are entered like notes with the note name uppercase @code{R}: -@lilypond[quote,verbatim,relative=2] +@lilypond[quote,verbatim] % Rest measures contracted to single measure \compressMMRests { R1*4 R1*24 R1*4 - b2^"Tutti" b4 a4 + b'2^"Tutti" b'4 a'4 } @end lilypond @@ -832,7 +863,7 @@ notation used for notes. The duration in a multi-measure rest must always be an integral number of measure-lengths, so augmentation dots or fractions must often be used: -@lilypond[quote,verbatim,relative=2] +@lilypond[quote,verbatim] \compressMMRests { \time 2/4 R1 | R2 | @@ -848,7 +879,7 @@ or fractions must often be used: A full-measure rest is printed as either a whole or breve rest, centered in the measure, depending on the time signature. -@lilypond[quote,verbatim,relative=2] +@lilypond[quote,verbatim,fragment] \time 4/4 R1 | \time 6/4 @@ -865,7 +896,7 @@ show all the rest measures explicitly. Alternatively, a multi-measure rest can be shown as a single measure containing a multi-measure rest symbol, with the number of measures of rest printed above the measure: -@lilypond[quote,verbatim,relative=2] +@lilypond[quote,verbatim,fragment] % Default behavior \time 3/4 r2. | R2.*2 | \time 2/4 R2 | @@ -897,7 +928,7 @@ Markups can be added to multi-measure rests. The predefined command @code{\fermataMarkup} is provided for adding fermatas. -@lilypond[quote,verbatim,relative=2] +@lilypond[quote,verbatim] \compressMMRests { \time 3/4 R2.*10^\markup { \italic "ad lib." } @@ -910,7 +941,7 @@ is provided for adding fermatas. be directed to the correct object, or they will be ignored. See the following example:} -@lilypond[quote,verbatim,relative=2] +@lilypond[quote,verbatim,fragment] % This fails, as the wrong object name is specified \override TextScript.padding = #5 R1^"wrong" @@ -1019,9 +1050,9 @@ Multi-measure rests do not take part in rest collisions. The time signature is set as follows: -@lilypond[quote,verbatim,relative=2] -\time 2/4 c2 -\time 3/4 c2. +@lilypond[quote,verbatim,fragment] +\time 2/4 c''2 +\time 3/4 c''2. @end lilypond Mid-measure time signature changes are covered in @ref{Upbeats}. @@ -1034,14 +1065,16 @@ at the end of a line a warning time signature sign is printed there. This default behavior may be changed, see @ref{Visibility of objects}. -@lilypond[quote,verbatim,relative=2] -\time 2/4 -c2 c -\break -c c -\break -\time 4/4 -c c c c +@lilypond[quote,verbatim] +\relative c'' { + \time 2/4 + c2 c + \break + c c + \break + \time 4/4 + c c c c +} @end lilypond @cindex time signature style @@ -1055,18 +1088,20 @@ c c c c The time signature symbol that is used in 2/2 and 4/4 time can be changed to a numeric style: -@lilypond[quote,verbatim,relative=2] -% Default style -\time 4/4 c1 -\time 2/2 c1 -% Change to numeric style -\numericTimeSignature -\time 4/4 c1 -\time 2/2 c1 -% Revert to default style -\defaultTimeSignature -\time 4/4 c1 -\time 2/2 c1 +@lilypond[quote,verbatim] +\relative c'' { + % Default style + \time 4/4 c1 + \time 2/2 c1 + % Change to numeric style + \numericTimeSignature + \time 4/4 c1 + \time 2/2 c1 + % Revert to default style + \defaultTimeSignature + \time 4/4 c1 + \time 2/2 c1 +} @end lilypond @@ -1261,50 +1296,62 @@ Internals Reference: A basic metronome mark is simple to write: -@lilypond[verbatim,quote,relative=1] -\tempo 4 = 120 -c2 d -e4. d8 c2 +@lilypond[verbatim,quote] +\relative { + \tempo 4 = 120 + c'2 d + e4. d8 c2 +} @end lilypond Metronome marks may also be printed as a range of two numbers: -@lilypond[verbatim,quote,relative=1] -\tempo 4 = 40 - 46 -c4. e8 a4 g -b,2 d4 r +@lilypond[verbatim,quote] +\relative { + \tempo 4 = 40 - 46 + c'4. e8 a4 g + b,2 d4 r +} @end lilypond Tempo indications with text can be used instead: -@lilypond[verbatim,quote,relative=2] -\tempo "Allegretto" -c4 e d c -b4. a16 b c4 r4 +@lilypond[verbatim,quote] +\relative { + \tempo "Allegretto" + c''4 e d c + b4. a16 b c4 r4 +} @end lilypond Combining a metronome mark and text will automatically place the metronome mark within parentheses: -@lilypond[verbatim,quote,relative=2] -\tempo "Allegro" 4 = 160 -g4 c d e -d4 b g2 +@lilypond[verbatim,quote] +\relative { + \tempo "Allegro" 4 = 160 + g'4 c d e + d4 b g2 +} @end lilypond In general, the text can be any markup object: -@lilypond[verbatim,quote,relative=2] -\tempo \markup { \italic Faster } 4 = 132 -a8-. r8 b-. r gis-. r a-. r +@lilypond[verbatim,quote] +\relative { + \tempo \markup { \italic Faster } 4 = 132 + a'8-. r8 b-. r gis-. r a-. r +} @end lilypond A parenthesized metronome mark with no textual indication may be written by including an empty string in the input: -@lilypond[verbatim,quote,relative=2] -\tempo "" 8 = 96 -d4 g e c +@lilypond[verbatim,quote] +\relative { + \tempo "" 8 = 96 + d''4 g e c +} @end lilypond @funindex \markLengthOn @@ -1319,7 +1366,7 @@ to prevent tempo indications from overlapping, and @code{\markLengthOff} restores the default behavior of ignoring tempo marks for horizontal spacing. -@lilypond[verbatim,quote,relative=0] +@lilypond[verbatim,quote] \compressMMRests { \markLengthOn \tempo "Molto vivace" @@ -1391,42 +1438,48 @@ When @code{\partial} is used at the beginning of a score, @code{@var{duration}} is the length of the music preceding the first bar. -@lilypond[quote,verbatim,relative=1] -\time 3/4 -\partial 4. -r4 e8 | a4 c8 b c4 | +@lilypond[quote,verbatim] +\relative { + \time 3/4 + \partial 4. + r4 e'8 | a4 c8 b c4 | +} @end lilypond When @code{\partial} is used after the beginning of a score, @code{@var{duration}} is the @emph{remaining} length of the current measure. It does not create a new numbered bar. -@lilypond[quote,verbatim,relative=1] -\set Score.barNumberVisibility = #all-bar-numbers-visible -\override Score.BarNumber.break-visibility = - #end-of-line-invisible -\time 9/8 -d'4.~ 4 d8 d( c) b | c4.~ 4. \bar "||" -\time 12/8 -\partial 4. -c8( d) e | f2.~ 4 f8 a,( c) f | +@lilypond[quote,verbatim] +\relative { + \set Score.barNumberVisibility = #all-bar-numbers-visible + \override Score.BarNumber.break-visibility = + #end-of-line-invisible + \time 9/8 + d''4.~ 4 d8 d( c) b | c4.~ 4. \bar "||" + \time 12/8 + \partial 4. + c8( d) e | f2.~ 4 f8 a,( c) f | +} @end lilypond The @code{\partial} command is @emph{required} when the time signature changes in mid measure, but it may also be used alone. -@lilypond[quote,verbatim,relative=1] -\set Score.barNumberVisibility = #all-bar-numbers-visible -\override Score.BarNumber.break-visibility = - #end-of-line-invisible -\time 6/8 -\partial 8 -e8 | a4 c8 b[ c b] | -\partial 4 -r8 e,8 | a4 \bar "||" -\partial 4 -r8 e8 | a4 -c8 b[ c b] | +@lilypond[quote,verbatim] +\relative { + \set Score.barNumberVisibility = #all-bar-numbers-visible + \override Score.BarNumber.break-visibility = + #end-of-line-invisible + \time 6/8 + \partial 8 + e'8 | a4 c8 b[ c b] | + \partial 4 + r8 e,8 | a4 \bar "||" + \partial 4 + r8 e8 | a4 + c8 b[ c b] | +} @end lilypond The @code{\partial} command sets the @code{Timing.measurePosition} @@ -1480,26 +1533,30 @@ desirable and can be @q{switched off} using the command @code{\cadenzaOn}, then @q{switched back on} at the appropriate place using @code{\cadenzaOff}. -@lilypond[verbatim,relative=2,quote] -c4 d e d -\cadenzaOn -c4 c d8[ d d] f4 g4. -\cadenzaOff -\bar "|" -d4 e d c +@lilypond[verbatim,quote] +\relative c'' { + c4 d e d + \cadenzaOn + c4 c d8[ d d] f4 g4. + \cadenzaOff + \bar "|" + d4 e d c +} @end lilypond Bar numbering is resumed at the end of the cadenza. -@lilypond[verbatim,relative=2,quote] -% Show all bar numbers -\override Score.BarNumber.break-visibility = #all-visible -c4 d e d -\cadenzaOn -c4 c d8[ d d] f4 g4. -\cadenzaOff -\bar "|" -d4 e d c +@lilypond[verbatim,quote] +\relative c'' { + % Show all bar numbers + \override Score.BarNumber.break-visibility = #all-visible + c4 d e d + \cadenzaOn + c4 c d8[ d d] f4 g4. + \cadenzaOff + \bar "|" + d4 e d c +} @end lilypond Inserting a @code{\bar} command within a cadenza does not start a new @@ -1510,28 +1567,32 @@ subsequent accidentals should be printed, forced accidentals or reminder accidentals need to be inserted manually, see @ref{Accidentals}. -@lilypond[verbatim,relative=2,quote] -c4 d e d -\cadenzaOn -cis4 d cis d -\bar "|" -% First cis is printed without alteration even if it's after a \bar -cis4 d cis! d -\cadenzaOff -\bar "|" +@lilypond[verbatim,quote] +\relative c'' { + c4 d e d + \cadenzaOn + cis4 d cis d + \bar "|" + % First cis is printed without alteration even if it's after a \bar + cis4 d cis! d + \cadenzaOff + \bar "|" +} @end lilypond Automatic beaming is disabled by @code{\cadenzaOn}. Therefore, all beaming in cadenzas must be entered manually. See @ref{Manual beams}. -@lilypond[verbatim,relative=2,quote] -\repeat unfold 8 { c8 } -\cadenzaOn -cis8 c c c c -\bar"|" -c8 c c -\cadenzaOff -\repeat unfold 8 { c8 } +@lilypond[verbatim,quote] +\relative { + \repeat unfold 8 { c''8 } + \cadenzaOn + cis8 c c c c + \bar"|" + c8 c c + \cadenzaOff + \repeat unfold 8 { c8 } +} @end lilypond These predefined commands affect all staves in the score, even when @@ -1773,15 +1834,16 @@ overrun bar lines are split automatically by replacing the following example, notes and rests crossing the bar lines are split, notes are also tied. -@lilypond[quote,verbatim,relative=1] +@lilypond[quote,verbatim] \new Voice \with { \remove "Note_heads_engraver" \consists "Completion_heads_engraver" \remove "Rest_engraver" \consists "Completion_rest_engraver" } - -{ c2. c8 d4 e f g a b c8 c2 b4 a g16 f4 e d c8. c2 r1*2 } +\relative { + c'2. c8 d4 e f g a b c8 c2 b4 a g16 f4 e d c8. c2 r1*2 +} @end lilypond These engravers split all running notes and rests at the bar line, and @@ -1792,12 +1854,12 @@ much each measure is off. The property @code{completionUnit} sets a preferred duration for the split notes. -@lilypond[quote,verbatim,relative=2] +@lilypond[quote,verbatim] \new Voice \with { \remove "Note_heads_engraver" \consists "Completion_heads_engraver" -} { - \time 9/8 g\breve. d4. \bar "||" +} \relative { + \time 9/8 g\breve. d''4. \bar "||" \set completionUnit = #(ly:make-moment 3 8) g\breve. d4. } @@ -1806,13 +1868,13 @@ the split notes. These engravers split notes with scaled duration, such as those in tuplets, into notes with the same scale-factor as in the input note. -@lilypond[quote,verbatim,relative=2] +@lilypond[quote,verbatim] \new Voice \with { \remove "Note_heads_engraver" \consists "Completion_heads_engraver" -} { +} \relative { \time 2/4 r4 - \tuplet 3/2 {g4 a b} + \tuplet 3/2 {g'4 a b} \scaleDurations 2/3 {g a b} g4*2/3 a b \tuplet 3/2 {g4 a b} @@ -1857,12 +1919,12 @@ Sometimes you might want to show only the rhythm of a melody. This can be done with the rhythmic staff. All pitches of notes on such a staff are squashed, and the staff itself has a single line -@lilypond[quote,relative=1,verbatim] +@lilypond[quote,verbatim] << \new RhythmicStaff { - \new Voice = "myRhythm" { + \new Voice = "myRhythm" \relative { \time 4/4 - c4 e8 f g2 + c'4 e8 f g2 r4 g g f g1 } @@ -1955,9 +2017,11 @@ By default, beams are inserted automatically: @funindex \autoBeamOff @funindex autoBeamOff -@lilypond[quote,verbatim,relative=2] -\time 2/4 c8 c c c -\time 6/8 c8 c c c8. c16 c8 +@lilypond[quote,verbatim] +\relative c'' { + \time 2/4 c8 c c c + \time 6/8 c8 c c c8. c16 c8 +} @end lilypond If these automatic decisions are not satisfactory, beaming can be @@ -1967,12 +2031,14 @@ entered manually if beams are to be extended over rests. If automatic beaming is not required, it may be turned off with @code{\autoBeamOff} and on with @code{\autoBeamOn}: -@lilypond[quote,relative=1,verbatim] -c4 c8 c8. c16 c8. c16 c8 -\autoBeamOff -c4 c8 c8. c16 c8. -\autoBeamOn -c16 c8 +@lilypond[quote,verbatim] +\relative c' { + c4 c8 c8. c16 c8. c16 c8 + \autoBeamOff + c4 c8 c8. c16 c8. + \autoBeamOn + c16 c8 +} @end lilypond @cindex melismata, with beams @@ -2101,34 +2167,38 @@ signature section, not before it. New values given to a particular time signature are retained and reinstated whenever that time signature is re-established. -@lilypond[quote,relative=2,verbatim] -\time 5/16 -c16^"default" c c c c | -% beamExceptions are unlikely to be defined for 5/16 time, -% but let's disable them anyway to be sure -\set Timing.beamExceptions = #'() -\set Timing.beatStructure = #'(2 3) -c16^"(2+3)" c c c c | -\set Timing.beatStructure = #'(3 2) -c16^"(3+2)" c c c c | +@lilypond[quote,verbatim] +\relative c'' { + \time 5/16 + c16^"default" c c c c | + % beamExceptions are unlikely to be defined for 5/16 time, + % but let's disable them anyway to be sure + \set Timing.beamExceptions = #'() + \set Timing.beatStructure = #'(2 3) + c16^"(2+3)" c c c c | + \set Timing.beatStructure = #'(3 2) + c16^"(3+2)" c c c c | +} @end lilypond -@lilypond[quote,relative=2,verbatim] -\time 4/4 -a8^"default" a a a a a a a -% Disable beamExceptions because they are definitely -% defined for 4/4 time -\set Timing.beamExceptions = #'() -\set Timing.baseMoment = #(ly:make-moment 1/4) -\set Timing.beatStructure = #'(1 1 1 1) -a8^"changed" a a a a a a a +@lilypond[quote,verbatim] +\relative { + \time 4/4 + a'8^"default" a a a a a a a + % Disable beamExceptions because they are definitely + % defined for 4/4 time + \set Timing.beamExceptions = #'() + \set Timing.baseMoment = #(ly:make-moment 1/4) + \set Timing.beatStructure = #'(1 1 1 1) + a8^"changed" a a a a a a a +} @end lilypond Beam setting changes can be limited to specific contexts. If no setting is included in a lower-level context, the setting of the enclosing context will apply. -@lilypond[quote, verbatim,relative=1] +@lilypond[quote, verbatim] \new Staff { \time 7/8 % No need to disable beamExceptions @@ -2155,18 +2225,18 @@ When multiple voices are used the @code{Staff} context must be specified if the beaming is to be applied to all voices in the staff: -@lilypond[quote,verbatim,relative=2] +@lilypond[quote,verbatim,fragment] \time 7/8 % rhythm 3-1-1-2 % Change applied to Voice by default -- does not work correctly % Because of autogenerated voices, all beating will % be at baseMoment (1 . 8) \set beatStructure = #'(3 1 1 2) -<< {a8 a a a16 a a a a8 a} \\ {f4. f8 f f f} >> +<< \relative {a'8 a a a16 a a a a8 a} \\ \relative {f'4. f8 f f f} >> % Works correctly with context Staff specified \set Staff.beatStructure = #'(3 1 1 2) -<< {a8 a a a16 a a a a8 a} \\ {f4. f8 f f f} >> +<< \relative {a'8 a a a16 a a a a8 a} \\ \relative {f'4. f8 f f f} >> @end lilypond The value of @code{baseMoment} can be adjusted to change @@ -2174,13 +2244,13 @@ the beaming behavior, if desired. When this is done, the value of @code{beatStructure} must be set to be compatible with the new value of @code{baseMoment}. -@lilypond[quote,verbatim,relative=2] +@lilypond[quote,verbatim,fragment] \time 5/8 % No need to disable beamExceptions % as they are not defined for 5/8 time \set Timing.baseMoment = #(ly:make-moment 1/16) \set Timing.beatStructure = #'(7 3) -\repeat unfold 10 { a16 } +\repeat unfold 10 { a'16 } @end lilypond @code{baseMoment} is a @i{moment}; a unit of musical duration. A @@ -2205,13 +2275,15 @@ have to be separated by a bar check@tie{}@code{|} since the function has no other way to discern the measure length). Here is a simple example: -@lilypond[quote,relative=2,verbatim] -\time 3/16 -\set Timing.beatStructure = #'(2 1) -\set Timing.beamExceptions = - \beamExceptions { 32[ 32] 32[ 32] 32[ 32] } -c16 c c | -\repeat unfold 6 { c32 } | +@lilypond[quote,verbatim] +\relative c'' { + \time 3/16 + \set Timing.beatStructure = #'(2 1) + \set Timing.beamExceptions = + \beamExceptions { 32[ 32] 32[ 32] 32[ 32] } + c16 c c | + \repeat unfold 6 { c32 } | +} @end lilypond @warning{A @code{beamExceptions} value must be @emph{complete} @@ -2227,15 +2299,17 @@ and @code{Timing.beamExceptions} are set. Setting the time signature will reset the automatic beaming settings for the @code{Timing} context to the default behavior. -@lilypond[quote,verbatim,relative=2] -\time 6/8 -\repeat unfold 6 { a8 } -% group (4 + 2) -\set Timing.beatStructure = #'(4 2) -\repeat unfold 6 { a8 } -% go back to default behavior -\time 6/8 -\repeat unfold 6 { a8 } +@lilypond[quote,verbatim] +\relative a' { + \time 6/8 + \repeat unfold 6 { a8 } + % group (4 + 2) + \set Timing.beatStructure = #'(4 2) + \repeat unfold 6 { a8 } + % go back to default behavior + \time 6/8 + \repeat unfold 6 { a8 } +} @end lilypond The default automatic beaming settings for a time signature @@ -2249,28 +2323,28 @@ beam the measure in two if there are only eighth notes. The @code{beamExceptions} rule can override the @code{beatStructure} setting if @code{beamExceptions} is not reset. -@lilypond[quote,verbatim,relative=2] +@lilypond[quote,verbatim,fragment] \time 4/4 \set Timing.baseMoment = #(ly:make-moment 1/8) \set Timing.beatStructure = #'(3 3 2) % This won't beam (3 3 2) because of beamExceptions -\repeat unfold 8 {c8} | +\repeat unfold 8 {c''8} | % This will beam (3 3 2) because we clear beamExceptions \set Timing.beamExceptions = #'() -\repeat unfold 8 {c8} +\repeat unfold 8 {c''8} @end lilypond In a similar fashion, eighth notes in 3/4 time are beamed as a full measure by default. To beam eighth notes in 3/4 time on the beat, reset @code{beamExceptions}. -@lilypond[quote,verbatim,relative=2] +@lilypond[quote,verbatim,fragment] \time 3/4 % by default we beam in (6) due to beamExceptions -\repeat unfold 6 {a8} | +\repeat unfold 6 {a'8} | % This will beam (1 1 1) due to default baseMoment and beatStructure \set Timing.beamExceptions = #'() -\repeat unfold 6 {a8} +\repeat unfold 6 {a'8} @end lilypond In engraving from the Romantic and Classical periods, @@ -2280,11 +2354,13 @@ but modern practice is to avoid the false impression of 6/8 time This behavior is controlled by the context property @code{beamHalfMeasure}, which has effect only in time signatures with 3 in the numerator: -@lilypond[quote,verbatim,relative=2] -\time 3/4 -r4. a8 a a | -\set Timing.beamHalfMeasure = ##f -r4. a8 a a | +@lilypond[quote,verbatim] +\relative a' { + \time 3/4 + r4. a8 a a | + \set Timing.beamHalfMeasure = ##f + r4. a8 a a | +} @end lilypond @subsubsubheading How automatic beaming works @@ -2383,17 +2459,17 @@ beaming that was set in an earlier staff. One way to avoid this problem is to set the time signature in only one staff. -@lilypond[quote,verbatim,relative=2] +@lilypond[quote,verbatim] << \new Staff { \time 3/4 \set Timing.baseMoment = #(ly:make-moment 1/8) \set Timing.beatStructure = #'(1 5) \set Timing.beamExceptions = #'() - \repeat unfold 6 { a8 } + \repeat unfold 6 { a'8 } } \new Staff { - \repeat unfold 6 { a8 } + \repeat unfold 6 { a'8 } } >> @end lilypond @@ -2403,7 +2479,7 @@ that the desired beaming will always be used. Changes in automatic beaming settings for a time signature are described in @ref{Time signature}. -@lilypond[quote,verbatim,relative=2] +@lilypond[quote,verbatim] << \new Staff { \overrideTimeSignatureSettings @@ -2412,11 +2488,11 @@ beaming settings for a time signature are described in #'(1 5) % beatStructure #'() % beamExceptions \time 3/4 - \repeat unfold 6 { a8 } + \repeat unfold 6 { a'8 } } \new Staff { \time 3/4 - \repeat unfold 6 { a8 } + \repeat unfold 6 { a'8 } } >> @end lilypond @@ -2438,8 +2514,8 @@ often set to follow the meter of the lyrics rather than the notes. Such beams can be specified manually by marking the begin and end point with @code{[} and @code{]}. -@lilypond[quote,relative=1,verbatim] -r4 r8[ g' a r] r g[ | a] r +@lilypond[quote,verbatim] +\relative { r4 r8[ g' a r] r g[ | a] r } @end lilypond @cindex manual beams, direction shorthand for @@ -2447,8 +2523,8 @@ r4 r8[ g' a r] r g[ | a] r Beaming direction can be set manually using direction indicators: -@lilypond[quote,relative=2,verbatim] -c8^[ d e] c,_[ d e f g] +@lilypond[quote,verbatim] +\relative { c''8^[ d e] c,_[ d e f g] } @end lilypond @funindex \noBeam @@ -2457,20 +2533,24 @@ c8^[ d e] c,_[ d e f g] Individual notes may be marked with @code{\noBeam} to prevent them from being beamed: -@lilypond[quote,verbatim,relative=2] -\time 2/4 -c8 c\noBeam c c +@lilypond[quote,verbatim] +\relative { + \time 2/4 + c''8 c\noBeam c c +} @end lilypond Grace note beams and normal note beams can occur simultaneously. Unbeamed grace notes are not put into normal note beams. -@lilypond[quote,verbatim,relative=2] -c4 d8[ -\grace { e32 d c d } -e8] e[ e -\grace { f16 } -e8 e] +@lilypond[quote,verbatim] +\relative { + c''4 d8[ + \grace { e32 d c d } + e8] e[ e + \grace { f16 } + e8 e] +} @end lilypond @funindex stemLeftBeamCount @@ -2485,14 +2565,16 @@ then it is erased. In this example, the last @code{f} is printed with only one beam on the left side, i.e., the eighth-note beam of the group as a whole. -@lilypond[quote,relative=2,verbatim] -a8[ r16 f g a] -a8[ r16 -\set stemLeftBeamCount = #2 -\set stemRightBeamCount = #1 -f16 -\set stemLeftBeamCount = #1 -g16 a] +@lilypond[quote,verbatim] +\relative a' { + a8[ r16 f g a] + a8[ r16 + \set stemLeftBeamCount = #2 + \set stemRightBeamCount = #1 + f16 + \set stemLeftBeamCount = #1 + g16 a] +} @end lilypond @@ -2557,16 +2639,18 @@ as the last one, with the intermediate notes gradually lengthening. The first four 32nd notes gradually speed up, while the last four 32nd notes are at a constant tempo. -@lilypond[relative=1,verbatim,quote] -\override Beam.grow-direction = #LEFT -\featherDurations #(ly:make-moment 2/1) -{ c16[ c c c c c c c] } -\override Beam.grow-direction = #RIGHT -\featherDurations #(ly:make-moment 2/3) -{ c32[ d e f] } -% revert to non-feathered beams -\override Beam.grow-direction = #'() -{ g32[ a b c] } +@lilypond[verbatim,quote] +\relative c' { + \override Beam.grow-direction = #LEFT + \featherDurations #(ly:make-moment 2/1) + { c16[ c c c c c c c] } + \override Beam.grow-direction = #RIGHT + \featherDurations #(ly:make-moment 2/3) + { c32[ d e f] } + % revert to non-feathered beams + \override Beam.grow-direction = #'() + { g32[ a b c] } +} @end lilypond @noindent @@ -2619,8 +2703,8 @@ The simple bar lines inserted automatically can be changed to other types with the @code{\bar} command. For example, a closing double bar line is usually placed at the end of a piece: -@lilypond[quote,relative=1,verbatim] -e4 d c2 \bar "|." +@lilypond[quote,verbatim] +\relative { e'4 d c2 \bar "|." } @end lilypond It is not invalid if the final note in a measure does not @@ -2675,45 +2759,51 @@ exists, the effects of the original bar line are not altered. Two types of simple bar lines and five types of double bar lines are available for manual insertion: -@lilypond[quote,relative=1,verbatim] -f1 \bar "|" -f1 \bar "." -g1 \bar "||" -a1 \bar ".|" -b1 \bar ".." -c1 \bar "|.|" -d1 \bar "|." -e1 +@lilypond[quote,verbatim] +\relative { + f'1 \bar "|" + f1 \bar "." + g1 \bar "||" + a1 \bar ".|" + b1 \bar ".." + c1 \bar "|.|" + d1 \bar "|." + e1 +} @end lilypond @noindent together with dotted and dashed bar lines: -@lilypond[quote,relative=1,verbatim] -f1 \bar ";" -g1 \bar "!" -a1 +@lilypond[quote,verbatim] +\relative { + f'1 \bar ";" + g1 \bar "!" + a1 +} @end lilypond @noindent and nine types of repeat bar lines: -@lilypond[quote,relative=1,verbatim] -f1 \bar ".|:" -g1 \bar ":..:" -a1 \bar ":|.|:" -b1 \bar ":|.:" -c1 \bar ":.|.:" -d1 \bar "[|:" -e1 \bar ":|][|:" -f1 \bar ":|]" -g1 \bar ":|." -a1 +@lilypond[quote,verbatim] +\relative { + f'1 \bar ".|:" + g1 \bar ":..:" + a1 \bar ":|.|:" + b1 \bar ":|.:" + c1 \bar ":.|.:" + d1 \bar "[|:" + e1 \bar ":|][|:" + f1 \bar ":|]" + g1 \bar ":|." + a1 +} @end lilypond Additionally, a bar line can be printed as a simple tick: -@lilypond[quote,relative=1,verbatim] -f1 \bar "'" g1 +@lilypond[quote,fragment,verbatim] +f'1 \bar "'" g'1 @end lilypond However, as such ticks are typically used in Gregorian chant, it is preferable to use @code{\divisioMinima} there instead, described in @@ -2721,8 +2811,8 @@ the section @ref{Divisiones} in Gregorian chant. Lilypond supports kievan notation and provides a special kievan bar line: -@lilypond[quote,relative=1,verbatim] -f1 \bar "k" +@lilypond[quote,fragment,verbatim] +f'1 \bar "k" @end lilypond Further details of this notation are explained in @ref{Typesetting Kievan square notation}. @@ -2732,20 +2822,22 @@ Further details of this notation are explained in For in-line segno signs, there are three types of bar lines which differ in their behavior at line breaks: -@lilypond[quote,relative=2,verbatim] -c4 c c c -\bar "S" -c4 c c c \break -\bar "S" -c4 c c c -\bar "S-|" -c4 c c c \break -\bar "S-|" -c4 c c c -\bar "S-S" -c4 c c c \break -\bar "S-S" -c1 +@lilypond[quote,verbatim] +\relative c'' { + c4 c c c + \bar "S" + c4 c c c \break + \bar "S" + c4 c c c + \bar "S-|" + c4 c c c \break + \bar "S-|" + c4 c c c + \bar "S-S" + c4 c c c \break + \bar "S-S" + c1 +} @end lilypond @cindex repeats @@ -2761,43 +2853,47 @@ In addition, you can specify @code{".|:-||"}, which is equivalent to line at the end of the line and a start repeat at the beginning of the next line. -@lilypond[quote,relative=2,verbatim] -c4 c c c -\bar ".|:-||" -c4 c c c \break -\bar ".|:-||" -c4 c c c +@lilypond[quote,verbatim] +\relative c'' { + c4 c c c + \bar ".|:-||" + c4 c c c \break + \bar ".|:-||" + c4 c c c +} @end lilypond For combinations of repeats with the segno sign, there are six different variations: -@lilypond[quote,relative=2,verbatim] -c4 c c c -\bar ":|.S" -c4 c c c \break -\bar ":|.S" -c4 c c c -\bar ":|.S-S" -c4 c c c \break -\bar ":|.S-S" -c4 c c c -\bar "S.|:-S" -c4 c c c \break -\bar "S.|:-S" -c4 c c c -\bar "S.|:" -c4 c c c \break -\bar "S.|:" -c4 c c c -\bar ":|.S.|:" -c4 c c c \break -\bar ":|.S.|:" -c4 c c c -\bar ":|.S.|:-S" -c4 c c c \break -\bar ":|.S.|:-S" -c1 +@lilypond[quote,verbatim] +\relative c'' { + c4 c c c + \bar ":|.S" + c4 c c c \break + \bar ":|.S" + c4 c c c + \bar ":|.S-S" + c4 c c c \break + \bar ":|.S-S" + c4 c c c + \bar "S.|:-S" + c4 c c c \break + \bar "S.|:-S" + c4 c c c + \bar "S.|:" + c4 c c c \break + \bar "S.|:" + c4 c c c + \bar ":|.S.|:" + c4 c c c \break + \bar ":|.S.|:" + c4 c c c + \bar ":|.S.|:-S" + c4 c c c \break + \bar ":|.S.|:-S" + c1 +} @end lilypond Additionally there is an @code{\inStaffSegno} command which creates @@ -2858,16 +2954,16 @@ but different behavior at line breaks and/or different span bars. The part following the @code{"-"} sign is not used for building up the bar line. -@lilypond[quote,relative=2,verbatim] +@lilypond[quote,verbatim] \defineBarLine "||-dashedSpan" #'("||" "" "!!") \new StaffGroup << - \new Staff { + \new Staff \relative c'' { c1 \bar "||" c1 \bar "||-dashedSpan" c1 } - \new Staff { + \new Staff \relative c'' { c1 c1 c1 @@ -2878,17 +2974,17 @@ the bar line. Furthermore, the space character @code{" "} serves as a placeholder for defining span bars correctly aligned to the main bar lines: -@lilypond[quote,relative=2,verbatim] +@lilypond[quote,verbatim] \defineBarLine ":|.-wrong" #'(":|." "" "|.") \defineBarLine ":|.-right" #'(":|." "" " |.") \new StaffGroup << - \new Staff { + \new Staff \relative c'' { c1 \bar ":|.-wrong" c1 \bar ":|.-right" c1 } - \new Staff { + \new Staff \relative c'' { c1 c1 c1 @@ -2905,17 +3001,17 @@ automatically applied to all staves. The resulting bar lines are connected between different staves of a @code{StaffGroup}, @code{PianoStaff}, or @code{GrandStaff}. -@lilypond[quote,relative=1,verbatim] +@lilypond[quote,verbatim] << \new StaffGroup << - \new Staff { - e4 d + \new Staff \relative { + e'4 d \bar "||" f4 e } - \new Staff { \clef bass c4 g e g } + \new Staff \relative { \clef bass c'4 g e g } >> - \new Staff { \clef bass c2 c2 } + \new Staff \relative { \clef bass c'2 c2 } >> @end lilypond @@ -2970,11 +3066,13 @@ the first line. The number itself is stored in the @code{currentBarNumber} property, which is normally updated automatically for every measure. It may also be set manually: -@lilypond[verbatim,quote,relative=1] -c1 c c c -\break -\set Score.currentBarNumber = #50 -c1 c c c +@lilypond[verbatim,quote] +\relative c' { + c1 c c c + \break + \set Score.currentBarNumber = #50 + c1 c c c +} @end lilypond @cindex bar numbers, regular spacing @@ -2993,14 +3091,16 @@ of the three values is @code{end of line visible}, @code{middle of line visible}, @code{beginning of line visible}. In the following example bar numbers are printed at all possible places: -@lilypond[verbatim,quote,relative=1] -\override Score.BarNumber.break-visibility = ##(#t #t #t) -\set Score.currentBarNumber = #11 -% Permit first bar number to be printed -\bar "" -c1 | c | c | c -\break -c1 | c | c | c +@lilypond[verbatim,quote] +\relative c' { + \override Score.BarNumber.break-visibility = ##(#t #t #t) + \set Score.currentBarNumber = #11 + % Permit first bar number to be printed + \bar "" + c1 | c | c | c | + \break + c1 | c | c | c | +} @end lilypond @snippets @@ -3149,11 +3249,13 @@ Snippets: To print a rehearsal mark, use the @code{\mark} command. -@lilypond[quote,verbatim,relative=2] -c1 \mark \default -c1 \mark \default -c1 \mark \default -c1 \mark \default +@lilypond[quote,verbatim] +\relative c'' { + c1 \mark \default + c1 \mark \default + c1 \mark \default + c1 \mark \default +} @end lilypond @noindent @@ -3162,12 +3264,14 @@ The mark is incremented automatically if you use @code{\mark mark manually. The value to use is stored in the property @code{rehearsalMark}. -@lilypond[quote,verbatim,relative=2] -c1 \mark \default -c1 \mark \default -c1 \mark #8 -c1 \mark \default -c1 \mark \default +@lilypond[quote,verbatim] +\relative c'' { + c1 \mark \default + c1 \mark \default + c1 \mark #8 + c1 \mark \default + c1 \mark \default +} @end lilypond @noindent @@ -3183,13 +3287,15 @@ hollow circle). \set Score.markFormatter = #format-mark-circle-alphabet @end example -@lilypond[quote,verbatim,relative=2] -\set Score.markFormatter = #format-mark-box-alphabet -c1 \mark \default -c1 \mark \default -c1 \mark #8 -c1 \mark \default -c1 \mark \default +@lilypond[quote,verbatim] +\relative c'' { + \set Score.markFormatter = #format-mark-box-alphabet + c1 \mark \default + c1 \mark \default + c1 \mark #8 + c1 \mark \default + c1 \mark \default +} @end lilypond @cindex rehearsal mark format @@ -3210,16 +3316,18 @@ following example, @code{markFormatter} is set to a pre-defined procedure. After a few measures, it is set to a procedure that produces a boxed number. -@lilypond[quote,verbatim,relative=2] -\set Score.markFormatter = #format-mark-numbers -c1 \mark \default -c1 \mark \default -\set Score.markFormatter = #format-mark-box-numbers -c1 \mark \default -\set Score.markFormatter = #format-mark-circle-numbers -c1 \mark \default -\set Score.markFormatter = #format-mark-circle-letters -c1 +@lilypond[quote,verbatim] +\relative c'' { + \set Score.markFormatter = #format-mark-numbers + c1 \mark \default + c1 \mark \default + \set Score.markFormatter = #format-mark-box-numbers + c1 \mark \default + \set Score.markFormatter = #format-mark-circle-numbers + c1 \mark \default + \set Score.markFormatter = #format-mark-circle-letters + c1 +} @end lilypond The file @file{scm/translation-functions.scm} contains the @@ -3261,11 +3369,13 @@ string. Music glyphs (such as the segno sign) may be printed inside a @code{\mark} -@lilypond[quote,verbatim,relative=1] -c1 \mark \markup { \musicglyph #"scripts.segno" } -c1 \mark \markup { \musicglyph #"scripts.coda" } -c1 \mark \markup { \musicglyph #"scripts.ufermata" } -c1 +@lilypond[quote,verbatim] +\relative c' { + c1 \mark \markup { \musicglyph #"scripts.segno" } + c1 \mark \markup { \musicglyph #"scripts.coda" } + c1 \mark \markup { \musicglyph #"scripts.ufermata" } + c1 +} @end lilypond @noindent @@ -3325,9 +3435,11 @@ Internals Reference: Grace notes are musical ornaments, printed in a smaller font, that take up no additional logical time in a measure. -@lilypond[quote,relative=2,verbatim] -c4 \grace b16 a4( -\grace { b16 c16 } a2) +@lilypond[quote,verbatim] +\relative { + c''4 \grace b16 a4( + \grace { b16 c16 } a2) +} @end lilypond There are three other types of grace notes possible; the @@ -3339,23 +3451,25 @@ like the @emph{acciaccatura} but without the slur, so as to place it between notes that are slurred themselves, using the @code{\slashedGrace} function. -@lilypond[quote,relative=2,verbatim] -\acciaccatura d8 c4 -\appoggiatura e8 d4 -\acciaccatura { g16 f } e2 -\slashedGrace a,8 g4 -\slashedGrace b16 a4( -\slashedGrace b8 a2) +@lilypond[quote,verbatim] +\relative { + \acciaccatura d''8 c4 + \appoggiatura e8 d4 + \acciaccatura { g16 f } e2 + \slashedGrace a,8 g4 + \slashedGrace b16 a4( + \slashedGrace b8 a2) +} @end lilypond The placement of grace notes is synchronized between different staves. In the following example, there are two sixteenth grace notes for every eighth grace note -@lilypond[quote,relative=2,verbatim] +@lilypond[quote,verbatim] << - \new Staff { e2 \grace { c16 d e f } e2 } - \new Staff { c2 \grace { g8 b } c2 } + \new Staff \relative { e''2 \grace { c16 d e f } e2 } + \new Staff \relative { c''2 \grace { g8 b } c2 } >> @end lilypond @@ -3368,8 +3482,8 @@ If you want to end a note with a grace, use the @code{\afterGrace} command. It takes two arguments: the main note, and the grace notes following the main note. -@lilypond[quote,verbatim,relative=2] -c1 \afterGrace d1 { c16[ d] } c1 +@lilypond[quote,verbatim] +\relative { c''1 \afterGrace d1 { c16[ d] } c1 } @end lilypond This will put the grace notes after a space lasting 3/4 of the @@ -3378,18 +3492,18 @@ setting @code{afterGraceFraction}. The following example shows the results from setting the space at the default, at 15/16, and finally at 1/2 of the main note. -@lilypond[quote,verbatim,relative=2] +@lilypond[quote,verbatim] << - \new Staff { - c1 \afterGrace d1 { c16[ d] } c1 + \new Staff \relative { + c''1 \afterGrace d1 { c16[ d] } c1 } - \new Staff { + \new Staff \relative { #(define afterGraceFraction (cons 15 16)) - c1 \afterGrace d1 { c16[ d] } c1 + c''1 \afterGrace d1 { c16[ d] } c1 } - \new Staff { + \new Staff \relative { #(define afterGraceFraction (cons 1 2)) - c1 \afterGrace d1 { c16[ d] } c1 + c''1 \afterGrace d1 { c16[ d] } c1 } >> @end lilypond @@ -3398,10 +3512,10 @@ The space between the main note and the grace note may also be specified using spacers. The following example places the grace note after a space lasting 7/8 of the main note. -@lilypond[quote,verbatim,relative=2] -\new Voice { +@lilypond[quote,verbatim] +\new Voice \relative { << - { d1^\trill_( } + { d''1^\trill_( } { s2 s4. \grace { c16 d } } >> c1) @@ -3420,11 +3534,11 @@ the grace expression. The overrides should also be reverted inside the grace expression. Here, the grace note's default stem direction is overridden and then reverted. -@lilypond[quote,verbatim,relative=2] -\new Voice { +@lilypond[quote,verbatim] +\new Voice \relative { \acciaccatura { \stemDown - f16-> + f''16-> \stemNeutral } g4 e c2 @@ -3489,10 +3603,10 @@ notation, such as key signatures, bar lines, etc., are also synchronized. Take care when you mix staves with grace notes and staves without, for example, -@lilypond[quote,relative=2,verbatim] +@lilypond[quote,verbatim] << - \new Staff { e4 \bar ".|:" \grace c16 d2. } - \new Staff { c4 \bar ".|:" d2. } + \new Staff \relative { e''4 \bar ".|:" \grace c16 d2. } + \new Staff \relative { c''4 \bar ".|:" d2. } >> @end lilypond @@ -3500,10 +3614,10 @@ staves without, for example, This can be remedied by inserting grace skips of the corresponding durations in the other staves. For the above example -@lilypond[quote,relative=2,verbatim] +@lilypond[quote,verbatim] << - \new Staff { e4 \bar ".|:" \grace c16 d2. } - \new Staff { c4 \bar ".|:" \grace s16 d2. } + \new Staff \relative { e''4 \bar ".|:" \grace c16 d2. } + \new Staff \relative { c''4 \bar ".|:" \grace s16 d2. } >> @end lilypond diff --git a/Documentation/notation/simultaneous.itely b/Documentation/notation/simultaneous.itely index 033cd1692f..8caaaff7e1 100644 --- a/Documentation/notation/simultaneous.itely +++ b/Documentation/notation/simultaneous.itely @@ -52,32 +52,40 @@ A chord is formed by enclosing a set of pitches between @code{<} and @code{>}. A chord may be followed by a duration just like simple notes. -@lilypond[verbatim,quote,relative=2] -<a c e>1 <a c e>2 <f a c e>4 <a c>8. <g c e>16 +@lilypond[verbatim,quote] +\relative { + <a' c e>1 <a c e>2 <f a c e>4 <a c>8. <g c e>16 +} @end lilypond Chords may also be followed by articulations, again just like simple notes. -@lilypond[verbatim,quote,relative=2] -<a c e>1\fermata <a c e>2-> <f a c e>4\prall <a c>8.^! <g c e>16-. +@lilypond[verbatim,quote] +\relative { + <a' c e>1\fermata <a c e>2-> <f a c e>4\prall <a c>8.^! <g c e>16-. +} @end lilypond The notes within the chord themselves can also be followed by articulation and ornamentation. -@lilypond[verbatim,quote,relative=2] -<a c\prall e>1 <a-> c-^ e>2 <f-. a c-. e-.>4 -<a-+ c-->8. <g\fermata c e\turn>16 +@lilypond[verbatim,quote] +\relative { + <a' c\prall e>1 <a-> c-^ e>2 <f-. a c-. e-.>4 + <a-+ c-->8. <g\fermata c e\turn>16 +} @end lilypond However some notation, such as dynamics, hairpins and slurs must be attached to the chord, rather than notes within the chord, otherwise they will not print. -@lilypond[verbatim,quote,relative=2] -<a\f c( e>1 <a c) e>\f <a\< c e>( <a\! c e>) -<a c e>\< <a c e> <a c e>\! +@lilypond[verbatim,quote] +\relative { + <a'\f c( e>1 <a c) e>\f <a\< c e>( <a\! c e>) + <a c e>\< <a c e> <a c e>\! +} @end lilypond @cindex chords, empty @@ -90,10 +98,12 @@ happen at the same musical time as the next following note or chord and be combined with them (for more complex possibilities of combining such elements, see @ref{Simultaneous expressions}): -@lilypond[verbatim,quote,relative=2] -\grace { g8( a b } -<> ) \p \< -. -\markup \italic "sempre staccato" -\repeat unfold 4 { c4 e } c1\f +@lilypond[verbatim,quote] +\relative { + \grace { g'8( a b } + <> ) \p \< -. -\markup \italic "sempre staccato" + \repeat unfold 4 { c4 e } c1\f +} @end lilypond @cindex relative pitch, chords @@ -106,8 +116,10 @@ pitch of the last note that came before the chord. All remaining notes in the chord are relative to the note that came before it @emph{within the same chord}. -@lilypond[verbatim,quote,relative=2] -<a c e>1 <f a c> <a c e> <f' a c> <b, e b,> +@lilypond[verbatim,quote] +\relative { + <a' c e>1 <f a c> <a c e> <f' a c> <b, e b,> +} @end lilypond For more information about chords, see @ref{Chord notation}. @@ -159,25 +171,31 @@ enharmonic transcription of one or more pitches, In order to save typing, a shortcut can be used to repeat the preceding chord. The chord repetition symbol is @code{q}: -@lilypond[verbatim,quote,relative=2] -<a c e>1 q <f a c>2 q +@lilypond[verbatim,quote] +\relative { + <a' c e>1 q <f a c>2 q +} @end lilypond As with regular chords, the chord repetition symbol can be used with durations, articulations, markups, slurs, beams, etc. as only the pitches of the previous chord are duplicated. -@lilypond[verbatim,quote,relative=2] -<a c e>1\p^"text" q2\<( q8)[-! q8.]\! q16-1-2-3 q8\prall +@lilypond[verbatim,quote] +\relative { + <a' c e>1\p^"text" q2\<( q8)[-! q8.]\! q16-1-2-3 q8\prall +} @end lilypond The chord repetition symbol always remembers the last instance of a chord so it is possible to repeat the most recent chord even if other non-chorded notes or rests have been added since. -@lilypond[verbatim,quote,relative=2] -<a c e>1 c'4 q2 r8 q8 | -q2 c, | +@lilypond[verbatim,quote] +\relative { + <a' c e>1 c'4 q2 r8 q8 | + q2 c, | +} @end lilypond However, the chord repetition symbol does not retain any dynamics, @@ -251,15 +269,19 @@ expression are placed on separate staves. The following examples show simultaneous expressions on one staff: -@lilypond[quote,verbatim,relative=2] +@lilypond[quote,verbatim] \new Voice { % explicit single voice - << { a4 b g2 } { d4 g c,2 } >> + << \relative { a'4 b g2 } + \relative { d'4 g c,2 } >> } @end lilypond -@lilypond[quote,verbatim,relative=2] -% single first note -a << { a4 b g } { d4 g c, } >> +@lilypond[quote,verbatim] +\relative { + % single first note + a' << \relative { a'4 b g } + \relative { d'4 g c, } >> +} @end lilypond This can be useful if the simultaneous sections have identical @@ -268,8 +290,10 @@ the same stem will cause errors. Notes, articulations, and property changes in a @emph{single} @samp{Voice} are collected and engraved in musical order: -@lilypond[quote,verbatim,relative=2] -<a c>4-. <>-. << c a >> << { c-. <c a> } { a s-. } >> +@lilypond[quote,verbatim] +\relative { + <a' c>4-. <>-. << c a >> << { c-. <c a> } { a s-. } >> +} @end lilypond Multiple stems or beams or different note durations or properties at @@ -278,9 +302,10 @@ the same musical time require the use of multiple voices. The following example shows how simultaneous expressions can generate multiple staves implicitly: -@lilypond[quote,verbatim,relative=2] +@lilypond[quote,verbatim] % no single first note -<< { a4 b g2 } { d4 g2 c,4 } >> +<< \relative { a'4 b g2 } + \relative { d'4 g2 c,4 } >> @end lilypond Here different rhythms cause no problems because they are @@ -321,8 +346,8 @@ They can be denoted as the envelope of a set of notes. They are entered by applying the function @code{\makeClusters} to a sequence of chords, e.g., -@lilypond[quote,relative=2,verbatim] -\makeClusters { <g b>2 <c g'> } +@lilypond[quote,verbatim] +\relative \makeClusters { <g' b>2 <c g'> } @end lilypond Ordinary notes and clusters can be put together in the same staff, @@ -388,12 +413,12 @@ multiple staves. The basic structure needed to achieve multiple independent voices in a single staff is illustrated in the following example: -@lilypond[quote,relative=3,verbatim] +@lilypond[quote,verbatim] \new Staff << \new Voice = "first" - { \voiceOne r8 r16 g e8. f16 g8[ c,] f e16 d } + \relative { \voiceOne r8 r16 g'' e8. f16 g8[ c,] f e16 d } \new Voice= "second" - { \voiceTwo d16 c d8~ 16 b c8~ 16 b c8~ 16 b8. } + \relative { \voiceTwo d''16 c d8~ 16 b c8~ 16 b c8~ 16 b8. } >> @end lilypond @@ -427,10 +452,10 @@ the angle brackets are assigned to distinct temporary voices. This allows lyrics to be assigned to one continuing voice before, during and after a polyphonic section: -@lilypond[quote, verbatim, relative=2] -<< +@lilypond[quote,verbatim] +\relative << \new Voice = "melody" { - a4 + a'4 << { \voiceOne @@ -466,11 +491,11 @@ are created implicitly and are given the fixed names @code{"1"}, The first example could be typeset as follows: -@lilypond[quote,relative=3,verbatim] +@lilypond[quote,verbatim] << - { r8 r16 g e8. f16 g8[ c,] f e16 d } + \relative { r8 r16 g'' e8. f16 g8[ c,] f e16 d } \\ - { d16 c d8~ 16 b c8~ 16 b c8~ 16 b8. } + \relative { d''16 c d8~ 16 b c8~ 16 b c8~ 16 b8. } >> @end lilypond @@ -485,13 +510,13 @@ therefore we enter it in the third place, so it becomes voice three, which has the stems up as desired. Spacer rests are used to avoid printing doubled rests. -@lilypond[quote,relative=3,verbatim] +@lilypond[quote,verbatim] << - { r8 g g g g f16 ees f8 d } + \relative { r8 g'' g g g f16 ees f8 d } \\ - { ees,8 r ees r d r d r } + \relative { ees'8 r ees r d r d r } \\ - { d'8 s c s bes s a s } + \relative { d''8 s c s bes s a s } >> @end lilypond @@ -545,10 +570,10 @@ that have the same rhythm, we can combine them into a single @code{Voice} context, thus forming chords. To achieve this, enclose them in a simple simultaneous music construct within an explicit voice: -@lilypond[quote,relative=2,verbatim] +@lilypond[quote,verbatim] \new Voice << - { e4 f8 d e16 f g8 d4 } - { c4 d8 b c16 d e8 b4 } + \relative { e''4 f8 d e16 f g8 d4 } + \relative { c''4 d8 b c16 d e8 b4 } >> @end lilypond @@ -593,15 +618,15 @@ Snippets: Voices may be given distinct colors and shapes, allowing them to be easily identified: -@lilypond[quote,relative=2,verbatim] +@lilypond[quote,verbatim] << - { \voiceOneStyle d4 c2 b4 } + \relative { \voiceOneStyle d''4 c2 b4 } \\ - { \voiceTwoStyle e,2 e } + \relative { \voiceTwoStyle e'2 e } \\ - { \voiceThreeStyle b2. c4 } + \relative { \voiceThreeStyle b2. c4 } \\ - { \voiceFourStyle g'2 g } + \relative { \voiceFourStyle g'2 g } >> @end lilypond @@ -664,18 +689,20 @@ are shifted vertically. The following example shows three different circumstances, on beats 1 and 3 in bar 1 and beat 1 in bar 2, where the automatic merging fails. -@lilypond[quote,verbatim,relative=2] +@lilypond[quote,verbatim] << - { - c8 d e d c d c4 + \relative { + c''8 d e d c d c4 g'2 fis - } \\ { - c2 c8. b16 c4 + } \\ + \relative { + c''2 c8. b16 c4 e,2 r - } \\ { + } \\ + \relative { \oneVoice s1 - e8 a b c d2 + e'8 a b c d2 } >> @end lilypond @@ -683,19 +710,21 @@ in bar 2, where the automatic merging fails. Notes with different note heads may be merged as shown below. In this example the note heads on beat 1 of bar 1 are now merged: -@lilypond[quote,verbatim,relative=2] +@lilypond[quote,verbatim] << - { + \relative { \mergeDifferentlyHeadedOn - c8 d e d c d c4 + c''8 d e d c d c4 g'2 fis - } \\ { - c2 c8. b16 c4 + } \\ + \relative { + c''2 c8. b16 c4 e,2 r - } \\ { + } \\ + \relative { \oneVoice s1 - e8 a b c d2 + e'8 a b c d2 } >> @end lilypond @@ -706,20 +735,22 @@ to tell them apart. Note heads with different dots as shown in beat 3 of bar 1 may be also be merged: -@lilypond[quote,relative=2,verbatim] +@lilypond[quote,verbatim] << - { + \relative { \mergeDifferentlyHeadedOn \mergeDifferentlyDottedOn - c8 d e d c d c4 + c''8 d e d c d c4 g'2 fis - } \\ { - c2 c8. b16 c4 + } \\ + \relative { + c''2 c8. b16 c4 e,2 r - } \\ { + } \\ + \relative { \oneVoice s1 - e8 a b c d2 + e'8 a b c d2 } >> @end lilypond @@ -734,21 +765,23 @@ merged. Here, @code{\shiftOn} is applied to move the top @notation{g} out of the column, and @code{\mergeDifferentlyHeadedOn} then works properly. -@lilypond[quote,relative=2,verbatim] +@lilypond[quote,verbatim] << - { + \relative { \mergeDifferentlyHeadedOn \mergeDifferentlyDottedOn - c8 d e d c d c4 + c''8 d e d c d c4 \shiftOn g'2 fis - } \\ { - c2 c8. b16 c4 + } \\ + \relative { + c''2 c8. b16 c4 e,2 r - } \\ { + } \\ + \relative { \oneVoice s1 - e8 a b c d2 + e'8 a b c d2 } >> @end lilypond @@ -848,11 +881,11 @@ Internals Reference: Using @code{\override NoteColumn.ignore-collision = ##t} will cause differently headed notes in different voices to merge incorrectly. -@lilypond[quote,relative=1,verbatim] +@lilypond[quote,verbatim,fragment] \mergeDifferentlyHeadedOn -<< { c16 a' b a } \\ { c,2 } >> +<< \relative { c'16 a' b a } \\ \relative { c'2 } >> \override NoteColumn.ignore-collision = ##t -<< { c16 a' b a } \\ { c,2 } >> +<< \relative { c'16 a' b a } \\ \relative { c'2 } >> @end lilypond @ignore diff --git a/Documentation/notation/spacing.itely b/Documentation/notation/spacing.itely index db9f9ff3c1..d88fa8b27e 100644 --- a/Documentation/notation/spacing.itely +++ b/Documentation/notation/spacing.itely @@ -1407,20 +1407,24 @@ consecutive lines have similar density. To manually force a line break at a bar line, use the @code{\break} command: -@lilypond[quote,ragged-right,relative=2,verbatim] -c4 c c c | \break -c4 c c c | +@lilypond[quote,ragged-right,verbatim] +\relative c'' { + c4 c c c | \break + c4 c c c | +} @end lilypond By default, a @code{\break} in the middle of a measure is ignored, and a warning is printed. To force a line break in the middle of a measure, add an invisible bar line with @w{@samp{\bar ""}}: -@lilypond[quote,ragged-right,relative=2,verbatim] -c4 c c -\bar "" \break -c | -c4 c c c | +@lilypond[quote,ragged-right,verbatim] +\relative c'' { + c4 c c + \bar "" \break + c | + c4 c c c | +} @end lilypond A @code{\break} occurring at a bar line is also ignored if the @@ -1446,10 +1450,12 @@ Similarly, line breaks are normally forbidden when beams cross bar lines. This behavior can be changed by setting @code{\override Beam.breakable = ##t}: -@lilypond[quote,ragged-right,relative=2,verbatim] -\override Beam.breakable = ##t -c2. c8[ c | \break -c8 c] c2. | +@lilypond[quote,ragged-right,verbatim] +\relative c'' { + \override Beam.breakable = ##t + c2. c8[ c | \break + c8 c] c2. | +} @end lilypond The @code{\noBreak} command forbids a line break at the bar line @@ -2636,30 +2642,34 @@ is, if two outside-staff grobs are competing for the same space, the one with the lower @code{outside-staff-priority} will be placed closer to the staff. -@lilypond[quote,ragged-right,relative=2,verbatim] -c4_"Text"\pp -r2. -\once \override TextScript.outside-staff-priority = #1 -c4_"Text"\pp % this time the text will be closer to the staff -r2. -% by setting outside-staff-priority to a non-number, -% we disable the automatic collision avoidance -\once \override TextScript.outside-staff-priority = ##f -\once \override DynamicLineSpanner.outside-staff-priority = ##f -c4_"Text"\pp % now they will collide +@lilypond[quote,ragged-right,verbatim] +\relative c'' { + c4_"Text"\pp + r2. + \once \override TextScript.outside-staff-priority = #1 + c4_"Text"\pp % this time the text will be closer to the staff + r2. + % by setting outside-staff-priority to a non-number, + % we disable the automatic collision avoidance + \once \override TextScript.outside-staff-priority = ##f + \once \override DynamicLineSpanner.outside-staff-priority = ##f + c4_"Text"\pp % now they will collide +} @end lilypond The vertical padding around outside-staff objects can be controlled with @code{outside-staff-padding}. -@lilypond[quote,ragged-right,relative=2,verbatim,staffsize=18] -\once \override TextScript.outside-staff-padding = #0 -a4-"outside-staff-padding = #0" -\once \override TextScript.outside-staff-padding = #3 -d-"outside-staff-padding = #3" -c-"default outside-staff-padding" -b-"default outside-staff-padding" -R1 +@lilypond[quote,ragged-right,verbatim,staffsize=18] +\relative { + \once \override TextScript.outside-staff-padding = #0 + a'4-"outside-staff-padding = #0" + \once \override TextScript.outside-staff-padding = #3 + d-"outside-staff-padding = #3" + c-"default outside-staff-padding" + b-"default outside-staff-padding" + R1 +} @end lilypond @@ -2671,11 +2681,13 @@ As shown in the example below, setting @code{outside-staff-horizontal-padding} increases the horizontal spacing required, and in this case moves the text up to prevent it from getting too close to the ledger lines. -@lilypond[quote,ragged-right,relative=2,verbatim] -c4^"Word" c c''2 -R1 -\once \override TextScript.outside-staff-horizontal-padding = #1 -c,,4^"Word" c c''2 +@lilypond[quote,ragged-right,verbatim] +\relative { + c''4^"Word" c c''2 + R1 + \once \override TextScript.outside-staff-horizontal-padding = #1 + c,,4^"Word" c c''2 +} @end lilypond @seealso @@ -2713,10 +2725,12 @@ For example, the following piece contains lots of half, quarter, and 8th notes; the eighth note is followed by 1 note head width (NHW). The quarter note is followed by 2 NHW, the half by 3 NHW, etc. -@lilypond[quote,verbatim,relative=1] -c2 c4. c8 -c4. c8 c4. c8 -c8 c c4 c c +@lilypond[quote,verbatim] +\relative c' { + c2 c4. c8 + c4. c8 c4. c8 + c8 c c4 c c +} @end lilypond Normally, @code{spacing-increment} is set to 1.2 staff space, which is @@ -2756,8 +2770,8 @@ followed by a space that is proportional to their duration relative to the common shortest note. So if we were to add only a few 16th notes to the example above, they would be followed by half a NHW: -@lilypond[quote,verbatim,relative=2] -c2 c4. c8 | c4. c16[ c] c4. c8 | c8 c c4 c c +@lilypond[quote,verbatim] +\relative { c''2 c4. c8 | c4. c16[ c] c4. c8 | c8 c c4 c c } @end lilypond @@ -2773,13 +2787,13 @@ example shows these corrections, once with default settings, and once with exaggerated corrections: @lilypond[quote,ragged-right] -{ - c'4 e''4 e'4 b'4 | - b'4 e''4 b'4 e''4 | +\fixed c' { + c4 e'4 e4 b4 | + b4 e'4 b4 e'4 | \override Staff.NoteSpacing.stem-spacing-correction = #1.5 \override Staff.StaffSpacing.stem-spacing-correction = #1.5 - c'4 e''4 e'4 b'4 | - b'4 e''4 b'4 e''4 | + c4 e'4 e4 b4 | + b4 e'4 b4 e'4 | } @end lilypond @@ -2826,13 +2840,15 @@ In the following example, the time signature change introduces a new section, and hence the 16ths notes are automatically spaced slightly wider. -@lilypond[relative=1,verbatim,quote] -\time 2/4 -c4 c8 c -c8 c c4 c16[ c c8] c4 -\newSpacingSection -\time 4/16 -c16[ c c8] +@lilypond[verbatim,quote] +\relative c' { + \time 2/4 + c4 c8 c + c8 c c4 c16[ c c8] c4 + \newSpacingSection + \time 4/16 + c16[ c c8] +} @end lilypond The @code{\newSpacingSection} command creates a new @@ -2844,15 +2860,17 @@ command itself. They will then affect the spacing of all the following music until the properties are changed in a new spacing section, for example, -@lilypond[relative=1,verbatim,quote] -\time 4/16 -c16[ c c8] -\newSpacingSection -\override Score.SpacingSpanner.spacing-increment = #2 -c16[ c c8] -\newSpacingSection -\revert Score.SpacingSpanner.spacing-increment -c16[ c c8] +@lilypond[verbatim,quote] +\relative c' { + \time 4/16 + c16[ c c8] + \newSpacingSection + \override Score.SpacingSpanner.spacing-increment = #2 + c16[ c c8] + \newSpacingSection + \revert Score.SpacingSpanner.spacing-increment + c16[ c c8] +} @end lilypond @@ -2935,9 +2953,10 @@ property can only be changed at the beginning of a score, When @code{strict-note-spacing} is set, notes are spaced without regard for clefs, bar lines, and grace notes, -@lilypond[quote,ragged-right,relative=2,verbatim] +@lilypond[quote,ragged-right,fragment,verbatim] \override Score.SpacingSpanner.strict-note-spacing = ##t -\new Staff { c8[ c \clef alto c \grace { c16 c } c8 c c] c32[ c] } +\new Staff \relative { + c''8[ c \clef alto c \grace { c16 c } c8 c c] c32[ c] } @end lilypond @seealso @@ -3471,9 +3490,11 @@ will take up more space than one system with the volta repeats and another system without. For example, dynamics that @q{stick out} of a system can be moved closer to the staff: -@lilypond[verbatim,quote,relative=1] -e4 c g\f c -e4 c g-\tweak X-offset #-2.7 \f c +@lilypond[verbatim,quote] +\relative e' { + e4 c g\f c + e4 c g-\tweak X-offset #-2.7 \f c +} @end lilypond @item diff --git a/Documentation/notation/staff.itely b/Documentation/notation/staff.itely index 2ad184bc1f..17a60cbb24 100644 --- a/Documentation/notation/staff.itely +++ b/Documentation/notation/staff.itely @@ -73,8 +73,8 @@ the @code{\new} or @code{\context} commands. For details, see The basic staff context is @code{Staff}: -@lilypond[verbatim,quote,relative=2] -\new Staff { c4 d e f } +@lilypond[verbatim,quote] +\new Staff \relative { c''4 d e f } @end lilypond The @code{DrumStaff} context creates a five-line staff set up for @@ -93,15 +93,15 @@ For details, see @ref{Percussion staves}. displays the rhythmic values of the input. Real durations are preserved. For details, see @ref{Showing melody rhythms}. -@lilypond[verbatim,quote,relative=2] +@lilypond[verbatim,quote] \new RhythmicStaff { c4 d e f } @end lilypond @code{TabStaff} creates a tablature with six strings in standard guitar tuning. For details, see @ref{Default tablatures}. -@lilypond[verbatim,quote,relative=2] -\new TabStaff { c4 d e f } +@lilypond[verbatim,quote] +\new TabStaff \relative { c''4 d e f } @end lilypond There are two staff contexts specific for the notation of ancient @@ -111,8 +111,8 @@ described in @ref{Pre-defined contexts}. The @code{GregorianTranscriptionStaff} context creates a staff to notate modern Gregorian chant. It does not show bar lines. -@lilypond[verbatim,quote,relative=2] -\new GregorianTranscriptionStaff { c4 d e f e d } +@lilypond[verbatim,quote] +\new GregorianTranscriptionStaff \relative { c''4 d e f e d } @end lilypond New single staff contexts may be defined. For details, see @@ -174,40 +174,40 @@ If no context is specified, the default properties will be used: the group is started with a vertical line, and the bar lines are not connected. -@lilypond[verbatim,quote,relative=2] +@lilypond[verbatim,quote] << - \new Staff { c1 c } - \new Staff { c1 c } + \new Staff \relative { c''1 c } + \new Staff \relative { c''1 c } >> @end lilypond In the @code{StaffGroup} context, the group is started with a bracket and bar lines are drawn through all the staves. -@lilypond[verbatim,quote,relative=2] +@lilypond[verbatim,quote] \new StaffGroup << - \new Staff { c1 c } - \new Staff { c1 c } + \new Staff \relative { c''1 c } + \new Staff \relative { c''1 c } >> @end lilypond In a @code{ChoirStaff}, the group starts with a bracket, but bar lines are not connected. -@lilypond[verbatim,quote,relative=2] +@lilypond[verbatim,quote] \new ChoirStaff << - \new Staff { c1 c } - \new Staff { c1 c } + \new Staff \relative { c''1 c } + \new Staff \relative { c''1 c } >> @end lilypond In a @code{GrandStaff}, the group begins with a brace, and bar lines are connected between the staves. -@lilypond[verbatim,quote,relative=2] +@lilypond[verbatim,quote] \new GrandStaff << - \new Staff { c1 c } - \new Staff { c1 c } + \new Staff \relative { c''1 c } + \new Staff \relative { c''1 c } >> @end lilypond @@ -215,11 +215,11 @@ The @code{PianoStaff} is identical to a @code{GrandStaff}, except that it supports printing the instrument name directly. For details, see @ref{Instrument names}. -@lilypond[verbatim,quote,relative=2] +@lilypond[verbatim,quote] \new PianoStaff << \set PianoStaff.instrumentName = #"Piano" - \new Staff { c1 c } - \new Staff { c1 c } + \new Staff \relative { c''1 c } + \new Staff \relative { \clef bass c1 c } >> @end lilypond @@ -290,17 +290,17 @@ Staff-group contexts can be nested to arbitrary depths. In this case, each child context creates a new bracket adjacent to the bracket of its parent group. -@lilypond[verbatim,quote,relative=2] +@lilypond[verbatim,quote] \new StaffGroup << - \new Staff { c2 c | c2 c } + \new Staff \relative { c''2 c | c2 c } \new StaffGroup << - \new Staff { g2 g | g2 g } + \new Staff \relative { g'2 g | g2 g } \new StaffGroup \with { systemStartDelimiter = #'SystemStartSquare } << - \new Staff { e2 e | e2 e } - \new Staff { c2 c | c2 c } + \new Staff \relative { e'2 e | e2 e } + \new Staff \relative { c'2 c | c2 c } >> >> >> @@ -417,10 +417,12 @@ The @code{\stopStaff} and @code{\startStaff} commands can be used to stop or (re)start the staff lines respectively, from being printed at any point witin a score. -@lilypond[verbatim,quote,relative=2] -\stopStaff f4 d \startStaff g, e -f'4 d \stopStaff g, e -f'4 d \startStaff g, e +@lilypond[verbatim,quote] +\relative { + \stopStaff f''4 d \startStaff g, e + f'4 d \stopStaff g, e + f'4 d \startStaff g, e +} @end lilypond @predefined @@ -434,14 +436,16 @@ these modifications must be made before the staff is (re)started. The number of staff lines can be altered: -@lilypond[verbatim,quote,relative=2] -f4 d \stopStaff -\override Staff.StaffSymbol.line-count = #2 -\startStaff g, e | +@lilypond[verbatim,quote] +\relative { + f''4 d \stopStaff + \override Staff.StaffSymbol.line-count = #2 + \startStaff g, e | -f'4 d \stopStaff -\revert Staff.StaffSymbol.line-count -\startStaff g, e | + f'4 d \stopStaff + \revert Staff.StaffSymbol.line-count + \startStaff g, e | +} @end lilypond The position of each staff line can also be altered. A list of @@ -451,13 +455,15 @@ center line, and the normal line positions are printed for every value entered so that the number of staff lines, as well as their position, can be changed with a single override. -@lilypond[verbatim,quote,relative=2] -f4 d \stopStaff -\override Staff.StaffSymbol.line-positions = #'(1 3 5 -1 -3) -\startStaff g, e | -f'4 d \stopStaff -\override Staff.StaffSymbol.line-positions = #'(8 6.5 -6 -8 -0.5) -\startStaff g, e +@lilypond[verbatim,quote] +\relative { + f''4 d \stopStaff + \override Staff.StaffSymbol.line-positions = #'(1 3 5 -1 -3) + \startStaff g, e | + f'4 d \stopStaff + \override Staff.StaffSymbol.line-positions = #'(8 6.5 -6 -8 -0.5) + \startStaff g, e | +} @end lilypond To preserve typical stem directions (in the bottom half of the staff @@ -470,22 +476,24 @@ lines. See @ref{Clef}. Staff line thickness can be altered. Ledger lines and note stems, by default, are also affected. -@lilypond[verbatim,quote,relative=2] +@lilypond[verbatim,quote] \new Staff \with { \override StaffSymbol.thickness = #3 +} \relative { + f''4 d g, e } -{ f4 d g, e } @end lilypond It is also possible to set ledger line thickness independently of staff lines. -@lilypond[verbatim,quote,relative=2] +@lilypond[verbatim,quote] \new Staff \with { \override StaffSymbol.thickness = #2 \override StaffSymbol.ledger-line-thickness = #'(0.5 . 0.4) +} \relative { + f'''4 a, a,, f } -{ f'4 a, a,, f } @end lilypond @noindent @@ -495,22 +503,24 @@ new thickness of the ledger line. The vertical positions of ledger lines can be altered, -@lilypond[verbatim,quote,relative=2] +@lilypond[verbatim,quote] \new Staff \with { \override StaffSymbol.ledger-positions = #'(-3 -2 -1 2 5 6) +} \relative { + f'''4 a, a,, f } -{ f'4 a, a,, f } @end lilypond Additional ledger lines can be made to appear above or below note heads depending on the current position relative to other note heads that also have their own ledger lines. -@lilypond[verbatim,quote,relative=2] +@lilypond[verbatim,quote] \new Staff \with { \override StaffSymbol.ledger-extra = #4 +} \relative { + f'''4 a, d, f, } -{ f'4 a, d, f, } @end lilypond Ledger lines can also be made to appear inside the staff where custom @@ -519,23 +529,26 @@ ledger lines when the explicit @code{ledger-position} is and is not set. The @code{\stopStaff} is needed in the example to revert the @code{\override} for the whole @code{StaffSymbol}. -@lilypond[verbatim,quote,relative=1] -\override Staff.StaffSymbol.line-positions = #'(-8 0 2 4) -d4 e f g -\stopStaff -\startStaff -\override Staff.StaffSymbol.ledger-positions = #'(-8 -6 (-4 -2) 0) -d4 e f g +@lilypond[verbatim,quote] +\relative d' { + \override Staff.StaffSymbol.line-positions = #'(-8 0 2 4) + d4 e f g + \stopStaff + \startStaff + \override Staff.StaffSymbol.ledger-positions = #'(-8 -6 (-4 -2) 0) + d4 e f g +} @end lilypond The distance between staff lines can be altered. This affects ledger line spacing as well. -@lilypond[verbatim,quote,relative=2] +@lilypond[verbatim,quote] \new Staff \with { \override StaffSymbol.staff-space = #1.5 +} \relative { + f'''4 d, g, e, } -{ f'4 d, g, e, } @end lilypond @snippets @@ -872,27 +885,29 @@ and @code{ChoirStaff} contexts. The value of @code{instrumentName} is used for the first staff, and the value of @code{shortInstrumentName} is used for all succeeding staves. -@lilypond[verbatim,quote,ragged-right,relative=1] +@lilypond[verbatim,quote,ragged-right] \new Staff \with { instrumentName = #"Violin " shortInstrumentName = #"Vln. " +} \relative { + c'4.. g'16 c4.. g'16 \break | c1 | } -{ c4.. g'16 c4.. g'16 \break | c1 } @end lilypond @cindex instrument names, complex @code{\markup} can be used to create more complex instrument names: -@lilypond[verbatim,quote,relative=2] +@lilypond[verbatim,quote] \new Staff \with { instrumentName = \markup { \column { "Clarinetti" \line { "in B" \smaller \flat } } } +} \relative { + c''4 c,16 d e f g2 } -{ c4 c,16 d e f g2 } @end lilypond @cindex instrument names, centering @@ -901,20 +916,20 @@ When two or more staff contexts are grouped together, the instrument names and short instrument names are centered by default. To center multi-line instrument names, @code{\center-column} must be used: -@lilypond[verbatim,quote,indent=1.5\cm,relative=2] +@lilypond[verbatim,quote,indent=1.5\cm] << \new Staff \with { instrumentName = #"Flute" - } - { f2 g4 f } + } \relative { + f''2 g4 f +} \new Staff \with { instrumentName = \markup { \center-column { "Clarinet" \line { "in B" \smaller \flat } } } - } - { c4 b c2 } + } \relative { c''4 b c2 } >> @end lilypond @@ -927,26 +942,22 @@ staff group may not be centered unless the @code{indent} and settings, see @ref{paper variables for shifts and indents,,@code{@bs{}paper} variables for shifts and indents}. @lilypond[verbatim,quote,ragged-right] -\relative { - << - \new Staff \with { - instrumentName = #"Alto Flute in G" - shortInstrumentName = #"Flt." - } - { - f''2 g4 f \break - g4 f g2 - } - \new Staff \with { - instrumentName = #"Clarinet" - shortInstrumentName = #"Clar." - } - { - c,4 b c2 \break - c2 b4 c - } - >> -} +<< + \new Staff \with { + instrumentName = #"Alto Flute in G" + shortInstrumentName = #"Flt." + } \relative { + f''2 g4 f \break + g4 f g2 + } + \new Staff \with { + instrumentName = #"Clarinet" + shortInstrumentName = #"Clar." + } \relative { + c''4 b c2 \break + c2 b4 c + } +>> \layout { indent = 3.0\cm @@ -1209,15 +1220,17 @@ triplets may result in poor notation. The simplest way to format cue notes is to explicitly create a @code{CueVoice} context within the part. -@lilypond[verbatim,relative=1] -R1 -<< - { e2\rest r4. e8 } - \new CueVoice { - \stemUp d'8^"flute" c d e fis2 - } ->> -d,4 r a r +@lilypond[verbatim] +\relative { + R1 + << + { e'2\rest r4. e8 } + \new CueVoice { + \stemUp d'8^"flute" c d e fis2 + } + >> + d,4 r a r +} @end lilypond The @code{\cueClef} command can also be used with an explict @@ -1226,28 +1239,32 @@ an appropriately sized clef for the cue notes. The @code{\cueClefUnset} command can then be used to switch back to the original clef, again with an appropriately sized clef. -@lilypond[verbatim,noragged-right,relative=1] -\clef "bass" -R1 -<< - { e2\rest r4. \cueClefUnset e,8 } - \new CueVoice { - \cueClef "treble" \stemUp d''8^"flute" c d e fis2 - } ->> -d,,4 r a r +@lilypond[verbatim,noragged-right] +\relative { + \clef "bass" + R1 + << + { e'2\rest r4. \cueClefUnset e,8 } + \new CueVoice { + \cueClef "treble" \stemUp d''8^"flute" c d e fis2 + } + >> + d,,4 r a r +} @end lilypond The @code{\cueClef} and @code{\cueClefUnset} command can also be used without a @code{CueVoice} if required. -@lilypond[verbatim,noragged-right,relative=1] -\clef "bass" -R1 -\cueClef "treble" -d'8^"flute" c d e fis2 -\cueClefUnset -d,,4 r a r +@lilypond[verbatim,noragged-right] +\relative { + \clef "bass" + R1 + \cueClef "treble" + d''8^"flute" c d e fis2 + \cueClefUnset + d,,4 r a r +} @end lilypond For more complex cue note placement, e.g including transposition, or diff --git a/Documentation/notation/text.itely b/Documentation/notation/text.itely index 15084268e3..53de078dbb 100644 --- a/Documentation/notation/text.itely +++ b/Documentation/notation/text.itely @@ -59,27 +59,30 @@ demonstrated in the following example. Such indications may be manually placed above or below the staff, using the syntax described in @ref{Direction and placement}. -@lilypond[quote,verbatim,relative=2] -a8^"pizz." g f e a4-"scherz." f +@lilypond[quote,verbatim] +\relative { a'8^"pizz." g f e a4-"scherz." f } @end lilypond This syntax is actually a shorthand; more complex text formatting may be added to a note by explicitly using a @code{\markup} block, as described in @ref{Formatting text}. -@lilypond[quote,verbatim,relative=2] -a8^\markup { \italic pizz. } g f e -a4_\markup { \tiny scherz. \bold molto } f +@lilypond[quote,verbatim] +\relative { + a'8^\markup { \italic pizz. } g f e + a4_\markup { \tiny scherz. \bold molto } f } @end lilypond By default, text indications do not influence the note spacing. However, their widths can be taken into account: in the following example, the first text string does not affect spacing, whereas the second one does. -@lilypond[quote,verbatim,relative=2] -a8^"pizz." g f e -\textLengthOn -a4_"scherzando" f +@lilypond[quote,verbatim] +\relative { + a'8^"pizz." g f e + \textLengthOn + a4_"scherzando" f +} @end lilypond In addition to text scripts, articulations can be attached to notes. @@ -139,10 +142,12 @@ multiple notes with dotted lines. Such objects, called @qq{spanners}, may be created from one note to another using the following syntax: -@lilypond[verbatim,quote,relative=2] -\override TextSpanner.bound-details.left.text = "rit." -b1\startTextSpan -e,\stopTextSpan +@lilypond[verbatim,quote] +\relative { + \override TextSpanner.bound-details.left.text = "rit." + b'1\startTextSpan + e,\stopTextSpan +} @end lilypond @cindex text spanners, formatting @@ -154,11 +159,13 @@ it is printed in italic characters, but different formatting can be obtained using @code{\markup} blocks, as described in @ref{Formatting text}. -@lilypond[quote,relative=2,verbatim] -\override TextSpanner.bound-details.left.text = - \markup { \upright "rit." } -b1\startTextSpan c -e,\stopTextSpan +@lilypond[quote,verbatim] +\relative { + \override TextSpanner.bound-details.left.text = + \markup { \upright "rit." } + b'1\startTextSpan c + e,\stopTextSpan +} @end lilypond The line style, as well as the text string, can be defined as an @@ -226,21 +233,25 @@ in @ref{Rehearsal marks}: @c \mark needs to be placed on a separate line (it's not @c attached to an object like \markup is). -vv -@lilypond[verbatim,quote,relative=2] -c4 -\mark "Allegro" -c c c +@lilypond[verbatim,quote] +\relative { + c''4 + \mark "Allegro" + c c c +} @end lilypond This syntax makes it possible to put any text on a bar line; more complex text formatting may be added using a @code{\markup} block, as described in @ref{Formatting text}: -@lilypond[quote,verbatim,relative=1] -<c e>1 -\mark \markup { \italic { colla parte } } -<d f>2 <e g> -<c f aes>1 +@lilypond[quote,verbatim] +\relative { + <c' e>1 + \mark \markup { \italic { colla parte } } + <d f>2 <e g> + <c f aes>1 +} @end lilypond @noindent @@ -248,10 +259,12 @@ This syntax also allows to print special signs, like coda, segno or fermata, by specifying the appropriate symbol name as explained in @ref{Music notation inside markup}: -@lilypond[quote,verbatim,relative=2] -<bes f>2 <aes d> -\mark \markup { \musicglyph #"scripts.ufermata" } -<e g>1 +@lilypond[quote,verbatim] +\relative { + <bes' f>2 <aes d> + \mark \markup { \musicglyph #"scripts.ufermata" } + <e g>1 +} @end lilypond @noindent @@ -261,11 +274,13 @@ bar, they can be placed above the bar line or between notes. When specified at a line break, the mark will be printed at the beginning of the next line. -@lilypond[quote,verbatim,relative=2,ragged-right] -\mark "Allegro" -c1 c -\mark "assai" \break -c c +@lilypond[quote,verbatim,ragged-right] +\relative c'' { + \mark "Allegro" + c1 c + \mark "assai" \break + c c +} @end lilypond @funindex \markLengthOn @@ -422,14 +437,16 @@ contain nested expressions or markup commands, entered using the backslash @code{\} character. Such commands only affect the first following expression. -@lilypond[quote,verbatim,relative=2] -a1-\markup intenso -a2^\markup { poco \italic più forte } -c e1 -d2_\markup { \italic "string. assai" } -e -b1^\markup { \bold { molto \italic agitato } } -c +@lilypond[quote,verbatim] +\relative { + a'1-\markup intenso + a2^\markup { poco \italic più forte } + c e1 + d2_\markup { \italic "string. assai" } + e + b1^\markup { \bold { molto \italic agitato } } + c +} @end lilypond @cindex special characters in markup mode @@ -447,10 +464,12 @@ will be printed verbatim without affecting the formatting of the text. Double quotation marks themselves may be printed by preceding them with backslashes. -@lilypond[quote,verbatim,relative=2] -a1^"\italic markup..." -a_\markup { \italic "... prints \"italic\" letters!" } -a a +@lilypond[quote,verbatim] +\relative { + a'1^"\italic markup..." + a_\markup { \italic "... prints \"italic\" letters!" } + a a +} @end lilypond To be treated as a distinct expression, a list of words needs to be @@ -459,11 +478,13 @@ expressions are defined affects how these expressions will be stacked, centered and aligned; in the following example, the second @code{\markup} expression is treated the same as the first one: -@lilypond[quote,verbatim,relative=2] -c1^\markup { \center-column { a bbb c } } -c1^\markup { \center-column { a { bbb c } } } -c1^\markup { \center-column { a \line { bbb c } } } -c1^\markup { \center-column { a "bbb c" } } +@lilypond[quote,verbatim] +\relative c'' { + c1^\markup { \center-column { a bbb c } } + c1^\markup { \center-column { a { bbb c } } } + c1^\markup { \center-column { a \line { bbb c } } } + c1^\markup { \center-column { a "bbb c" } } +} @end lilypond Markups can be stored in variables. Such variables may be @@ -513,14 +534,16 @@ Syntax errors for markup mode can be confusing. Basic font switching is supported in markup mode: -@lilypond[quote,verbatim,relative=2] -d1^\markup { - \bold { Più mosso } - \italic { non troppo \underline Vivo } +@lilypond[quote,verbatim] +\relative { + d''1^\markup { + \bold { Più mosso } + \italic { non troppo \underline Vivo } + } + r2 r4 r8 + d,_\markup { \italic quasi \smallCaps Tromba } + f1 d2 r } -r2 r4 r8 -d,_\markup { \italic quasi \smallCaps Tromba } -f1 d2 r @end lilypond @cindex font size @@ -541,36 +564,44 @@ number of different ways It can be set to predefined size, -@lilypond[quote,verbatim,relative=2] -b1_\markup { \huge Sinfonia } -b1^\markup { \teeny da } -b1-\markup { \normalsize camera } +@lilypond[quote,verbatim] +\relative b' { + b1_\markup { \huge Sinfonia } + b1^\markup { \teeny da } + b1-\markup { \normalsize camera } +} @end lilypond It can be set relative to its previous value, -@lilypond[quote,verbatim,relative=2] -b1_\markup { \larger Sinfonia } -b1^\markup { \smaller da } -b1-\markup { \magnify #0.6 camera } +@lilypond[quote,verbatim] +\relative b' { + b1_\markup { \larger Sinfonia } + b1^\markup { \smaller da } + b1-\markup { \magnify #0.6 camera } +} @end lilypond It can be increased or decreased relative to the value set by the global staff size, -@lilypond[quote,verbatim,relative=2] -b1_\markup { \fontsize #-2 Sinfonia } -b1^\markup { \fontsize #1 da } -b1-\markup { \fontsize #3 camera } +@lilypond[quote,verbatim] +\relative b' { + b1_\markup { \fontsize #-2 Sinfonia } + b1^\markup { \fontsize #1 da } + b1-\markup { \fontsize #3 camera } +} @end lilypond It can also be set to a fixed point-size, regardless of the global staff size, -@lilypond[quote,verbatim,relative=2] -b1_\markup { \abs-fontsize #20 Sinfonia } -b1^\markup { \abs-fontsize #8 da } -b1-\markup { \abs-fontsize #14 camera } +@lilypond[quote,verbatim] +\relative b' { + b1_\markup { \abs-fontsize #20 Sinfonia } + b1^\markup { \abs-fontsize #8 da } + b1-\markup { \abs-fontsize #14 camera } +} @end lilypond If the text includes spaces, then it is best to put it all inside quote @@ -739,14 +770,16 @@ Markup objects may be aligned in different ways. By default, a text indication is aligned on its left edge: in the following example, there is no difference between the first and the second markup. -@lilypond[quote,verbatim,relative=2] -d1-\markup { poco } -f -d-\markup { \left-align poco } -f -d-\markup { \center-align { poco } } -f -d-\markup { \right-align poco } +@lilypond[quote,verbatim] +\relative { + d''1-\markup { poco } + f + d-\markup { \left-align poco } + f + d-\markup { \center-align { poco } } + f + d-\markup { \right-align poco } +} @end lilypond @funindex \halign @@ -754,14 +787,16 @@ d-\markup { \right-align poco } Horizontal alignment may be fine-tuned using a numeric value: -@lilypond[quote,verbatim,relative=2] -a1-\markup { \halign #-1 poco } -e' -a,-\markup { \halign #0 poco } -e' -a,-\markup { \halign #0.5 poco } -e' -a,-\markup { \halign #2 poco } +@lilypond[quote,verbatim] +\relative { + a'1-\markup { \halign #-1 poco } + e' + a,-\markup { \halign #0 poco } + e' + a,-\markup { \halign #0.5 poco } + e' + a,-\markup { \halign #2 poco } +} @end lilypond @noindent @@ -790,21 +825,23 @@ another markup element or an invisible object. The following example demonstrates these two possibilities; the last markup in this example has no anchor point, and therefore is not moved. -@lilypond[quote,verbatim,relative=1] -d2^\markup { - Acte I - \raise #2 { Scène 1 } -} -a' -g_\markup { - \null - \lower #4 \bold { Très modéré } -} -a -d,^\markup { - \raise #4 \italic { Une forêt. } +@lilypond[quote,verbatim] +\relative { + d'2^\markup { + Acte I + \raise #2 { Scène 1 } + } + a' + g_\markup { + \null + \lower #4 \bold { Très modéré } + } + a + d,^\markup { + \raise #4 \italic { Une forêt. } + } + a'4 a g2 a } -a'4 a g2 a @end lilypond @funindex \general-align @@ -818,22 +855,24 @@ Some commands can affect both the horizontal and vertical alignment of text objects in markup mode. Any object affected by these commands must be preceded with an anchor point: -@lilypond[quote,verbatim,relative=1] -d2^\markup { - Acte I - \translate #'(-1 . 2) "Scène 1" -} -a' -g_\markup { - \null - \general-align #Y #3.2 \bold "Très modéré" -} -a -d,^\markup { - \null - \translate-scaled #'(-1 . 2) \teeny "Une forêt." +@lilypond[quote,verbatim] +\relative { + d'2^\markup { + Acte I + \translate #'(-1 . 2) "Scène 1" + } + a' + g_\markup { + \null + \general-align #Y #3.2 \bold "Très modéré" + } + a + d,^\markup { + \null + \translate-scaled #'(-1 . 2) \teeny "Une forêt." + } + a'4 a g2 a } -a'4 a g2 a @end lilypond @cindex multi-line markup @@ -1106,8 +1145,8 @@ image files converted to the Encapsulated PostScript format native PostScript code. In such a case, it may be useful to explicitly specify the size of the drawing, as demonstrated below: -@lilypond[quote,verbatim,relative=1] -c1^\markup { +@lilypond[quote,verbatim,fragment] +c'1^\markup { \combine \epsfile #X #10 #"./context-example.eps" \with-dimensions #'(0 . 6) #'(0 . 10) @@ -1123,7 +1162,7 @@ c1^\markup { closepath stroke" } -c +c' @end lilypond An exhaustive list of graphics-specific commands can be found in @@ -1159,38 +1198,40 @@ markup object. Notes and accidentals can be entered using markup commands: -@lilypond[quote,verbatim,relative=2] -a2 a^\markup { +@lilypond[quote,verbatim,fragment] +a'2 a'^\markup { \note #"4" #1 = \note-by-number #1 #1 #1.5 } -b1_\markup { +b'1_\markup { \natural \semiflat \flat \sesquiflat \doubleflat } \glissando -a1_\markup { +a'1_\markup { \natural \semisharp \sharp \sesquisharp \doublesharp } -\glissando b +\glissando b' @end lilypond Other notation objects may also be printed in markup mode: -@lilypond[quote,verbatim,relative=1] -g1 bes -ees\finger \markup \tied-lyric #"4~1" -fis_\markup { \dynamic rf } -bes^\markup { - \beam #8 #0.1 #0.5 -} -cis -d-\markup { - \markalphabet #8 - \markletter #8 +@lilypond[quote,verbatim] +\relative { + g1 bes + ees\finger \markup \tied-lyric #"4~1" + fis_\markup { \dynamic rf } + bes^\markup { + \beam #8 #0.1 #0.5 + } + cis + d-\markup { + \markalphabet #8 + \markletter #8 + } } @end lilypond @@ -1199,13 +1240,15 @@ separately in a markup object, as demonstrated below; an exhaustive list of these symbols and their names can be found in @ref{The Feta font}. -@lilypond[quote,verbatim,relative=2] -c2 -c'^\markup { \musicglyph #"eight" } -c,4 -c,8._\markup { \musicglyph #"clefs.G_change" } -c16 -c2^\markup { \musicglyph #"timesig.neomensural94" } +@lilypond[quote,verbatim] +\relative { + c''2 + c'^\markup { \musicglyph #"eight" } + c,4 + c,8._\markup { \musicglyph #"clefs.G_change" } + c16 + c2^\markup { \musicglyph #"timesig.neomensural94" } +} @end lilypond Another way of printing non-text glyphs is described in @@ -1215,20 +1258,22 @@ sizes. The markup mode also supports diagrams for specific instruments: -@lilypond[quote,verbatim,relative=2] -c1^\markup { - \fret-diagram-terse #"x;x;o;2;3;2;" -} -c^\markup { - \harp-pedal #"^-v|--ov^" -} -c -c^\markup { - \combine - \musicglyph #"accordion.discant" +@lilypond[quote,verbatim] +\relative { + c''1^\markup { + \fret-diagram-terse #"x;x;o;2;3;2;" + } + c^\markup { + \harp-pedal #"^-v|--ov^" + } + c + c^\markup { \combine - \raise #0.5 \musicglyph #"accordion.dot" - \raise #1.5 \musicglyph #"accordion.dot" + \musicglyph #"accordion.discant" + \combine + \raise #0.5 \musicglyph #"accordion.dot" + \raise #1.5 \musicglyph #"accordion.dot" + } } @end lilypond @@ -1244,15 +1289,17 @@ A whole score can even be nested inside a markup object. In such a case, the nested @code{\score} block must contain a @code{\layout} block, as demonstrated here: -@lilypond[quote,verbatim,relative=1] -c4 d^\markup { - \score { - \relative { c'4 d e f } - \layout { } +@lilypond[quote,verbatim] +\relative { + c'4 d^\markup { + \score { + \relative { c'4 d e f } + \layout { } + } } + e f | + c d e f } -e f | -c d e f @end lilypond An exhaustive list of music notation related commands can be found in @@ -1378,8 +1425,8 @@ ordered in several families. The following syntax allows various LilyPond @code{feta} non-text fonts to be used directly in markup mode: -@lilypond[quote,verbatim,relative=2] -a1^\markup { +@lilypond[quote,verbatim,fragment] +a'1^\markup { \vcenter { \override #'(font-encoding . fetaBraces) \lookup #"brace120" @@ -1422,14 +1469,14 @@ example demonstrates the ability to select alternate families, shapes, series and sizes. The value supplied to @code{font-size} is the required change from the default size. -@lilypond[quote,verbatim,relative=2] +@lilypond[quote,verbatim,fragment] \override Score.RehearsalMark.font-family = #'typewriter \mark \markup "Ouverture" \override Voice.TextScript.font-shape = #'italic \override Voice.TextScript.font-series = #'bold -d2.^\markup "Allegro" +d''2.^\markup "Allegro" \override Voice.TextScript.font-size = #-3 -c4^smaller +c''4^smaller @end lilypond @noindent @@ -1478,12 +1525,12 @@ Notation Reference: Any font that is installed on the operating system and recognized by FontConfig may be used in a score, using the following syntax: -@lilypond[quote,verbatim,relative=2] +@lilypond[quote,verbatim,fragment] \override Staff.TimeSignature.font-name = #"Bitstream Charter" \override Staff.TimeSignature.font-size = #2 \time 3/4 -a1_\markup { +a'1_\markup { \override #'(font-name . "Vera Bold") { Vera Bold } } diff --git a/Documentation/notation/unfretted-strings.itely b/Documentation/notation/unfretted-strings.itely index 4a48d5c97a..b0868bc76f 100644 --- a/Documentation/notation/unfretted-strings.itely +++ b/Documentation/notation/unfretted-strings.itely @@ -100,8 +100,8 @@ described in @ref{Articulations and ornamentations}. The bowing commands, @code{\upbow} and @code{\downbow}, are used with slurs as follows: -@lilypond[verbatim,quote,relative=2] -c4(\downbow d) e(\upbow f) +@lilypond[verbatim,quote] +\relative { c''4(\downbow d) e(\upbow f) } @end lilypond @noindent @@ -114,11 +114,11 @@ Alternatively, string indications may be printed using markup commands; articulation scripts may also indicate open strings. -@lilypond[verbatim,quote,relative=2] -a4 \open +@lilypond[verbatim,quote,fragment] +a'4 \open \romanStringNumbers -a\2 -a2^\markup { \small "sul A" } +a'\2 +a'2^\markup { \small "sul A" } @end lilypond @@ -154,21 +154,23 @@ Natural harmonics can be notated in several ways. A diamond-shaped note head generally means to touch the string where you would stop the note if it were not a diamond. -@lilypond[verbatim,quote,relative=2] -d4 e4. -\harmonicsOn -d8 e e -d4 e4. -\harmonicsOff -d8 e e +@lilypond[verbatim,quote] +\relative d'' { + d4 e4. + \harmonicsOn + d8 e e + d4 e4. + \harmonicsOff + d8 e e +} @end lilypond Alternatively a normal note head is shown at the pitch to be sounded together with a small circle to indicate it should be played as a harmonic: -@lilypond[verbatim,quote,relative=2] -d2^\flageolet d_\flageolet +@lilypond[verbatim,quote,fragment] +d''2^\flageolet d''_\flageolet @end lilypond A smaller circle may be created, see the snippet list in @@ -188,10 +190,12 @@ Artificial harmonics indicated with @code{\harmonic} do not show the dots. The context property @code{harmonicDots} should be set if dots are required. -@lilypond[verbatim,quote,relative=1] -<e a\harmonic>2. <c g'\harmonic>4 -\set harmonicDots = ##t -<e a\harmonic>2. <c g'\harmonic>4 +@lilypond[verbatim,quote] +\relative e' { + <e a\harmonic>2. <c g'\harmonic>4 + \set harmonicDots = ##t + <e a\harmonic>2. <c g'\harmonic>4 +} @end lilypond @warning{@code{@bs{}harmonic} @strong{must} be placed inside a @@ -219,11 +223,13 @@ A @notation{snap pizzicato} (also known as @qq{Bartok pizz}) is a type of pizzicato where the string is deliberately plucked upwards (rather than sideways) such that it hits the fingerboard. -@lilypond[verbatim,quote,relative=1] -c4\snappizzicato -<c' e g>4\snappizzicato -<c' e g>4^\snappizzicato -<c, e g>4_\snappizzicato +@lilypond[verbatim,quote] +\relative { + c'4\snappizzicato + <c' e g>4\snappizzicato + <c' e g>4^\snappizzicato + <c, e g>4_\snappizzicato +} @end lilypond diff --git a/Documentation/notation/vocal.itely b/Documentation/notation/vocal.itely index 4f77e7a969..b06de6f40b 100644 --- a/Documentation/notation/vocal.itely +++ b/Documentation/notation/vocal.itely @@ -384,10 +384,10 @@ Lyrics can be aligned under a melody automatically by specifying the named Voice context containing the melody with @code{\lyricsto}: -@lilypond[quote,verbatim,relative=2] +@lilypond[quote,verbatim] << - \new Voice = "melody" { - a1 a4. a8 a2 + \new Voice = "melody" \relative { + a'1 a4. a8 a2 } \new Lyrics \lyricsto "melody" { These are the words @@ -519,10 +519,10 @@ associated voice. Here are two examples: -@lilypond[relative=1,verbatim,quote] +@lilypond[verbatim,quote] << - \new Voice = "melody" { - c'2 a f f e e + \new Voice = "melody" \relative { + c''2 a f f e e } \new Lyrics \lyricmode { c4. -- a -- f -- f -- e2. -- e @@ -559,11 +559,11 @@ This technique is useful when writing dialogue over music, see To change syllable alignment, simply override the @code{self-alignment-X} property: -@lilypond[relative=1,verbatim,quote] +@lilypond[verbatim,quote] << - \new Voice = "melody" { + \new Voice = "melody" \relative { \time 3/4 - c2 e4 g2 f + c'2 e4 g2 f } \new Lyrics \lyricmode { \override LyricText.self-alignment-X = #LEFT @@ -594,10 +594,11 @@ spaces between the syllables, you can surround the phrase with quotes or use a @code{_} character. Alternatively, you can use the tilde symbol (@code{~}) to get a lyric tie. -@lilypond[quote,ragged-right,verbatim,relative=2] +@lilypond[quote,ragged-right,verbatim] { - { \autoBeamOff - r8 b c fis, fis c' b e, + \relative { + \autoBeamOff + r8 b' c fis, fis c' b e, } \addlyrics { @@ -646,11 +647,11 @@ There are five ways in which melismata can be indicated: Melismata are created automatically over notes which are tied together: -@lilypond[quote,relative=2,verbatim] +@lilypond[quote,verbatim] << - \new Voice = "melody" { + \new Voice = "melody" \relative { \time 3/4 - f4 g2 ~ | + f''4 g2 ~ | 4 e2 ~ | 8 } @@ -665,11 +666,11 @@ Melismata can be created automatically from the music by placing slurs over the notes of each melisma. This is the usual way of entering lyrics: -@lilypond[quote,relative=2,verbatim] +@lilypond[quote,verbatim] << - \new Voice = "melody" { + \new Voice = "melody" \relative { \time 3/4 - f4 g8 ( f e f ) + f''4 g8 ( f e f ) e8 ( d e2 ) } \new Lyrics \lyricsto "melody" { @@ -685,12 +686,12 @@ Notes are considered a melisma if they are manually beamed, providing automatic beaming is switched off. See @ref{Setting automatic beam behavior}. -@lilypond[quote,relative=2,verbatim] +@lilypond[quote,verbatim] << - \new Voice = "melody" { + \new Voice = "melody" \relative { \time 3/4 \autoBeamOff - f4 g8[ f e f] + f''4 g8[ f e f] e2. } \new Lyrics \lyricsto "melody" { @@ -706,11 +707,11 @@ than eighth notes. An unslurred group of notes will be treated as a melisma if they are bracketed between @code{\melisma} and @code{\melismaEnd}. -@lilypond[quote,relative=2,verbatim] +@lilypond[quote,verbatim] << - \new Voice = "melody" { + \new Voice = "melody" \relative { \time 3/4 - f4 g8 + f''4 g8 \melisma f e f \melismaEnd @@ -727,11 +728,11 @@ A melisma can be defined entirely in the lyrics by entering a single underscore character, @code{_}, for every extra note that has to be added to the melisma. -@lilypond[verbatim, quote, relative=2] +@lilypond[verbatim, quote] << - \new Voice = "melody" { + \new Voice = "melody" \relative { \time 3/4 - f4 g8 f e f + f''4 g8 f e f e8 d e2 } \new Lyrics \lyricsto "melody" { @@ -746,12 +747,12 @@ It is possible to have ties, slurs and manual beams in the melody without their indicating melismata. To do this, set @code{melismaBusyProperties}: -@lilypond[relative=1,verbatim,quote] +@lilypond[verbatim,quote] << - \new Voice = "melody" { + \new Voice = "melody" \relative { \time 3/4 \set melismaBusyProperties = #'() - c4 d ( e ) + c'4 d ( e ) g8 [ f ] f4 ~ 4 } \new Lyrics \lyricsto "melody" { @@ -774,12 +775,12 @@ If a melisma is required during a passage in which placing a single underscore in the lyrics for each note which should be included in the melisma: -@lilypond[relative=1,verbatim,quote] +@lilypond[verbatim,quote] << - \new Voice = "melody" { + \new Voice = "melody" \relative { \time 3/4 \set melismaBusyProperties = #'() - c4 d ( e ) + c'4 d ( e ) g8 [ f ] ~ 4 ~ f } \new Lyrics \lyricsto "melody" { @@ -1096,8 +1097,8 @@ Notation Reference: To increase the spacing between lyrics, set the @code{minimum-distance} property of @code{LyricSpace}. -@lilypond[relative=1,verbatim,quote,ragged-right] -{ +@lilypond[verbatim,quote,ragged-right] +\relative c' { c c c c \override Lyrics.LyricSpace.minimum-distance = #1.0 c c c c @@ -1757,9 +1758,9 @@ words = \lyricmode { la __ la __ } Stanza numbers can be added by setting @code{stanza}, e.g., -@lilypond[quote,ragged-right,verbatim,relative=2] -\new Voice { - \time 3/4 g2 e4 a2 f4 g2. +@lilypond[quote,ragged-right,verbatim] +\new Voice \relative { + \time 3/4 g'2 e4 a2 f4 g2. } \addlyrics { \set stanza = #"1. " Hi, my name is Bert. @@ -1842,9 +1843,9 @@ the line, just like instrument names. They are created by setting @code{vocalName}. A short version may be entered as @code{shortVocalName}. -@lilypond[ragged-right,quote,verbatim,relative=2] -\new Voice { - \time 3/4 g2 e4 a2 f4 g2. +@lilypond[ragged-right,quote,verbatim] +\new Voice \relative { + \time 3/4 g'2 e4 a2 f4 g2. } \addlyrics { \set vocalName = #"Bert " Hi, my name is Bert. @@ -2573,16 +2574,18 @@ usually printed above the staff at the start of every section applying to that character. This can be done with markup. Often a specific font is used for this purpose. -@lilypond[quote,verbatim,relative=1] -\clef "G_8" -c4^\markup \fontsize #1 \smallCaps Kaspar -c c c -\clef "bass" -a4^\markup \fontsize #1 \smallCaps Melchior -a a a -\clef "G_8" -c4^\markup \fontsize #1 \smallCaps Kaspar -c c c +@lilypond[quote,verbatim] +\relative c' { + \clef "G_8" + c4^\markup \fontsize #1 \smallCaps Kaspar + c c c + \clef "bass" + a4^\markup \fontsize #1 \smallCaps Melchior + a a a + \clef "G_8" + c4^\markup \fontsize #1 \smallCaps Kaspar + c c c +} @end lilypond Alternatively, if there are many character changes, it may be easier @@ -2772,10 +2775,12 @@ moment. For short interjections a simple markup suffices. -@lilypond[quote,verbatim,relative=2] -a4^\markup { \smallCaps { Alex - } \italic { He's gone } } a a a -a4 a a^\markup { \smallCaps { Bethan - } \italic Where? } a -a4 a a a +@lilypond[quote,verbatim] +\relative { + a'4^\markup { \smallCaps { Alex - } \italic { He's gone } } a a a + a4 a a^\markup { \smallCaps { Bethan - } \italic Where? } a + a4 a a a +} @end lilypond For longer phrases it may be necessary to expand the music to make @@ -2955,34 +2960,38 @@ To remove bar lines from just a section of music treat it as a cadenza. If the section is long you may need to insert dummy bar lines with @code{\bar ""} to show where the line should break. -@lilypond[verbatim,quote,relative=2] -a4 b c2 | -\cadenzaOn -a4 b c2 -a4 b c2 -\bar "" -a4 b c2 -a4 b c2 -\cadenzaOff -a4 b c2 | -a4 b c2 | +@lilypond[verbatim,quote] +\relative a' { + a4 b c2 | + \cadenzaOn + a4 b c2 + a4 b c2 + \bar "" + a4 b c2 + a4 b c2 + \cadenzaOff + a4 b c2 | + a4 b c2 | +} @end lilypond Rests or pauses in chants can be indicated by modified bar lines. -@lilypond[verbatim, quote,relative=2] -a4 -\cadenzaOn -b c2 -a4 b c2 -\bar "'" -a4 b c2 -a4 b c2 -\bar ";" -a4 b c2 -\bar "!" -a4 b c2 -\bar "||" +@lilypond[verbatim, quote] +\relative a' { + a4 + \cadenzaOn + b c2 + a4 b c2 + \bar "'" + a4 b c2 + a4 b c2 + \bar ";" + a4 b c2 + \bar "!" + a4 b c2 + \bar "||" +} @end lilypond Alternatively, the notation used in Gregorian chant for pauses or diff --git a/Documentation/notation/wind.itely b/Documentation/notation/wind.itely index c540b204d2..3d518817ae 100644 --- a/Documentation/notation/wind.itely +++ b/Documentation/notation/wind.itely @@ -272,8 +272,8 @@ for specific notes and are available for the following instruments: Woodwind diagrams are created as markups: -@lilypond[verbatim,quote,relative=2] -c1^\markup { +@lilypond[verbatim,quote,fragment] +c''1^\markup { \woodwind-diagram #'piccolo #'((lh . (gis)) (cc . (one three)) (rh . (ees))) @@ -282,9 +282,9 @@ c1^\markup { Keys can be open, partially-covered, ring-depressed, or fully covered: -@lilypond[verbatim,quote,relative=2] +@lilypond[verbatim,quote,fragment] \textLengthOn -c1^\markup { +c''1^\markup { \center-column { "one quarter" \woodwind-diagram #'flute #'((cc . (one1q)) @@ -293,7 +293,7 @@ c1^\markup { } } -c1^\markup { +c''1^\markup { \center-column { "one half" \woodwind-diagram #'flute #'((cc . (one1h)) @@ -302,7 +302,7 @@ c1^\markup { } } -c1^\markup { +c''1^\markup { \center-column { "three quarter" \woodwind-diagram #'flute #'((cc . (one3q)) @@ -311,7 +311,7 @@ c1^\markup { } } -c1^\markup { +c''1^\markup { \center-column { "ring" \woodwind-diagram #'flute #'((cc . (oneR)) @@ -320,7 +320,7 @@ c1^\markup { } } -c1^\markup { +c''1^\markup { \center-column { "full" \woodwind-diagram #'flute #'((cc . (oneF two)) @@ -332,8 +332,8 @@ c1^\markup { Trills are indicated as shaded keys: -@lilypond[verbatim,quote,relative=2] -c1^\markup { +@lilypond[verbatim,quote,fragment] +c''1^\markup { \woodwind-diagram #'bass-clarinet #'((cc . (threeT four)) (lh . ()) @@ -343,9 +343,9 @@ c1^\markup { A variety of trills can be displayed: -@lilypond[verbatim,quote,relative=2] +@lilypond[verbatim,quote,fragment] \textLengthOn -c1^\markup { +c''1^\markup { \center-column { "one quarter to ring" \woodwind-diagram #'flute #'((cc . (one1qTR)) @@ -354,7 +354,7 @@ c1^\markup { } } -c1^\markup { +c''1^\markup { \center-column { "ring to shut" \woodwind-diagram #'flute #'((cc . (oneTR)) @@ -363,7 +363,7 @@ c1^\markup { } } -c1^\markup { +c''1^\markup { \center-column { "ring to open" \woodwind-diagram #'flute #'((cc . (oneRT)) @@ -372,7 +372,7 @@ c1^\markup { } } -c1^\markup { +c''1^\markup { \center-column { "open to shut" \woodwind-diagram #'flute #'((cc . (oneT)) @@ -381,7 +381,7 @@ c1^\markup { } } -c1^\markup { +c''1^\markup { \center-column { "one quarter to three quarters" \woodwind-diagram #'flute #'((cc . (one1qT3q)) diff --git a/Documentation/usage/running.itely b/Documentation/usage/running.itely index fab28a6297..864f90555f 100644 --- a/Documentation/usage/running.itely +++ b/Documentation/usage/running.itely @@ -1060,9 +1060,9 @@ would cause all note heads within the following staff to be colored red, but in fact it results in two staves with the note heads remaining the default black in the lower staff. -@lilypond[quote,verbatim,relative=2] +@lilypond[quote,verbatim,fragment] \override Staff.NoteHead.color = #red -\new Staff { a } +\new Staff { a' } @end lilypond This is because a @code{Staff} context does not exist when the @@ -1071,10 +1071,10 @@ is applied to it, but then the @code{\new Staff} command creates another, separate, staff into which the notes are placed. The correct code to color all note heads red is -@lilypond[quote,verbatim,relative=2] +@lilypond[quote,verbatim] \new Staff { \override Staff.NoteHead.color = #red - a + a' } @end lilypond |