The LilyPond Snippet Repository ♪♫

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

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 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

Adding rests

Rests are entered like notes, with the note name r, so just type r followed by the duration.

Adding rests

Adding the current date to a score

With a little Scheme code, the current date can easily be added to a score.

Adding the current date to a score

Adding the current date to the tagline

There are a couple ways to get the current date in your score - using Scheme and a header that suits you (as you may find in the Adding the current date to a score example), or placing the same Scheme code in a \markup block.

One more option is to place the date in the tagline. This places the date at the bottom of the last page and appears like this -

Engraved on April 26, 2009 with Lilypond 2.12.2 (http://lilypond.org)

The format of the date can be changed according to these parameters:

Adding the current date to the tagline

Adding timing marks to long glissandi

Skipped beats in very long glissandi are sometimes indicated by timing marks, often consisting of stems without noteheads. Such stems can also be used to carry intermediate expression markings. If the stems do not align well with the glissando, they may need to be repositioned slightly.

Adding timing marks to long glissandi

Adding volta brackets to additional staves

The Volta_engraver by default resides in the Score context, and brackets for the repeat are thus normally only printed over the topmost staff. This can be adjusted by adding the Volta_engraver to the Staff context where the brackets should appear; see also the Volta multi staff snippet.

Adding volta brackets to additional staves

Additional voices to avoid collisions

In some instances of complex polyphonic music, additional voices are necessary to prevent collisions between notes. If more than four parallel voices are needed, additional voices can be added by defining a variable using the Scheme function context-spec-music.

Additional voices to avoid collisions

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