The LilyPond Snippet Repository ♪♫

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

Asymmetric slurs

Slurs can be made asymmetric to match an asymmetric pattern of notes better.

Asymmetric slurs

autochange music with a different pitch

The \autochange command usually allows to switch staves when reaching the middle C. However, here is a way to specify a different pitch as the "turning point".

autochange music with a different pitch

Automatic beam subdivisions

Beams can be subdivided automatically. By setting the property subdivideBeams, beams are subdivided at beat positions (as specified in baseMoment).

Automatic beam subdivisions

Automatic beams two per two in 4/4 or 2/2 time signature

In a simple time signature of 2/2 or 4/4, 8th notes are beamed by default as two sets of four.

Using a macro which overrides the autobeaming behavior, this snippet changes the beaming to quarter note beats.

Automatic beams two per two in 4/4 or 2/2 time signature

Automatic click track

Here is a simple function to automatically add a MIDI click track to any music expression, without altering the graphical output.

Automatic click track

Automatic Fretboards Barre

When automatic fretboards are used, barre indicators will be drawn whenever one finger is responsible for multiple strings.

If no finger indications are given in the chord from which the automatic fretboard is created, no barre indicators will be included, because there is no way to identify where barres should be placed.

Automatic Fretboards Barre

Automatic scaling of cadenza-like patterns in metered music

This snippet demonstrates how a (fairly simple) Scheme function may be used similarly to \scaleDurations, to automatically scale all durations in a given music expression to make it fit inside a target duration.

This is especially useful in polyphonic music where one voice has to play a cadenza-like melody while other voices go on providing a regular accompaniment in standard meter, as illustrated in this example from Chopin’s Nocturne op.15 n°2.

Automatic scaling of cadenza-like patterns in metered music

Automatic slash for slashedGrace and acciaccatura

By default, LilyPond adds a slash to slashedGrace and acciaccatura only in the case of a single grace note, but not when dealing with a group of beamed grace notes. This function automatically adds slashes in those other cases.

Automatic slash for slashedGrace and acciaccatura

Automatic spacing behavior

By default, LilyPond takes stem directions and head positions into account to correctly handle optical spacing. This feature is what makes LilyPond-engraved scores so beautiful to see, to read, and to play :-)

Automatic spacing behavior

Automatically adding fingering diagrams for tin whistle

These functions may be used to automatically add fingering diagrams and reformatted note names to tin whistle music, with the whistle referred to being the common D whistle.

The fingering diagram function makes no attempt to deal with alternate fingerings. It is strictly one diagram per note, doing a fairly simple, straight forward one to one substitution.

The reformatted note names are in line with what I'm told the local tin whistle players expect - the lower octave being printed in upper case, and the upper octave printed in lower case with a plus sign underneath the note name, with the topmost D getting 2 plus signs.

Typically I use this code in combination with the tiedNoteToSkip function from http://lsr.di.unimi.it/LSR/Item?id=760 to avoid having the note name printed again for a tied note. Simply use each function as described in their descriptions, and (so far, at least) they work just fine with each other.

Automatically adding fingering diagrams for tin whistle

⇦ Previous 11 12 13 14 15 16 17 18 19 20 Next ⇨