The LilyPond Snippet Repository ♪♫

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

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

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

Arrow notation and transposition for quarter tones

If you use arrow notation for quarter tones, and distinguish a raised natural from a lowered sharp, you can define extra note-names to enter notes with these distinct alterations.

You list all the pitch-changes that your notation distinguishes, and then choose what symbols to use for each pitch pitch-change. Transposition uses your defined pitches: \transpose bes, c \music takes the difference between your pitch bes and your pitch c and shifts every pitch in \music by that amount. If the resulting pitches have an alteration with an entry in the glyph-name-alist, that symbol is printed. A missing entry generates a warning. You can put as many alterations in glyph-name-alist as you like.

Arrow notation and transposition for quarter tones

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