The LilyPond Snippet Repository ♪♫

What's this? Searching the LSR Browse by date Contributing Snippet database Browsing items 90−99 out of 940

Ancient fonts

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

Ancient fonts

Ancient headword

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)

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

Applying tweaks to one voice in \partCombine

When using \partCombine, commands applying to a Voice context affect both parts since when are merged in the same Voice. This snippet defines a music function to apply tweaks to all elements of a certain kind in a music expression. This can be used to apply modifications to all grobs caused by elements of a music expression regardless of the context structure. Possible values for the event-class argument are listed at the Internals Reference

Applying tweaks to one voice in \partCombine

Appoggiatura or grace note before a bar line

By default, appoggiaturas and grace notes that occur on the first beat of a measure are printed after the bar line. They can however be printed before, simply by adding an invisible BarLine and then the visible one, as demonstrated here.

Appoggiatura or grace note before a bar line

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