The LilyPond Snippet Repository ♪♫

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

Analysis brackets

Brackets can be used in musical analysis to indicate the structure of the pieces.

As demonstrated in the second measure, such analysis brackets can be nested.

Analysis brackets

Analysis brackets above the staff

Simple horizontal analysis brackets are added below the staff by default. The following example shows a way to place them above the staff instead.

Analysis brackets above the staff

Analysis brackets with labels

Text markup may be added to analysis brackets through the text property of the HorizontalBracketText grob. Adding different texts to brackets beginning at the same time requires the \tweak command.

Bracket text will be parenthesized after a line break.

Analysis brackets with labels

Ancient accidentals

Accidentals are available in different ancient styles, which all are collected here.

Ancient accidentals

Ancient fonts

Shown here are many of the symbols that are included in LilyPond's ancient notation.

Ancient fonts

Ancient headword

.

Ancient headword

Ancient notation template -- modern transcription of gregorian music

This example demonstrates how to do modern transcription of Gregorian music. Gregorian music has no measure, no stems; it uses only half and quarter note heads, and special marks, indicating rests of different length.

Ancient notation template -- modern transcription of gregorian music

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)

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