The LilyPond Snippet Repository ♪♫

What's this? Searching the LSR Browse Contributing Snippet database

Results 1−10 of 231 for clef

Using non-standard clef positions and adding customized clef definitions [0.50000]

Using non-standard clef positions and adding customized clef definitions

…of pre-defined clefs, all of which show the clef symbol on some staff line. If you need … …For example, a value of 1 means the clef is shown between the center line and the line above, 4 means the clef is shown on the top line, -2 means …

…and as a new definition" } % manually setting all clef properties is one possibility: myclef = { \set Staff.clefGlyph = … …c c c } >> \context Staff = "ClefDef" \with { instrumentName = "Clef definition" } << \clef myCustomClef \relative c' { c4 c c c } >> >> \paper { …

Using non-standard clef positions and adding customized clef definitions

Combining pedal notes with clef changes [0.42857]

Combining pedal notes with clef changes

…a held (pedal) note is followed by a clef change and further polyphonic notation. With a little … …s L'Isle joyeuse in which the bass clef is faked. Finally, the fourth figure shows the … …pedal note is preceded by a small cautionary clef printed after the barline.

…di.unimi.it/LSR/Item?id=326 % Treble clef with properties of bass clef fakeTrebleClef = { \set Staff.… …clef properties \revert Score.BreakAlignment.break-align-orders \revert Staff.Clef.font-size \revert Staff.Clef.full-size-change } \tag #'midi { c,, ~ | c ~ | c ~ | c | } } >> } >> \…

Combining pedal notes with clef changes

Adding instrument name and clef change to cue notes [0.42857]

Adding instrument name and clef change to cue notes

…the cue notes to be in a different clef than the quoting voice. To be able to … …have to manually give the instrument name and clef of the quoting voice, because otherwise the function … …me how to set the instrument name and clef for a quoted voice automatically.

…cuemusic #} ) % set the cue instrument name and clef setClefCue = #(define-music-function (instr clef) (string? string?) #{ \… …1" #"Sop." { R1*2 } c2 c \bar"||" \clef "bass" c,,2 c | \cleffedCueDuring #"vIQuote" #1 … …the voice to be quoted vI = \relative c'' { \clef "treble" f2 f | f f | f f | f …

Adding instrument name and clef change to cue notes

Using the high bass clef [0.42857]

Using the high bass clef

The high bass clef looks exactly the same as the standard bass … …when you switch back to using the treble clef - but this method makes transposing of a … …complex than the usage of the high bass clef .

…c'1 \tag #'HornClefChanges { % the High Bass Clef _with_ Editoral Annotation \clef "bass^[8]" % As it'… …is still using the old-fashioned high bass clef." } } } \clef treble \MusicInF } { s4*0^"sounds as" \clef bass \transpose c f, \removeWithTag #'HornClefChanges \MusicInF } >>

Using the high bass clef

Clef change at the beginning of a piece [0.41964]

Clef change at the beginning of a piece

When changing the clef at the beginning of the first measure, Lilypond … …staff. This is how to keep the staff clef and add an extra clef after the time signature and before the first …

…old-stencil) (ly:stencil-combine-at-edge old-stencil X RIGHT (ly:text-interface::print grob))) trebleToBass = { \clef bass % Fake staff clef appearance \once \override Staff.… …d e f % This should not be visible \clef bass g a b c % This should be visible \clef treble d e f g }

Clef change at the beginning of a piece

Tweaking clef properties [0.41741]

Tweaking clef properties

Changing the clef glyph, its position, or the ottavation does not … …the clefGlyph, clefPosition (the vertical position of the clef itself on the staff), middleCPosition, and clefTransposition. Note … …these properties (except middleCPosition) are changed a new clef symbol is printed. The following examples show the …

{ % The default treble clef \key f \major c'1 % The standard bass … …1 \key f \major c'1 % A non-standard clef \set Staff.clefPosition = 0 \set Staff.clefTransposition = 0 \… …key g \major c'1 \break % The following clef changes do not preserve % the normal relationship between …

Tweaking clef properties

Clef change at the beginning of a piece (alternative) [0.41518]

Clef change at the beginning of a piece (alternative)

When changing the clef at the beginning of the first measure, Lilypond … …staff. This is how to keep the staff clef and add an extra clef after the time signature and before the first …

…id=792 \relative c' { %% Start with a bass clef : \clef bass %% Use a hidden grace note: \… …c64 %% Adjust the clef spacing: \once\override Staff.Clef.X-extent = #'(1 . 2) %% Put in the treble clef: \clef treble c4 c c c | c1 }

Clef change at the beginning of a piece (alternative)

Printing both the ancient and the modern clef in vocal music [0.41071]

Printing both the ancient and the modern clef in vocal music

…for each voice. In modern editions, the modern clef is printed but sometimes it is preceded by … …it in LilyPond: you have to replace the clef symbol by a \markup block, and that can … …command: it is used to place the C clef properly on the staff.

…Item?id=370 \relative c' { \once \override Staff.Clef.stencil = #ly:text-interface::print \once \override Staff.Clef.text = \markup { \… …C_change" \musicglyph "clefs.G" } \once \override Staff.Clef.X-extent = #'(0 . 6) \clef treble a' b c d \break b c …

Printing both the ancient and the modern clef in vocal music

Forcing a clef symbol to be displayed [0.40625]

Forcing a clef symbol to be displayed

When a clef sign has already been displayed and it has … …LilyPond, since it is not a change of clef. It is possible to force the clef to be redisplayed using the command \set Staff.…

\relative c' { \clef treble c1 \clef treble c1 \set Staff.forceClef = ##t c1 \clef treble c1 }

Forcing a clef symbol to be displayed

Creating a custom clef glyph [0.39286]

Creating a custom clef glyph

This snippet shows how to print a new clef glyph - here an old style bass clef - with a path encoding (support svg output).

…cons -1.3 1)) \layout { \context { \Score \override Clef.stencil = #(lambda (grob) (let* ((sz (ly:grob-property grob '… …F f^"cue" } >> } \new Staff { \clef F c1 \clef G c' \clef "F^8" c' f } >>

Creating a custom clef glyph

1 2 3 4 5 6 7 8 9 10 Next ⇨