The LilyPond Snippet Repository ♪♫

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

Ancient time signatures

Time signatures may also be engraved in an old style.

Ancient time signatures

Anglican psalm template

This template shows one way of setting out an Anglican psalm chant. It also shows how the verses may be added as stand-alone text under the music. The two verses are coded in different styles to demonstrate more possibilities.

Anglican psalm template

Appending a note to the tuplet text (using a scheme wrapper function)

Sometimes you might want to show the basic beat in the tuplet number text, i.e. 3:2 quarternote, were quarternote is really a note. The quick and dirty way is to manually set \override TupletNumber #'text = #(markup #:italic "3:2" #:fontsize -5 #:note "4" 1). However, then you'll have to change it as soon as you want to use a 4/6 tuplet.

The better way is to write your own function for #'text, which extracts the tuplet fraction from the tuplet object, formats the tuplet text using the internal function and then appends the note you want. In other words, we simply write a function, which wraps the internal formatter function and modified its result:

#(define-public ((tuplet-number::append-note-wrapper function note) grob)
  (let* ((txt (function grob)))
    (markup txt #:fontsize -5 #:note note UP)))

You simply pass the normal formatter function (i.e. tuplet-number::calc-fraction-text for 3:2 or tuplet-number::calc-denominator-text for 3) and the duration of the note to append:

  \override TupletNumber #'text = #(tuplet-number::append-note-wrapper tuplet-number::calc-denominator-text "8")

Appending a note to the tuplet text (using a scheme wrapper function)

Applying note head styles (shapes) based on pitch or note name

The shapeNoteStyles property can be used to set custom note head styles for each step of the scale (as set by the key signature or the "tonic" property). The note head style you designate for G will also be used for G# and Gb, as in shape note notation.

The method used in this snippet lets you assign custom note heads based on a note's pitch or full name. This allows you to assign different note heads for naturals, sharps, and flats, for example. In this snippet sharp and flat notes are given a square note head shape. [This is based on the snippet "Coloring notes depending on their pitch".]

Applying note head styles (shapes) based on pitch or note name

Applying note head styles depending on the step of the scale

The shapeNoteStyles property can be used to define various note head styles for each step of the scale (as set by the key signature or the tonic property).

This property requires a set of symbols, which can be purely arbitrary (geometrical expressions such as triangle, cross, and xcircle are allowed) or based on old American engraving tradition (some latin note names are also allowed).

That said, to imitate old American song books, there are several predefined note head styles available through shortcut commands such as \aikenHeads or \sacredHarpHeads.

This example shows different ways to obtain shape note heads, and demonstrates the ability to transpose a melody without losing the correspondence between harmonic functions and note head styles.

Applying note head styles depending on the step of the scale

Arabic chant

Writing chants from right to left.

Arabic chant

Arabic improvisation

For improvisations or taqasim which are temporarily free, the time signature can be omitted and \cadenzaOn can be used. Adjusting the accidental style might be required, since the absence of bar lines will cause the accidental to be marked only once. Here is an example of what could be the start of a hijaz improvisation:

Arabic improvisation

Arpeggio bracket

In a score where you've printed many chords with \arpeggio signs, you may want to tell the player that one particular chord must not be arpeggiated. This can be done quite easily by adding a square bracket instead of the arpeggio sign.

Arpeggio bracket

Arpeggios in polyphonic music

If you need to attach an arpeggio a chord that is notated as separate voices in polyphonic music, you can create single-node chords and set connectArpeggios = ##t.

N.B. This only works inside a GrandStaff or a PianoStaff.

Arpeggios in polyphonic music

Arranging separate lyrics on a single line

Sometimes you may want to put lyrics for different performers on a single line: where there is rapidly alternating text, for example. This snippet shows how this can be done with \override VerticalAxisGroup.nonstaff-nonstaff-spacing.minimum-distance = ##f.

Arranging separate lyrics on a single line

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