From: James Lowe Date: Thu, 26 Jun 2014 21:37:04 +0000 (+0100) Subject: Doc: NR Pitches.itely - Clef - updated snippets and text X-Git-Tag: release/2.19.14-1~13 X-Git-Url: https://git.donarmstrong.com/?p=lilypond.git;a=commitdiff_plain;h=a1c9c3d285a2f3e59cf79a375b67cfb58ceca7ba Doc: NR Pitches.itely - Clef - updated snippets and text Issue 3976 Added 2 new snippets: 1 snippet added to NR 1 snippet added just to Snippets Modified 1 existing snippet: This was already (and still is) included in the NR Deleted 2 snippets (and incorporated them in the main text in @lilyponds) Added new @lilypond example that was originally described (but not show)n in the 'Tweaking Clef Properties' snippet to show how to remove the clef glyph from the end of a line. As this 'tweak' is relatively simple (a single \set and \unset) and more than likely to be used (IMHO) by the general user than the listed items in the snippet, I thought it better to be in the NR than another example in either an already long snippet or by creating yet another snippet. Some minor linelength formatting as per CG. --- diff --git a/Documentation/fr/notation/pitches.itely b/Documentation/fr/notation/pitches.itely index 6b4ac61178..06c9908e34 100644 --- a/Documentation/fr/notation/pitches.itely +++ b/Documentation/fr/notation/pitches.itely @@ -1163,12 +1163,6 @@ Les hauteurs seront affichées comme si l'argument numérique n'avait pas été encadré de parenthèses ou crochets. @snippets -@lilypondfile[verbatim,quote,texidoc,doctitle] -{forcing-a-clef-symbol-to-be-displayed.ly} - -@lilypondfile[verbatim,quote,texidoc,doctitle] -{keep-change-clefs-full-sized.ly} - @lilypondfile[verbatim,quote,texidoc,doctitle] {tweaking-clef-properties.ly} diff --git a/Documentation/notation/pitches.itely b/Documentation/notation/pitches.itely index e11a4fb1f3..60fb0cc443 100644 --- a/Documentation/notation/pitches.itely +++ b/Documentation/notation/pitches.itely @@ -1180,13 +1180,60 @@ c2 c The pitches are displayed as if the numeric argument were given without parentheses/brackets. -@snippets -@lilypondfile[verbatim,quote,texidoc,doctitle] -{forcing-a-clef-symbol-to-be-displayed.ly} +By default, a clef change taking place at a line break will cause +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. -@lilypondfile[verbatim,quote,texidoc,doctitle] -{keep-change-clefs-full-sized.ly} +@lilypond[verbatim,quote,relative=1] +\clef treble { c2 c } \break +\clef bass { c2 c } \break +\clef alto + \set Staff.explicitClefVisibility = #end-of-line-invisible + { c2 c } \break + \unset Staff.explicitClefVisibility +\clef bass { c2 c } \break +@end lilypond +By default, a clef that has previously been printed will not be +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] + \clef treble + c1 + \clef treble + c1 + \set Staff.forceClef = ##t + c1 + \clef treble + c1 +@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] + \clef "treble" + c1 + \clef "bass" + c1 + \clef "treble" + c1 + \override Staff.Clef.full-size-change = ##t + \clef "bass" + c1 + \clef "treble" + c1 + \revert Staff.Clef.full-size-change + \clef "bass" + c1 + \clef "treble" + c1 +@end lilypond + +@snippets @lilypondfile[verbatim,quote,texidoc,doctitle] {tweaking-clef-properties.ly} @@ -1199,7 +1246,7 @@ Notation Reference: @ref{Formatting cue notes}. Installed Files: -@file{../scm/parser-clef.scm}. +@file{scm/parser-clef.scm}. Snippets: @rlsr{Pitches}. @@ -1211,10 +1258,10 @@ Internals Reference: @rinternals{clef-interface}. @knownissues -Ottavation numbers attached to clefs are treated as separate 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. +Ottavation numbers attached to clefs are treated as separate +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] \new Staff \with { @@ -1336,6 +1383,7 @@ position. @lilypondfile[verbatim,quote,texidoc,doctitle] {non-traditional-key-signatures.ly} + @seealso Music Glossary: @rglos{church mode}, @@ -1394,6 +1442,9 @@ a2 b @lilypondfile[verbatim,quote,texidoc,doctitle] {adding-an-ottava-marking-to-a-single-voice.ly} +@lilypondfile[verbatim,quote,texidoc,doctitle] +{modifying-the-ottava-spanner-slope.ly} + @seealso Music Glossary: @rglos{octavation}. diff --git a/Documentation/snippets/forcing-a-clef-symbol-to-be-displayed.ly b/Documentation/snippets/forcing-a-clef-symbol-to-be-displayed.ly deleted file mode 100644 index 7f0dcb1686..0000000000 --- a/Documentation/snippets/forcing-a-clef-symbol-to-be-displayed.ly +++ /dev/null @@ -1,32 +0,0 @@ -%% DO NOT EDIT this file manually; it is automatically -%% generated from LSR http://lsr.di.unimi.it -%% Make any changes in LSR itself, or in Documentation/snippets/new/ , -%% and then run scripts/auxiliar/makelsr.py -%% -%% This file is in the public domain. -\version "2.18.0" - -\header { - lsrtags = "pitches" - - texidoc = " -When a clef sign has already been displayed and it has not been changed -to a different clef, then repeating the @code{\\clef} command will be -ignored by LilyPond, since it is not a change of clef. It is possible -to force the clef to be redisplayed using the command @code{\\set -Staff.forceClef = ##t}. - -" - doctitle = "Forcing a clef symbol to be displayed" -} % begin verbatim - -\relative c' { - \clef treble - c1 - \clef treble - c1 - \set Staff.forceClef = ##t - c1 - \clef treble - c1 -} diff --git a/Documentation/snippets/keep-change-clefs-full-sized.ly b/Documentation/snippets/keep-change-clefs-full-sized.ly deleted file mode 100644 index 6d6ae87a8e..0000000000 --- a/Documentation/snippets/keep-change-clefs-full-sized.ly +++ /dev/null @@ -1,37 +0,0 @@ -%% DO NOT EDIT this file manually; it is automatically -%% generated from LSR http://lsr.di.unimi.it -%% Make any changes in LSR itself, or in Documentation/snippets/new/ , -%% and then run scripts/auxiliar/makelsr.py -%% -%% This file is in the public domain. -\version "2.18.0" - -\header { - lsrtags = "pitches, tweaks-and-overrides" - - texidoc = " -When a clef is changed, the clef sign displayed is smaller than the -initial clef. This can be overridden with @code{full-size-change}. - -" - doctitle = "Keep change clefs full sized" -} % begin verbatim - -\relative c' { - \clef "treble" - c1 - \clef "bass" - c1 - \clef "treble" - c1 - \override Staff.Clef.full-size-change = ##t - \clef "bass" - c1 - \clef "treble" - c1 - \revert Staff.Clef.full-size-change - \clef "bass" - c1 - \clef "treble" - c1 -} diff --git a/Documentation/snippets/new/creating-custom-key-signatures.ly b/Documentation/snippets/new/creating-custom-key-signatures.ly new file mode 100644 index 0000000000..eae99a9c8d --- /dev/null +++ b/Documentation/snippets/new/creating-custom-key-signatures.ly @@ -0,0 +1,36 @@ +\version "2.18.0" + +\header { + lsrtags = "tweaks-and-overrides, pitches, staff-notation, contexts-and-engravers" + + texidoc = " +LilyPond supports custom key signatures. In this example, print for D +minor with an extended range of printed flats. +" + doctitle = "Creating custom key signatures" +} + +\new Staff \with { + \override StaffSymbol.line-count = #8 + \override KeySignature.flat-positions = #'((-7 . 6)) + \override KeyCancellation.flat-positions = #'((-7 . 6)) + % presumably sharps are also printed in both octaves + \override KeySignature.sharp-positions = #'((-6 . 7)) + \override KeyCancellation.sharp-positions = #'((-6 . 7)) + + \override Clef.stencil = # + (lambda (grob)(grob-interpret-markup grob + #{ \markup\combine + \musicglyph #"clefs.C" + \translate #'(-3 . -2) + \musicglyph #"clefs.F" + #})) + clefPosition = #3 + middleCPosition = #3 + middleCClefPosition = #3 +} + +{ + \key d\minor + f bes, f bes, +} diff --git a/Documentation/snippets/new/modifying-the-ottava-spanner-slope.ly b/Documentation/snippets/new/modifying-the-ottava-spanner-slope.ly new file mode 100644 index 0000000000..bc9e4a48b5 --- /dev/null +++ b/Documentation/snippets/new/modifying-the-ottava-spanner-slope.ly @@ -0,0 +1,31 @@ +\version "2.18.0" + +\header { + lsrtags = "tweaks-and-overrides, pitches, staff-notation" + + texidoc = " +It is possible to change the slope of the Ottava spanner. + +" + doctitle = "Modifying the Ottava spanner slope" +} + +\relative c'' { + \override Staff.OttavaBracket.stencil = #ly:line-spanner::print + \override Staff.OttavaBracket.bound-details = + #`((left . ((Y . 0) ; Change the integer here + (attach-dir . ,LEFT) + (padding . 0) + (stencil-align-dir-y . ,CENTER))) + (right . ((Y . 5) ; Change the integer here + (padding . 0) + (attach-dir . ,RIGHT) + (text . ,(make-draw-dashed-line-markup (cons 0 -1.2)))))) + \override Staff.OttavaBracket.left-bound-info = + #ly:line-spanner::calc-left-bound-info-and-text + \override Staff.OttavaBracket.right-bound-info = + #ly:line-spanner::calc-right-bound-info + \ottava #1 + c1 + c'''1 +} diff --git a/Documentation/snippets/new/tweaking-clef-properties.ly b/Documentation/snippets/new/tweaking-clef-properties.ly new file mode 100644 index 0000000000..b9cdb2a33e --- /dev/null +++ b/Documentation/snippets/new/tweaking-clef-properties.ly @@ -0,0 +1,86 @@ +\version "2.17.18" + +\header { + lsrtags = "pitches, staff-notation, tweaks-and-overrides" + + texidoc = " +Changing the Clef glyph, its position, or the ottavation does not +change the position of subsequent notes on the staff. To get key +signatures on their correct staff lines @code{middleCClefPosition} +must also be specified, with positive or negative values moving +@emph{middle C} up or down respectively, relative to the staff's +center line. + +For example, @code{\\clef \"treble_8\"} is equivalent to setting +the @code{clefGlyph}, @code{clefPosition} (the vertical position +of the clef itself on the staff), @code{middleCPosition} and +@code{clefTransposition}. Note that when any of these properties +(except @code{middleCPosition}) are changed a new clef symbol is +printed. + +The following examples show the possibilities when setting these +properties manually. On the first line, the manual changes preserve the +standard relative positioning of clefs and notes, whereas on the second +line, they do not. + +" + doctitle = "Tweaking clef properties" +} % begin verbatim + +\layout { ragged-right = ##t } +{ + % The default treble clef + \key f \major + c'1 + % The standard bass clef + \set Staff.clefGlyph = #"clefs.F" + \set Staff.clefPosition = #2 + \set Staff.middleCPosition = #6 + \set Staff.middleCClefPosition = #6 + \key g \major + c'1 + % The baritone clef + \set Staff.clefGlyph = #"clefs.C" + \set Staff.clefPosition = #4 + \set Staff.middleCPosition = #4 + \set Staff.middleCClefPosition = #4 + \key f \major + c'1 + % The standard choral tenor clef + \set Staff.clefGlyph = #"clefs.G" + \set Staff.clefPosition = #-2 + \set Staff.clefTransposition = #-7 + \set Staff.middleCPosition = #1 + \set Staff.middleCClefPosition = #1 + \key f \major + c'1 + % A non-standard clef + \set Staff.clefPosition = #0 + \set Staff.clefTransposition = #0 + \set Staff.middleCPosition = #-4 + \set Staff.middleCClefPosition = #-4 + \key g \major + c'1 \break + + % The following clef changes do not preserve + % the normal relationship between notes, key signatures + % and clefs: + + \set Staff.clefGlyph = #"clefs.F" + \set Staff.clefPosition = #2 + c'1 + \set Staff.clefGlyph = #"clefs.G" + c'1 + \set Staff.clefGlyph = #"clefs.C" + c'1 + \set Staff.clefTransposition = #7 + c'1 + \set Staff.clefTransposition = #0 + \set Staff.clefPosition = #0 + c'1 + + % Return to the normal clef: + + \set Staff.middleCPosition = #0 + c'1 +}