The LilyPond Snippet Repository ♪♫

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

Creating harp glissandi

You can notate an ad lib. harp glissando in LilyPond using transparent NoteHeads with no ledger lines.

Creating harp glissandi

Creating jazz-style repeats

In response to a request for jazz-style repeats, where there is a number in the middle of the bar which indicates how many bars to repeat, with a heavy horizontal bar on either side of the number, Robin Bannister provided this snippet.

Creating jazz-style repeats

Creating keyboard diagrams with chords or scales

For use in education a scheme function to display chords on a keyboard have been created.

The function is called 'keys' and it takes a list of note names as its argument. For example

\keys #'(c e g bes)

wil create a C7 chord

So far the following note names are accepted:

c, cis, des, d, ....., ais, bes, b, c', cis', des', ...., bes', b', c''

The function can be wrapped up in a markup command like this

cnine=\markup\keys #'(c e g bes d')

and be used like this

\relative c' { < c e g bes d' >^\cnine }

Creating keyboard diagrams with chords or scales

Creating metronome marks in markup mode

New metronome marks can be created in markup mode, but they will not change the tempo in MIDI output.

Creating metronome marks in markup mode

Creating music sheet with blank piano staves

To create a piano music sheet with blank staves, use a Piano template, generate empty measures then remove the Bar_number_engraver from the Score context, and the Time_signature_engraver, (optionally the Clef_engraver) and Bar_engraver from the Staff context.

Creating music sheet with blank piano staves

Creating music with Scheme (music box)

This example shows how to repeat the same rhythm with different pitches. As an example the whole prelude in C major of Bach's Well-Tempered Klavier 1 is included. See comments in the snippet to see how it is used.

Creating music with Scheme (music box)

Creating slurs across voices

In some situations, it may be necessary to create slurs between notes from different voices. The solution is to add invisible notes to one of the voices, using \hideNotes.

This example is measure 235 of the Ciaconna from Bach's 2nd Partita for solo violin, BWV 1004.

Creating slurs across voices

Creating text spanners

The \startTextSpan and \stopTextSpan commands allow the creation of text spanners as easily as pedal indications or octavations. Override some properties of the TextSpanner object to modify its output.

Creating text spanners

Cross-staff arpeggio brackets

By default, the arpeggioBracket shortcut only works at a Voice level. As a consequence, if you need to print cross-staff arpeggios, it will not work (as demonstrated in the first measure of this example); here is a way to make it work (demonstrated in the second measure).

Cross-staff arpeggio brackets

Cross-staff chords - beaming problems workaround

Sometimes it is better to use stems from the upper staff for creating cross-staff chords, because no problems with automatic beam collision avoidance then arise. If the stems from the lower staff were used in the following example, it would be necessary to change the automatic beam collision avoidance settings so that it doesn't detect collisions between staves using \override Staff.Beam.collision-voice-only = ##t

Cross-staff chords - beaming problems workaround

⇦ Previous 21 22 23 24 25 26 27 28 29 30 Next ⇨