The LilyPond Snippet Repository ♪♫

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

Creating double-digit fingerings

Creating fingerings larger than 5 is possible.

Creating double-digit fingerings

Creating fret diagrams with chord names but no staff/staves using fret diagram markup

This snippet shows how to create fret diagrams with chord names but no staff/staves, for a fret diagram which is not one of the predefined fretboard diagrams i.e. with the fret diagrams specified using fret diagram markup.

The first example in the "Fret diagram markups" section of the "Notation Reference" (http://lilypond.org/doc/v2.18/Documentation/6f/lily-b213fdb4.ly) is defined using fret diagram markup, so I have used that example as the basis for this snippet. Hence, this is also an example of how to remove the staff (and all things in the staff) from the first example in the "Fret diagram markups" section of the "Notation reference".

For more info, please see:

Creating fret diagrams with chord names but no staff/staves using fret diagram markup

Creating guitar scales on fretboards

This snippet creates fretboards with guitar scales.

The syntax is

\scale-diagramm #'( (string1 fret1) (string2 fret2) ... ) #notesinscale #size

For example for a c pentatonic scale (first six notes)

\scale-diagramm #'((5 3) (5 5 ) (4 3) (4 5) (3 2) (3 5)) #5 #1.5

you can wrap this up in a markup command for building up a list of scales

cpenta = \markup \scale-diagramm #'((5 3) (5 5 ) (4 3) (4 5) (3 2) (3 5)) #5 #1.5

and use it like this

c^\cpenta d f g a c

The snippet doesn't show it, but the (1) position of the scale is inverted

Creating guitar scales on fretboards

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

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