The LilyPond Snippet Repository ♪♫

What's this? Searching the LSR Browse by date Contributing Snippet database Browsing items 20−29 out of 838

Adding bar lines to ChordNames context

To add bar line indications in the ChordNames context, add the Bar_engraver.

Adding bar lines to ChordNames context

Adding beams, slurs, ties etc. when using tuplet and non-tuplet rhythms

LilyPond syntax can involve many unusual placements for parentheses, brackets etc., which might sometimes have to be interleaved.

For example, when entering a manual beam, the left square bracket has to be placed after the starting note and its duration, not before. Similarly, the right square bracket should directly follow the note which is to be at the end of the requested beaming, even if this note happens to be inside a tuplet section.

This snippet demonstrates how to combine manual beaming, manual slurs, ties and phrasing slurs with tuplet sections (enclosed within curly braces).

Adding beams, slurs, ties etc. when using tuplet and non-tuplet rhythms

Adding double and triple tonguing indications for woodwind

Double and triple tonguing indications can be added to notes by tweaking the appearance of staccato articulations.

Adding double and triple tonguing indications for woodwind

Adding drum parts

Using the powerful pre-configured tools such as the \drummode function and the DrumStaff context, inputting drum parts is quite easy: drums are placed at their own staff positions (with a special clef symbol) and have note heads according to the drum. Attaching an extra symbol to the drum or restricting the number of lines is possible.

Adding drum parts

Adding extra fingering with scheme

You can add additional elements to notes using map-some-music. In this example, an extra script is attached to a note. In general, first do a \displayMusic of the music you want to create, then write a function that will work on the appropriate parts of the music for you.

Adding extra fingering with scheme

Adding fingerings (or string numbers or stroke fingerings) outside of the music code

The scheme function \addFingering adds fingerings to a music part respecting fingeringOrientations even if single notes are not in chord brackets (<_. p="p"> In the example below, the music code is just set as follow :

    music = \relative c' { 
                c4 d  
                g f  
                c b a b
                1
            }
The fingering code is set in a string parameter :

    \addFingering \music
            #"012345           % mes 1
              xxxx '1-2''3-4'  % mes 2
              -1+2-3+4         % mes 3
              1234             % mes 4
              "

The rules are :

Each digit [0-5] is attached to the corresponding note in the music.

You can use a letter (here x) to skip a note, or if you want to skip n consecutive notes, use the syntax *nx ( for ex *15x will skip 15 notes).

Instead of one digit, you can add a substitution fingering by enclosing several digits between 2 apostrophes, with - (minus) as separator char, like that '1-2-3'.

+ and - (plus/minus) before a digit mean respectively direction UP and DOWN.They override fingeringOrientations set before.

Comments can be added at the end of the line and must start with a percent sign (%).

All other characters not mentioned above are ignored.

Notes :

1-If you are curious to know how to add various \override, you can uncomment the commented lines of the code of this snippet, but you'll need first to download here the file called "extractMusic.ly".

2-You can also use \displayLilyMusic to get single notes with fingering instructions embedded in chord brackets.

3-Two similar functions \addStringNumber and \addStrokeFinger are also provided. You can quickly add by the same way, respectively string numbers and stroke fingerings.

Adding fingerings (or string numbers or stroke fingerings) outside of the music code

Adding fingerings to a score

Fingering instructions can be entered using a simple syntax.

Adding fingerings to a score

Adding fingerings to a score using markup objects

Fingerings can be entered as markup objects, for example to specify fingering changes on a single note.

Adding fingerings to a score using markup objects

Adding fingerings to chords

Fingerings for chords can be obtained by adding them to individual pitches.

Adding fingerings to chords

Adding fingerings to tablatures

To add fingerings to tablatures, use a combination of \markup and \finger.

Adding fingerings to tablatures

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