AAA-intro.ly

Introduction

This document shows examples from the LilyPond Snippet Repository.

In the web version of this document, you can click on the file name or figure for each example to see the corresponding input file.

[image of music]

adding-an-extra-staff.ly

You can add (possibly temporarily) an extra staff after the beginning of a piece.

[image of music]

aligning-instrument-names.ly

Instrument names can be displayed using a \markup command; in this case the name is placed inside a padded box, which can help vertical alignment.

[image of music]

changing-the-number-of-lines-in-a-staff.ly

The number of lines in a staff may changed by overriding line-count in the properties of StaffSymbol.

[image of music]

changing-the-staff-size.ly

In order to change staff sizes, both staff-space and fontSize must be scaled.

[image of music]

displaying-bar-numbers-on-all-measures.ly

By default, bar numbers are printed only in the first measure. This setting can be overridden, so that bar numbers appear on start of every measure.

[image of music]

how-to-add-text-marks-at-the-end-of-a-line.ly

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.

[image of music]

inserting-bar-lines-everywhere.ly

By setting barAlways and defaultBarType, barlines may be inserted automatically everywhere.

[image of music]

inserting-score-fragments-above-the-staff,-as-markups.ly

The \markup command is quite versatile. In this snippet, it contains a \score bloc instead of texts or marks.

[image of music]

making-bar-numbers-appear-at-regular-intervals.ly

If you would like the bar numbers to appear at regular intervals, but not starting from measure zero, you can use a context function, set-bar-number-visibility, to set automatically barNumberVisibility, so that the bar numbers appear at regular intervals, starting from the measure in which set-bar-number-visibility is set using \applycontext.

[image of music]

naming-a-whole-grandstaff.ly

You can have a name for the whole GrandStaff in addition to individual Staffs.

[image of music]

removing-the-key-signature-at-the-end-of-a-line.ly

According to normal typesetting conventions, LilyPond typesets key changes at the end of the line, when the change appears at a line break. This example shows how to change this default to only print the new key signature at the beginning of the next line.

[image of music]

staff-brackets.ly

Staffs can be nested in various combinations. Here, StaffGroup and ChoirStaff produce similar straight brackets, whereas GrandStaff produces curly brackets. In InnerStaffGroup and InnerChoirStaff, the brackets are shifted leftwards.

[image of music]

staff-containers.ly

In this preliminary test of a modern score, the staff lines are washed out temporarily. This is done by making a tuned StaffContainer, which \skips some notes without printing lines either and creates a ew Staff then in order to create the lines again. (Be careful if you use this; it has been done by splitting the grouping Axis_group_engraver and creating functionality into separate contexts, but the clefs and time signatures may not do what you would expect.)

[image of music]

staff-line-positions.ly

The vertical positions of staff lines may be specified individually, by setting the line-positions property of the StaffSymbol.

[image of music]

This page is for LilyPond-2.11.28 (development-branch).

Report errors to http://post.gmane.org/post.php?group=gmane.comp.gnu.lilypond.bugs.

Your suggestions for the documentation are welcome.