The LilyPond Snippet Repository ♪♫

What's this? Searching the LSR Browse by title Contributing Snippet database Browsing items 180−189 out of 940

Changing the size of layout objects

The font-size property can be set directly, so that only certain layout objects are affected.

Changing the size of layout objects

Gregorian scripts

Here is demonstrated a preliminary support of Gregorian Scripts: ictus, circulus, semicirculus, accentus, episem.

Gregorian scripts

How to add text marks at the end of a line

By default, rehearsal marks specified at the end of a line are printed at the beginning of the next line (even if it is the end of the piece, in such case the mark isn't printed at all). To avoid this, override the #'break-visibility property of the RehearsalMark object, like in the following snippet.

How to add text marks at the end of a line

How to print a classical trill combining acciaccatura, TrillSpan and afterGrace

Here is an excerpt of Mozart's KV545 piano Sonata (as brought to Mutopia by A. Sierra), in which you can see the typical classical trill, i.e. beginning with an acciaccatura, then trilling the whole bar, and ending with two afterGrace notes. This combination, which is rather frequent (if not systematic) in classical piano music, requires a rather precise typesetting: first the \acciaccatura, then the \afterGrace (which you have to define using Scheme-like syntax), then the main note, the TrillSpan and the two final notes (don't forget the curly braces here). You can also notice here the \slurDown, which avoids slurs collision.

How to print a classical trill combining acciaccatura, TrillSpan and afterGrace

Demonstrating LilyPond support for figured bass

This snippet demonstrates how figured bass is supported in LilyPond. In addition to the numerous BassFigure objects available, you can always use text markups instead to get precisely what you need.

All of these examples are to be found in the relevant sections of the Notation Reference, where you will learn how to add a figured bass with simple but powerful notation.

Demonstrating LilyPond support for figured bass

Adding a figured bass above or below the notes

When writing a figured bass, you can place the figures above or below the bass notes, by defining the BassFigureAlignmentPositioning.direction property (exclusively in a Staff context). Choices are #UP (or #1), #CENTER (or #0) and #DOWN (or #-1).

This property can be changed as many times as you wish. Use \once \override if you don't want the override to apply to the whole score.

Adding a figured bass above or below the notes

Dashed slurs indicating optional slurs between lyric lines

This is a technique that may aid in typesetting verses with very similar melodies stacked on top of each other. Dashed slurs can be used to indicate that two notes are sung separately in one verse and slurred together in another.

Notice that the slurred notes are declared twice: once in the main voice and again in the second voice, where they are hidden. It is these two hidden notes that are connected with a dashed slur, leaving the notes in the main voice free to align with any lyrics. The thickness of the slur is also increased, to aid visibility.

To align the lyrics to the correct notes, place \skip instructions where lyrics should not be placed. The snippet demonstrates that in the \lyricsto mode durations are ignored, so the argument to the \skip command is arbitrary; it will always skip the next note opportunity.

Ideally, this solution can be developed into a music function of its own that takes the notes to be slurred as an argument.

Dashed slurs indicating optional slurs between lyric lines

Inserting a \markup when using chordmode

A way to insert a \markup { . . . } string in \chords { . . . }.

Inserting a \markup when using chordmode

Strict beat beaming

Beamlets can be set to point in the direction of the beat to which they belong. The first beam avoids sticking out flags (the default); the second beam strictly follows the beat.

Strict beat beaming

Using a tick as the breath mark symbol

Vocal and wind music frequently uses a tick mark as a breathing sign. This indicates a breath that subtracts a little time from the previous note rather than causing a short pause, which is indicated by the comma breath mark. The mark can be moved up a little to take it away from the stave.

Using a tick as the breath mark symbol

⇦ Previous 11 12 13 14 15 16 17 18 19 20 Next ⇨