Usage#

Roles#

The lily role#

You can use lily role to insert a single LilyPond Music Expression as inline score.

Inline Score#
reStructuredText
:lily:`{c'}` is the first note of the C major scale.
Result

\score{{c'}} is the first note of the C major scale.

If the score contains MIDI block, the extension will generate audio file and show a player beside the score:

Playable Inline Score#
reStructuredText
:lily:`{c' e' g' } \layout{} \midi{}` is playable.
Result

\score{{c' e' g' } \layout{} \midi{}} is playable.

New in version 2.1.0.

Hint

Some implementation details to help you debug your music expressions: the music expression will be wrapped by a \score block before passing to Lilypond.

For example, :lily:`{c'}` will be converted to \scores { {c'} }.

Directives#

The lily directive#

The lily directive is used to insert a complete LilyPond score as block level element.

\version "2.20.0"
\header {
  title = "翼をください, Excerpts"
}

\score {
  <<
    \new Staff \relative c' {
        \time 4/4
        \tempo 4 = 70
        r4 r r c8 d                  e8 e f16 e8 d16 (d4) e8 d
        c8 c d16 c8 b16 (b4) b8 g    a4 c8 a g4 c4
        d4 r r r
  }
  >>

  \layout {}
  \midi {}
}

.. lily::

   \version "2.20.0"
   \header {
     title = "翼をください, Excerpts"
   }

   \score {
     <<
       \new Staff \relative c' {
           \time 4/4
           \tempo 4 = 70
           r4 r r c8 d                  e8 e f16 e8 d16 (d4) e8 d
           c8 c d16 c8 b16 (b4) b8 g    a4 c8 a g4 c4
           d4 r r r
     }
     >>

     \layout {}
     \midi {}
   }

The directive supports the following options:

nocrop:

(flag) Set this option to have scores output to images with appropriate margins and preset size (A4), which is easy for printing. See 🎵 Original paper size.

Changed in version 2.0.0.

noaudio:

(flag) If the score contains MIDI block, Lilypond generates MIDI output files. which are converted to audio files by this extension. Use this option to disable audio, see 🎵 Disable Audio.

Changed in version 2.0.0.

loop:

(flag) Whethre audio player will automatically seek back to the start upon reaching the end of the audio. This conflicts with noaudio. Example: 🎵 Loop.

New in version 1.2.

transpose:

(text) Transposing the pitches of score from one to another. Pitches are written in LilyPond Notation and separated in whitespace. For example: :transpose: g c, see 🎵 Transposing.

New in version 2.0.0.

controls:

(text, one of the top or bottom) Specify the position of the control bar relative to the score. This implies audio. See example 🎵 Control Bar at the Top.

New in version 1.3.

The lilyinclude directive#

The lilyinclude directive is similar to The lily directive, except the source of LilyPond are read from file but not contents of directive.

\version "2.20.0"
\header {
  title = "《Witch Spring I》OP"
  composer = "Kiwi Walks"
  arranger = "SilverRainZ"
}

symbols =  {
  \time 4/4
  \tempo  "Allegretto" 4 = 110

  % 1
  c'4 c' c' c'8 b8
  c'4 g' c' c'8 b8
  c'4 g' (ais') c''8 b'8
  c''2 r2

  %14
  e'4 g c'2
  a8 c'8 c'8 d'8 c'2

  e'4 g' c'2
  c'4 d'8 e'8 c'4 g

  e'4 g c'2
  a8 c'8 c'8 d'8 e'4 c'

  g4 f e f8 g8

  \bar "|."
}

\score {
  <<
    \new Staff \with {midiInstrument = "acoustic guitar (nylon)"} {
      \clef "G_8"
      \symbols
    }
    \new TabStaff {
      \tabFullNotation
      \symbols
    }
  >>

  \midi { }
  \layout { }
}

.. lilyinclude:: /_scores/witch-spring.ly

Options of the directive are same to The lily directive.

See also

You and download the example LilyPond documentation from here: /_scores/witch-spring.ly.

The jianpu directive#

New in version 1.6.

The jianpu directive is used to insert a Jianpu (Numbered Musical Notation, 简谱) score as block level element.

Hint

The syntax of Jianpu is defined by Silas S. Brown and we use his jianpu-ly script to convert Jianpu source code to Lilypond source code, and finally engraving a music score.

\version "2.20.0"
#(set-global-staff-size 20)

% un-comment the next line to remove Lilypond tagline:
% \header { tagline="" }

\pointAndClickOff

\paper {
  print-all-headers = ##t %% allow per-score headers

  % un-comment the next line for A5:
  % #(set-default-paper-size "a5" )

  % un-comment the next line for no page numbers:
  % print-page-number = ##f

  % un-comment the next 3 lines for a binding edge:
  % two-sided = ##t
  % inner-margin = 20\mm
  % outer-margin = 10\mm

  % un-comment the next line for a more space-saving header layout:
  % scoreTitleMarkup = \markup { \center-column { \fill-line { \magnify #1.5 { \bold { \fromproperty #'header:dedication } } \magnify #1.5 { \bold { \fromproperty #'header:title } } \fromproperty #'header:composer } \fill-line { \fromproperty #'header:instrument \fromproperty #'header:subtitle \smaller{\fromproperty #'header:subsubtitle } } } }
}

%{ The jianpu-ly input was:
title=C Major Scale
1=C
2/4
4=60

1 2 3 4 5 6 7 1'
%}


\score {
<< \override Score.BarNumber #'break-visibility = #center-visible
\override Score.BarNumber #'Y-offset = -1
\set Score.barNumberVisibility = #(every-nth-bar-number-visible 5)

%% === BEGIN JIANPU STAFF ===
    \new RhythmicStaff \with {
    \consists "Accidental_engraver" 
    %% Get rid of the stave but not the barlines:
    \override StaffSymbol #'line-count = #0 %% tested in 2.15.40, 2.16.2, 2.18.0, 2.18.2, 2.20.0 and 2.22.2
    \override BarLine #'bar-extent = #'(-2 . 2) %% LilyPond 2.18: please make barlines as high as the time signature even though we're on a RhythmicStaff (2.16 and 2.15 don't need this although its presence doesn't hurt; Issue 3685 seems to indicate they'll fix it post-2.18)
    }
    { \new Voice="W" {
    \override Beam #'transparent = ##f
    \override Stem #'direction = #DOWN
    \override Tie #'staff-position = #2.5
    \tupletUp
    \override Stem #'length-fraction = #0
    \override Beam #'beam-thickness = #0.1
    \override Beam #'length-fraction = #0.5
    \override Voice.Rest #'style = #'neomensural % this size tends to line up better (we'll override the appearance anyway)
    \override Accidental #'font-size = #-4
    \override TupletBracket #'bracket-visibility = ##t
\set Voice.chordChanges = ##t %% 2.19 bug workaround

    \override Staff.TimeSignature #'style = #'numbered
    \override Staff.Stem #'transparent = ##t
     \mark \markup{1=C} \time 2/4 \tempo 4=60 #(define (note-one grob grob-origin context)
  (if (and (eq? (ly:context-property context 'chordChanges) #t)
      (or (grob::has-interface grob 'note-head-interface)
        (grob::has-interface grob 'rest-interface)))
    (begin
      (ly:grob-set-property! grob 'stencil
        (grob-interpret-markup grob
          (make-lower-markup 0.5 (make-bold-markup "1")))))))
  \applyOutput #'Voice #note-one c'4
#(define (note-two grob grob-origin context)
  (if (and (eq? (ly:context-property context 'chordChanges) #t)
      (or (grob::has-interface grob 'note-head-interface)
        (grob::has-interface grob 'rest-interface)))
    (begin
      (ly:grob-set-property! grob 'stencil
        (grob-interpret-markup grob
          (make-lower-markup 0.5 (make-bold-markup "2")))))))
  \applyOutput #'Voice #note-two d'4
#(define (note-three grob grob-origin context)
  (if (and (eq? (ly:context-property context 'chordChanges) #t)
      (or (grob::has-interface grob 'note-head-interface)
        (grob::has-interface grob 'rest-interface)))
    (begin
      (ly:grob-set-property! grob 'stencil
        (grob-interpret-markup grob
          (make-lower-markup 0.5 (make-bold-markup "3")))))))
| %{ bar 2: %}
  \applyOutput #'Voice #note-three e'4
#(define (note-four grob grob-origin context)
  (if (and (eq? (ly:context-property context 'chordChanges) #t)
      (or (grob::has-interface grob 'note-head-interface)
        (grob::has-interface grob 'rest-interface)))
    (begin
      (ly:grob-set-property! grob 'stencil
        (grob-interpret-markup grob
          (make-lower-markup 0.5 (make-bold-markup "4")))))))
  \applyOutput #'Voice #note-four f'4
#(define (note-five grob grob-origin context)
  (if (and (eq? (ly:context-property context 'chordChanges) #t)
      (or (grob::has-interface grob 'note-head-interface)
        (grob::has-interface grob 'rest-interface)))
    (begin
      (ly:grob-set-property! grob 'stencil
        (grob-interpret-markup grob
          (make-lower-markup 0.5 (make-bold-markup "5")))))))
| %{ bar 3: %}
  \applyOutput #'Voice #note-five g'4
#(define (note-six grob grob-origin context)
  (if (and (eq? (ly:context-property context 'chordChanges) #t)
      (or (grob::has-interface grob 'note-head-interface)
        (grob::has-interface grob 'rest-interface)))
    (begin
      (ly:grob-set-property! grob 'stencil
        (grob-interpret-markup grob
          (make-lower-markup 0.5 (make-bold-markup "6")))))))
  \applyOutput #'Voice #note-six a'4
#(define (note-seven grob grob-origin context)
  (if (and (eq? (ly:context-property context 'chordChanges) #t)
      (or (grob::has-interface grob 'note-head-interface)
        (grob::has-interface grob 'rest-interface)))
    (begin
      (ly:grob-set-property! grob 'stencil
        (grob-interpret-markup grob
          (make-lower-markup 0.5 (make-bold-markup "7")))))))
| %{ bar 4: %}
  \applyOutput #'Voice #note-seven b'4
  \applyOutput #'Voice #note-one c''4^. \bar "|." } }
% === END JIANPU STAFF ===

>>
\header{
title="C Major Scale"
}
\layout{} }
\score {
\unfoldRepeats
<< 

% === BEGIN MIDI STAFF ===
    \new Staff { \new Voice="X" { \transpose c c { \key c \major  \time 2/4 \tempo 4=60 c'4 d'4 | %{ bar 2: %} e'4 f'4 | %{ bar 3: %} g'4 a'4 | %{ bar 4: %} b'4 c''4 } } }
% === END MIDI STAFF ===

>>
\header{
title="C Major Scale"
}
\midi { \context { \Score tempoWholesPerMinute = #(ly:make-moment 84 4)}} }

.. jianpu::

   title=C Major Scale
   1=C
   2/4
   4=60

   1 2 3 4 5 6 7 1'

Options of the directive are same to The lily directive.

The jianpuinclude directive#

New in version 1.6.

The jianpuinclude directive is similar to The jianpu directive, except the source of Jianpu are read from file but not contents of directive.

\version "2.20.0"
#(set-global-staff-size 20)

% un-comment the next line to remove Lilypond tagline:
% \header { tagline="" }

\pointAndClickOff

\paper {
  print-all-headers = ##t %% allow per-score headers

  % un-comment the next line for A5:
  % #(set-default-paper-size "a5" )

  % un-comment the next line for no page numbers:
  % print-page-number = ##f

  % un-comment the next 3 lines for a binding edge:
  % two-sided = ##t
  % inner-margin = 20\mm
  % outer-margin = 10\mm

  % un-comment the next line for a more space-saving header layout:
  % scoreTitleMarkup = \markup { \center-column { \fill-line { \magnify #1.5 { \bold { \fromproperty #'header:dedication } } \magnify #1.5 { \bold { \fromproperty #'header:title } } \fromproperty #'header:composer } \fill-line { \fromproperty #'header:instrument \fromproperty #'header:subtitle \smaller{\fromproperty #'header:subsubtitle } } } }
}

%{ The jianpu-ly input was:
% http://ssb22.user.srcf.net/mwrhome/jianpu-ly.html

title=送别
4=80
1=A
4/4

chords= a1 d2 a2 a1 e:7 a1 d2 a2 a1 e:7 d1 e:7 a2 d2 a2 e:7 a1 d2 a2 e:7 a1

5 q3 q5 1' -
6  q1' q6 5 -
5 q1 q2 3 q2 q1
2  - - 0
\break

5 q3 q5 1'. q7
6 1' 5 -
5 q2 q3 4. q7,
1 - - 0
\break

6 ^"低八度" 1' 1' 0
7 q6 q7 1' 0
q6 q7 q1' q6 q6 q5 q3 q1
2 - - 0
\break

5 q3 q5 1'. q7
6 1' 5 -
5 q2 q3 4. q7,
1 - - 0
%}


\score {
<< \override Score.BarNumber #'break-visibility = #center-visible
\override Score.BarNumber #'Y-offset = -1
\set Score.barNumberVisibility = #(every-nth-bar-number-visible 5)
\new ChordNames { \chordmode { a1 d2 a2 a1 e:7 a1 d2 a2 a1 e:7 d1 e:7 a2 d2 a2 e:7 a1 d2 a2 e:7 a1 } }

%% === BEGIN JIANPU STAFF ===
    \new RhythmicStaff \with {
    \consists "Accidental_engraver" 
    %% Get rid of the stave but not the barlines:
    \override StaffSymbol #'line-count = #0 %% tested in 2.15.40, 2.16.2, 2.18.0, 2.18.2, 2.20.0 and 2.22.2
    \override BarLine #'bar-extent = #'(-2 . 2) %% LilyPond 2.18: please make barlines as high as the time signature even though we're on a RhythmicStaff (2.16 and 2.15 don't need this although its presence doesn't hurt; Issue 3685 seems to indicate they'll fix it post-2.18)
    }
    { \new Voice="W" {
    \override Beam #'transparent = ##f
    \override Stem #'direction = #DOWN
    \override Tie #'staff-position = #2.5
    \tupletUp
    \override Stem #'length-fraction = #0
    \override Beam #'beam-thickness = #0.1
    \override Beam #'length-fraction = #0.5
    \override Voice.Rest #'style = #'neomensural % this size tends to line up better (we'll override the appearance anyway)
    \override Accidental #'font-size = #-4
    \override TupletBracket #'bracket-visibility = ##t
\set Voice.chordChanges = ##t %% 2.19 bug workaround

    \override Staff.TimeSignature #'style = #'numbered
    \override Staff.Stem #'transparent = ##t
     \tempo 4=80 \mark \markup{1=A} \time 4/4 #(define (note-five grob grob-origin context)
  (if (and (eq? (ly:context-property context 'chordChanges) #t)
      (or (grob::has-interface grob 'note-head-interface)
        (grob::has-interface grob 'rest-interface)))
    (begin
      (ly:grob-set-property! grob 'stencil
        (grob-interpret-markup grob
          (make-lower-markup 0.5 (make-bold-markup "5")))))))
  \applyOutput #'Voice #note-five g'4
#(define (note-three grob grob-origin context)
  (if (and (eq? (ly:context-property context 'chordChanges) #t)
      (or (grob::has-interface grob 'note-head-interface)
        (grob::has-interface grob 'rest-interface)))
    (begin
      (ly:grob-set-property! grob 'stencil
        (grob-interpret-markup grob
          (make-lower-markup 0.5 (make-bold-markup "3")))))))
\set stemLeftBeamCount = #0
\set stemRightBeamCount = #1
  \applyOutput #'Voice #note-three e'8[
\set stemLeftBeamCount = #1
\set stemRightBeamCount = #1
  \applyOutput #'Voice #note-five g'8]
\once \override Tie #'transparent = ##t \once \override Tie #'staff-position = #0 #(define (note-one grob grob-origin context)
  (if (and (eq? (ly:context-property context 'chordChanges) #t)
      (or (grob::has-interface grob 'note-head-interface)
        (grob::has-interface grob 'rest-interface)))
    (begin
      (ly:grob-set-property! grob 'stencil
        (grob-interpret-markup grob
          (make-lower-markup 0.5 (make-bold-markup "1")))))))
  \applyOutput #'Voice #note-one c''4^.
 ~ #(define (note-dashone grob grob-origin context)
  (if (and (eq? (ly:context-property context 'chordChanges) #t)
      (or (grob::has-interface grob 'note-head-interface)
        (grob::has-interface grob 'rest-interface)))
    (begin
      (ly:grob-set-property! grob 'stencil
        (grob-interpret-markup grob
          (make-lower-markup 0.5 (make-bold-markup "–")))))))
  \applyOutput #'Voice #note-dashone c''4
#(define (note-six grob grob-origin context)
  (if (and (eq? (ly:context-property context 'chordChanges) #t)
      (or (grob::has-interface grob 'note-head-interface)
        (grob::has-interface grob 'rest-interface)))
    (begin
      (ly:grob-set-property! grob 'stencil
        (grob-interpret-markup grob
          (make-lower-markup 0.5 (make-bold-markup "6")))))))
| %{ bar 2: %}
  \applyOutput #'Voice #note-six a'4
\set stemLeftBeamCount = #0
\set stemRightBeamCount = #1
  \applyOutput #'Voice #note-one c''8[^.
\set stemLeftBeamCount = #1
\set stemRightBeamCount = #1
  \applyOutput #'Voice #note-six a'8]
\once \override Tie #'transparent = ##t \once \override Tie #'staff-position = #0   \applyOutput #'Voice #note-five g'4
 ~ #(define (note-dashfive grob grob-origin context)
  (if (and (eq? (ly:context-property context 'chordChanges) #t)
      (or (grob::has-interface grob 'note-head-interface)
        (grob::has-interface grob 'rest-interface)))
    (begin
      (ly:grob-set-property! grob 'stencil
        (grob-interpret-markup grob
          (make-lower-markup 0.5 (make-bold-markup "–")))))))
  \applyOutput #'Voice #note-dashfive g'4
| %{ bar 3: %}
  \applyOutput #'Voice #note-five g'4
\set stemLeftBeamCount = #0
\set stemRightBeamCount = #1
  \applyOutput #'Voice #note-one c'8[
#(define (note-two grob grob-origin context)
  (if (and (eq? (ly:context-property context 'chordChanges) #t)
      (or (grob::has-interface grob 'note-head-interface)
        (grob::has-interface grob 'rest-interface)))
    (begin
      (ly:grob-set-property! grob 'stencil
        (grob-interpret-markup grob
          (make-lower-markup 0.5 (make-bold-markup "2")))))))
\set stemLeftBeamCount = #1
\set stemRightBeamCount = #1
  \applyOutput #'Voice #note-two d'8]
  \applyOutput #'Voice #note-three e'4 \set stemLeftBeamCount = #0
\set stemRightBeamCount = #1
  \applyOutput #'Voice #note-two d'8[
\set stemLeftBeamCount = #1
\set stemRightBeamCount = #1
  \applyOutput #'Voice #note-one c'8]
\once \override Tie #'transparent = ##t \once \override Tie #'staff-position = #0 | %{ bar 4: %}
  \applyOutput #'Voice #note-two d'4
 ~ \once \override Tie #'transparent = ##t \once \override Tie #'staff-position = #0 #(define (note-dashtwo grob grob-origin context)
  (if (and (eq? (ly:context-property context 'chordChanges) #t)
      (or (grob::has-interface grob 'note-head-interface)
        (grob::has-interface grob 'rest-interface)))
    (begin
      (ly:grob-set-property! grob 'stencil
        (grob-interpret-markup grob
          (make-lower-markup 0.5 (make-bold-markup "–")))))))
  \applyOutput #'Voice #note-dashtwo d'4
 ~   \applyOutput #'Voice #note-dashtwo d'4 #(define (note-nought grob grob-origin context)
  (if (and (eq? (ly:context-property context 'chordChanges) #t)
      (or (grob::has-interface grob 'note-head-interface)
        (grob::has-interface grob 'rest-interface)))
    (begin
      (ly:grob-set-property! grob 'stencil
        (grob-interpret-markup grob
          (make-lower-markup 0.5 (make-bold-markup "0")))))))
  \applyOutput #'Voice #note-nought r4
\break | %{ bar 5: %}
  \applyOutput #'Voice #note-five g'4
\set stemLeftBeamCount = #0
\set stemRightBeamCount = #1
  \applyOutput #'Voice #note-three e'8[
\set stemLeftBeamCount = #1
\set stemRightBeamCount = #1
  \applyOutput #'Voice #note-five g'8]
  \applyOutput #'Voice #note-one c''4.^. #(define (note-seven grob grob-origin context)
  (if (and (eq? (ly:context-property context 'chordChanges) #t)
      (or (grob::has-interface grob 'note-head-interface)
        (grob::has-interface grob 'rest-interface)))
    (begin
      (ly:grob-set-property! grob 'stencil
        (grob-interpret-markup grob
          (make-lower-markup 0.5 (make-bold-markup "7")))))))
\set stemLeftBeamCount = #0
\set stemRightBeamCount = #1
  \applyOutput #'Voice #note-seven b'8[]
| %{ bar 6: %}
  \applyOutput #'Voice #note-six a'4
  \applyOutput #'Voice #note-one c''4^. \once \override Tie #'transparent = ##t \once \override Tie #'staff-position = #0   \applyOutput #'Voice #note-five g'4
 ~   \applyOutput #'Voice #note-dashfive g'4 | %{ bar 7: %}
  \applyOutput #'Voice #note-five g'4
\set stemLeftBeamCount = #0
\set stemRightBeamCount = #1
  \applyOutput #'Voice #note-two d'8[
\set stemLeftBeamCount = #1
\set stemRightBeamCount = #1
  \applyOutput #'Voice #note-three e'8]
#(define (note-four grob grob-origin context)
  (if (and (eq? (ly:context-property context 'chordChanges) #t)
      (or (grob::has-interface grob 'note-head-interface)
        (grob::has-interface grob 'rest-interface)))
    (begin
      (ly:grob-set-property! grob 'stencil
        (grob-interpret-markup grob
          (make-lower-markup 0.5 (make-bold-markup "4")))))))
  \applyOutput #'Voice #note-four f'4.
\set stemLeftBeamCount = #0
\set stemRightBeamCount = #1
  \applyOutput #'Voice #note-seven b8[]-\tweak #'X-offset #0.6 _.
\once \override Tie #'transparent = ##t \once \override Tie #'staff-position = #0 | %{ bar 8: %}
  \applyOutput #'Voice #note-one c'4
 ~ \once \override Tie #'transparent = ##t \once \override Tie #'staff-position = #0   \applyOutput #'Voice #note-dashone c'4
 ~   \applyOutput #'Voice #note-dashone c'4   \applyOutput #'Voice #note-nought r4 \break | %{ bar 9: %}
  \applyOutput #'Voice #note-six a'4
^"低八度"   \applyOutput #'Voice #note-one c''4^.   \applyOutput #'Voice #note-one c''4^.   \applyOutput #'Voice #note-nought r4 | %{ bar 10: %}
  \applyOutput #'Voice #note-seven b'4
\set stemLeftBeamCount = #0
\set stemRightBeamCount = #1
  \applyOutput #'Voice #note-six a'8[
\set stemLeftBeamCount = #1
\set stemRightBeamCount = #1
  \applyOutput #'Voice #note-seven b'8]
  \applyOutput #'Voice #note-one c''4^.   \applyOutput #'Voice #note-nought r4 | %{ bar 11: %} \set stemLeftBeamCount = #0
\set stemRightBeamCount = #1
  \applyOutput #'Voice #note-six a'8[
\set stemLeftBeamCount = #1
\set stemRightBeamCount = #1
  \applyOutput #'Voice #note-seven b'8]
\set stemLeftBeamCount = #0
\set stemRightBeamCount = #1
  \applyOutput #'Voice #note-one c''8[^.
\set stemLeftBeamCount = #1
\set stemRightBeamCount = #1
  \applyOutput #'Voice #note-six a'8]
\set stemLeftBeamCount = #0
\set stemRightBeamCount = #1
  \applyOutput #'Voice #note-six a'8[
\set stemLeftBeamCount = #1
\set stemRightBeamCount = #1
  \applyOutput #'Voice #note-five g'8]
\set stemLeftBeamCount = #0
\set stemRightBeamCount = #1
  \applyOutput #'Voice #note-three e'8[
\set stemLeftBeamCount = #1
\set stemRightBeamCount = #1
  \applyOutput #'Voice #note-one c'8]
\once \override Tie #'transparent = ##t \once \override Tie #'staff-position = #0 | %{ bar 12: %}
  \applyOutput #'Voice #note-two d'4
 ~ \once \override Tie #'transparent = ##t \once \override Tie #'staff-position = #0   \applyOutput #'Voice #note-dashtwo d'4
 ~   \applyOutput #'Voice #note-dashtwo d'4   \applyOutput #'Voice #note-nought r4 \break | %{ bar 13: %}
  \applyOutput #'Voice #note-five g'4
\set stemLeftBeamCount = #0
\set stemRightBeamCount = #1
  \applyOutput #'Voice #note-three e'8[
\set stemLeftBeamCount = #1
\set stemRightBeamCount = #1
  \applyOutput #'Voice #note-five g'8]
  \applyOutput #'Voice #note-one c''4.^. \set stemLeftBeamCount = #0
\set stemRightBeamCount = #1
  \applyOutput #'Voice #note-seven b'8[]
| %{ bar 14: %}
  \applyOutput #'Voice #note-six a'4
  \applyOutput #'Voice #note-one c''4^. \once \override Tie #'transparent = ##t \once \override Tie #'staff-position = #0   \applyOutput #'Voice #note-five g'4
 ~   \applyOutput #'Voice #note-dashfive g'4 | %{ bar 15: %}
  \applyOutput #'Voice #note-five g'4
\set stemLeftBeamCount = #0
\set stemRightBeamCount = #1
  \applyOutput #'Voice #note-two d'8[
\set stemLeftBeamCount = #1
\set stemRightBeamCount = #1
  \applyOutput #'Voice #note-three e'8]
  \applyOutput #'Voice #note-four f'4. \set stemLeftBeamCount = #0
\set stemRightBeamCount = #1
  \applyOutput #'Voice #note-seven b8[]-\tweak #'X-offset #0.6 _.
\once \override Tie #'transparent = ##t \once \override Tie #'staff-position = #0 | %{ bar 16: %}
  \applyOutput #'Voice #note-one c'4
 ~ \once \override Tie #'transparent = ##t \once \override Tie #'staff-position = #0   \applyOutput #'Voice #note-dashone c'4
 ~   \applyOutput #'Voice #note-dashone c'4   \applyOutput #'Voice #note-nought r4 \bar "|." } }
% === END JIANPU STAFF ===

>>
\header{
title="送别"
}
\layout{} }
\score {
\unfoldRepeats
<< 
\new ChordNames { \chordmode { a1 d2 a2 a1 e:7 a1 d2 a2 a1 e:7 d1 e:7 a2 d2 a2 e:7 a1 d2 a2 e:7 a1 } }

% === BEGIN MIDI STAFF ===
    \new Staff { \new Voice="X" { \tempo 4=80 \transpose c a, { \key c \major  \time 4/4 g'4 e'8 g'8 c''2 | %{ bar 2: %} a'4 c''8 a'8 g'2 | %{ bar 3: %} g'4 c'8 d'8 e'4 d'8 c'8 | %{ bar 4: %} d'2. r4 \break | %{ bar 5: %} g'4 e'8 g'8 c''4. b'8 | %{ bar 6: %} a'4 c''4 g'2 | %{ bar 7: %} g'4 d'8 e'8 f'4. b8 | %{ bar 8: %} c'2. r4 \break | %{ bar 9: %} a'4 ^"低八度" c''4 c''4 r4 | %{ bar 10: %} b'4 a'8 b'8 c''4 r4 | %{ bar 11: %} a'8 b'8 c''8 a'8 a'8 g'8 e'8 c'8 | %{ bar 12: %} d'2. r4 \break | %{ bar 13: %} g'4 e'8 g'8 c''4. b'8 | %{ bar 14: %} a'4 c''4 g'2 | %{ bar 15: %} g'4 d'8 e'8 f'4. b8 | %{ bar 16: %} c'2. r4 } } }
% === END MIDI STAFF ===

>>
\header{
title="送别"
}
\midi { \context { \Score tempoWholesPerMinute = #(ly:make-moment 84 4)}} }

.. jianpuinclude:: /_scores/songbie.jp

See also

You and download the example LilyPond documentation from here: /_scores/songbie.jp.

Options of the directive are same to The lily directive.