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}
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}
@ref{Formatting cue notes}.
Installed Files:
-@file{../scm/parser-clef.scm}.
+@file{scm/parser-clef.scm}.
Snippets:
@rlsr{Pitches}.
@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 {
@lilypondfile[verbatim,quote,texidoc,doctitle]
{non-traditional-key-signatures.ly}
+
@seealso
Music Glossary:
@rglos{church mode},
@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}.
+++ /dev/null
-%% 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
-}
+++ /dev/null
-%% 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
-}
--- /dev/null
+\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,
+}
--- /dev/null
+\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
+}
--- /dev/null
+\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
+}