The LilyPond Snippet Repository ♪♫

What's this? Searching the LSR Browse by date Contributing Snippet database Browsing items 60−69 out of 838

Aligning objects created with the \mark command

By default the \mark command centers objects over a bar line. This behavior can be modified to align at right or left.

Aligning objects created with the \mark command

Aligning syllables with melisma

By default, lyrics syllables that start a melisma are left aligned on their note. The alignment can be altered using the lyricMelismaAlignment property.

Aligning syllables with melisma

Allowing fingerings to be printed inside the staff

By default, vertically oriented fingerings are positioned outside the staff. However, this behavior can be canceled. Note: you must use a chord construct <>, even if it is only a single note.

Allowing fingerings to be printed inside the staff

Alphabetical sorted index

Sometimes you may want to get an sorted index of the pieces contained in a book. Often the \table-of-content command does this job quite well.

However, the problem with it is, that it sorts always by page numbers. For books containing many songs it is common to have an index sorted by letters or topics.

Both is possible with this snippet. Its code takes the code of ./ly/toc-init.ly and defines three new commands \indexItem, \indexSection and \index. The first two are used to define index items, the last one will create the output.

\indexItem and \indexSection both take two arguments (string, markup). The first is used to calculate the order of the items in the output, the second one contains the markup that is actually printed.

\markuplines \index

\indexItem #"Berta" \markup "Berta"
\indexItem #"Clown" \markup "Clown"
\indexItem #"Adam" \markup "Adam"

By setting the first argument of \indexItem and \indexSection to a different value than the second it is possible to create heavily customized sorted indices. A topic based index can be achieved by:

\markuplines \index

\indexSection #"spring" \markup \smallCaps "Songs of Spring"
\indexItem #"spring - I Like the Flowers" \markup "I Like the Flowers"
\indexItem #"spring - Der Winter ist vergangen" \markup "Der Winter ist vergangen"

\indexSection #"rock" \markup \smallCaps "Rock Songs"
\indexItem #"rock - Stairway to Heaven" \markup "Stairway to heaven"
\indexItem #"rock - Nothing Else Matters" \markup "Nothing Else Matters"

Limitations:

It is not yet possible to create multiple indices, for example an alphabetical sorted and a topic based one.

To achieve that a few additions to the snippet are nessecary which I had not yet time to implement by now.

Alphabetical sorted index

Altering the length of beamed stems

Stem lengths on beamed notes can be varied by overriding the beamed-lengths property of the details of the Stem. If a single value is used as an argument, the length applies to all stems. When multiple arguments are used, the first applies to eighth notes, the second to sixteenth notes and so on. The final argument also applies to all notes shorter than the note length of the final argument. Non-integer arguments may also be used.

Altering the length of beamed stems

Altering the number of stems in a beam

You can alter the number of stems in a beam. In this example, two sets of four 32nds are joined, as if they were 8th notes.

Altering the number of stems in a beam

Altering the shape of a default slur with a list of offsets

If you want to adjust the shape of a slur, one way is to specify a new list of control-points. This function offers a different approach by allowing you to adjust existing control-points. This is done by entering a list of offsets (in staff spaces) to the default coordinates:

\shapeSlur #'(x1 y1 x2 y2 x3 y3 x4 y4)

Setting a value to 0 leaves the default coordinate unchanged, so it is easy to maintain a slur's attachment-points while changing its interior.

Altering the shape of a default slur with a list of offsets

Altering the shape of a default slur with a list of offsets [revised]

If you want to adjust the shape of a slur, one way is to specify a new list of control-points. This function offers a different approach by allowing you to adjust existing control-points. This is done by entering a list of offsets (in staff spaces) to the default coordinates:

\shapeSlur #'(x1 y1 x2 y2 x3 y3 x4 y4)

Setting a value to 0 leaves the default coordinate unchanged, so it is easy to maintain a slur's attachment-points while changing its interior.

This snippet is a revised version, by David Nalesnik, of the original (snippet 639).

Altering the shape of a default slur with a list of offsets [revised]

Alternate lyrics context for song sheets

When preparing song sheets, it's sometimes useful to have the lyrics of all the verses inside the score, correctly lined up to the notes. However, this makes it easy for the singer to mix up verses -- especially when changing systems. A common solution is to alternate the display properties of the lyric lines. This snippet demonstrates how to use such an approach in LilyPond.

Alternate lyrics context for song sheets

Alternating beam directions

The eighth notes may be seemingly attached to different beams, and the corresponding notes connected by ties. Such a situation may occur, for example, in the cello suites.

Alternating beam directions

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