The LilyPond Snippet Repository ♪♫

What's this? Searching the LSR Browse by date Contributing Snippet database Browsing items 10−19 out of 943

Accordion-discant symbols

This snippet has been obsoleted by predefined markup commands, see 'Discant symbols' in the Notation Reference. It's still useful as a simple demonstration of how to combine symbols: the placement of the symbols added with \markup can be tweaked by changing the \translate-scaled arguments. \translate-scaled is used here rather than \translate in order to let the positioning of the symbol parts adapt to changes of font-size.

Accordion-discant symbols

Add wings to all repeat barlines (simple version)

After switching from Sibelius, I missed having all my repeat barlines have "wings" on them. It's not documented in the Lilypond documentation, but it's not too hard to accomplish. Just add this inside your Staff:

\set Score.startRepeatType = #"[|:" \set Score.endRepeatType = #":|]" \set Score.doubleRepeatType = #":|][|:"

Add wings to all repeat barlines (simple version)

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

Adding a laissezVibrer tie to only one note of a chord [obsolete in 2.23]

Sometimes it is required to apply a laissezVibrer tie to a specific note in a chord, for instance in a piano fingering where one finger of a chord should temporarily act as a pivot while the other fingers are moving to the the next chord. Here is a way to achieve it.

Adding a laissezVibrer tie to only one note of a chord [obsolete in 2.23]

Adding a Special Post Event Function to Implement Precise MIDI Velocity Value Control

This is a small hack to output MIDI file with precise velocity value control. This snippet adds a post event function \vel which enables you to set MIDI velocity value directly on any note event. This is accomplished by overriding dynamicAbsoluteVolumeFunction.

Adding a Special Post Event Function to Implement Precise MIDI Velocity Value Control

Adding accidentals to a trillspanner

By overriding bound-details, you can insert an accidental after the trill sign in a trillspanner. However, this can look ugly since the accidental isn't aligned. With a few tweaks to the script size and position, you can achieve quite pleasing results.

Adding accidentals to a trillspanner

Adding ambitus per voice

Ambitus can be added per voice. In this case, the ambitus must be moved manually to prevent collisions.

Adding ambitus per voice

Adding an extra staff

An extra staff can be added (possibly temporarily) after the start of a piece.

Adding an extra staff

Adding an extra staff (2)

To add an extra staff after the start of a piece, you can choose between having brackets or braces when you go over a new line:

=> Use PianoStaff instead of StaffGroup or ChoirStaff in the code.

You may wish to remove the clef and not only the key:

=> See both \overrides in the code.

You may wish to remove also the little part of staff at the beginning of the extra staff:

=> Use #'stencil = ##f instead of #'transparent = ##t for both \overrides.

If you want to keep the little beginning of staff, keep at least one #'transparent = ##t.

Adding an extra staff (2)

Adding an extra staff at a line break

When adding a new staff at a line break, some extra space is unfortunately added at the end of the line before the break (to fit in a key signature change, which will never be printed anyway). The workaround is to add a setting of Staff.explicitKeySignatureVisibility as is shown in the example.

Adding an extra staff at a line break

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