The LilyPond Snippet Repository ♪♫

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

Adding links to objects

To add a link to a grob stencil you can use add-link as defined here. It works both with \override and \tweak.

Drawback: point-and-click is disturbed for the linked grobs.

Limitation: Works for PDF only.

The linked objects are colored with a separate command. Note that the links are not displayed and are not clickable from inside the LSR.

Adding links to objects

Adding markup to part of a syllable connected with lyric ties (~)

In modern editions of early music, it is common to typeset implicit lyrics (marked with "ij") in italics; this snippet demonstrates a way to handle cases where italic and plain lyric text fall on the same syllable, and a lyric tie (~) is desired.

Adding markup to part of a syllable connected with lyric ties (~)

Adding markups in a tablature

By default markups does not show in a tablature.

To make them appear, simply use the command \revert TabStaff.TextScript.stencil

Adding markups in a tablature

Adding metronome ticks to a piece of music

If you need to produce a piece of music with metronome ticks, optionally only in the midi, you can use this boilerplate code. Note that it sounds nicer than it looks :) .

Adding metronome ticks to a piece of music

Adding notes

A note is printed by specifying its pitch and then its duration.

Adding notes

Adding notes to the notes of a melody

If you want to add notes to the existing notes of a melody (to make chords), you generally have to copy your melody then add lots of <_ to="to" each="each" note="note" which="which" can="can" be="be" a="a" time-consuming.p="time-consuming.p"> The \addNote function here makes it faster and simpler.

The syntax is : \addNote \melody \newNotes

Here :

melody = \relative {c'4.-> d8-. c4(\p b8) r c4\f c c2}

newnotes = {e f e d e s e}

Note that with this function, you can easily create some other useful functions. For example, a function \doubleOctave is shown here. This doubles each note with the note an octave higher.

Adding notes to the notes of a melody

Adding or modifying Script articulations

Scripts may be defined as stencil expressions, by defining their stencil property.

Adding or modifying Script articulations

Adding orchestral cues to a vocal score

This shows one approach to simplify adding many orchestral cues to the piano reduction in a vocal score. The music function \cueWhile takes four arguments: the music from which the cue is to be taken, as defined by \addQuote, the name to be inserted before the cue notes, then either #UP or #DOWN to specify either \voiceOne with the name above the staff or \voiceTwo with the name below the staff, and finally the piano music in parallel with which the cue notes are to appear. The name of the cued instrument is positioned to the left of the cued notes. Many passages can be cued, but they cannot overlap each other in time.

Adding orchestral cues to a vocal score

Adding parentheses around an expressive mark or chordal note

The \parenthesize function is a special tweak that encloses objects in parentheses. The associated grob is ParenthesesItem.

Adding parentheses around an expressive mark or chordal note

Adding punctuation to the end of an extender in melismata

Punctuation can be added to the end of an extender in melismata by overriding the default stencil for LyricExtender.

For convenience, this snippet applies the stencil override as a tweak to the extender event.

Adding punctuation to the end of an extender in melismata

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