The LilyPond Snippet Repository ♪♫

What's this? Searching the LSR Browse by date Contributing Snippet database Browsing items 250−259 out of 949

Consecutive tremolos

Typing music for many consecutive tremolos with the same base duration becomes tedious. This is a function to make this easier.

By default LilyPond does not unfold tremolo repeats for midi. A function for unfolding only tremolo repeats is also included.

Consecutive tremolos

Consistently left-aligned bar numbers

When left-aligning bar numbers, overlapping problems may occur with staff brackets.

The snippet solves this by keeping the first bar number right-aligned that follows a line break.

Consistently left-aligned bar numbers

Contemporary glissando

A contemporary glissando without a final note can be typeset using a hidden note and cadenza timing.

Contemporary glissando

Contemporary glissando 2

A contemporary glissando without a final note can be typeset using a hidden note and duration scaling.

Contemporary glissando 2

Controlling beam damping

The angle (damping) of the beams can be modified. In the following example, various settings are demonstrated.

Controlling beam damping

Controlling formatting of prefatory items

This example demonstrates how to place prefatory items (such as the clef and key signature) at the end of a line.

Controlling formatting of prefatory items

Controlling of the pitch range in a score

Here is a set of 4 functions to check or modify the pitch range in a piece of music.

  \correctOctave
  \correctOctaveOutOfRange
  \colorizeOutOfRange
  \parenthesizeOutOfRange

Here is the code of each Staff.

  \music                                 % staff 1
  \correctOctave #'above g'' \music      % staff 2
  \correctOctave #'below g' \music       % staff 3
  \correctOctaveOutOfRange g' g'' \music % staff 4
  \colorizeOutOfRange g' g'' \music      % staff 5
  \parenthesizeOutOfRange g' g'' \music  % staff 6

Controlling of the pitch range in a score

Controlling spanner visibility after a line break

The visibility of spanners which end on the first note following a line break is controlled by the after-line-breaking callback ly:spanner::kill-zero-spanned-time.

For objects such as glissandos and hairpins, the default behaviour is to hide the spanner after a break; disabling the callback will allow the left-broken span to be shown.

Conversely, spanners which are usually visible, such as text spans, can be hidden by enabling the callback.

Controlling spanner visibility after a line break

Controlling the appearance of tremolo slashes

Using various properties of the StemTremolo grob it is possible to control the appearance of tremolo slashes.

Controlling the appearance of tremolo slashes

Controlling the placement of chord fingerings

<p>The placement of fingering numbers can be controlled precisely by using the property <code>fingeringOrientation</code>. For fingering orientation to apply, the fingering command must be used within a chord construct (<code>&lt;...&gt;</code>), even for single notes. Orientation for string numbers and right-hand fingerings may be controlled in a similar way by using the properties <code>stringNumberOrientation</code> and <code>strokeFingerOrientation</code>, respectively.</p> <p>These properties can be set to a list of one to three values. They control whether fingerings may be placed above (if <code>up</code> appears in the list), below (if <code>down</code> appears), to the left (if <code>left</code> appears), or to the right (if <code>right</code> appears). Conversely, if a location is not listed, no fingering is placed there. LilyPond takes these constraints and works out the best placement for the fingering of the notes of the following chords. Note that <code>left</code> and <code>right</code> are mutually exclusive – fingerings may be placed only on one side or the other, not both.</p>

Controlling the placement of chord fingerings

⇦ Previous 21 22 23 24 25 26 27 28 29 30 Next ⇨