Le 23/07/2022 à 03:48, Kenneth Wolcott a écrit :
Can_You_Feel_the_Love_Tonight.pdf <https://drive.google.com/file/d/17JcvzHc9RVLfJk_54oNRl0QqXO7QpT-U/view?usp=drive_web>
Hi;

  I have a piece of music ("Can You Feel the Love Tonight") which I am trying to engrave using Lilypond 2.23.10.

  I have (mostly) succeeded in engraving this with Lilypond 2.22.2, but the many directives regarding the Coda and DS look awful.

So, I tried using the \repeat segno feature, which almost looks correct, but I have problems understanding how to glue in the Coda part (is that like a volta?).

Could someone clue me in on the Lilypond syntax that I am missing so that the pdf looks right and the midi sounds right?

Kenneth,

There is an example with an al coda repeat here:

https://lilypond.org/doc/v2.23/Documentation/notation/long-repeats.html#segno-repeat-structure

The syntax is

\repeat segno 2 {
  <repeated part>
  \alternative {
    \volta 1 {
      <only first time; al coda is just before here>
    }
    \volta 2 \volta #'() {
      \section
      \sectionLabel Coda
    }
  }
  <coda part>
}

Attached is your file amended to use this syntax.

Best,
Jean

\version "2.23.10"

% Can You Feel the Love Tonight
% (from the Lion King)

global = {
  \language "english"
  \numericTimeSignature
  \time 4/4
  \key c \major
  \tempo "Moderately"
}

\header {
  title = "Can You Feel the Love Tonight"
  subtitle = "(from the \"Lion King\")"
  composer = "Elton John"
}

ds_al_coda = ^\markup { \fontsize #3 "D.S. al Coda" }
rit_e_dim = _\markup { \italic "rit. e dim." }
to_coda = ^\markup { \fontsize #3 "To Coda" }
% coda = -\tweak outside-staff-priority #605 \mark \markup { \fontsize #3 "CODA" }
coda = \mark \markup { \fontsize #2 "CODA" }

rh = {
  \global
  \clef treble
  e''2^3\mp d''4 g''      | % m1
  f''2 f''8^5 e'' c'' g'  | % m2
  a'2 g'8 c'' g'4^2       | % m3
%\break
  d'4^1 e' f' g'^1         | % m4
  \repeat segno 2 {
%  \mark \markup { \musicglyph "scripts.segno" }
    a'8 b' c'' d'' c'' g'4.  | % m5
    a'8 b' c'' d'' c''2      | % m6
%\break
    a'8 b' c'' d''16 d'' c''8 g' e''4^4  | % m7
    f''8 e'' d'' e'' d''2                | % m8
%\break
    a'8 b' c'' d'' c'' g'4.  | % m9
    a'8 b' c'' d'' c''2      | % m10
%\break
    a'8 b' c'' g'16 g' g''8 e'' c'' a'  | % m11
    f''8 e'' d'' e'' d''4. g'8          | % m12
%\break
    \repeat volta 2 {
      g''4. e''8 e''4. g''8  | % m13
      e''4 c''8 a' ~ a'2     | % m14
      r4 g'8 c'' f''4 e''    | % m15
%\break
      d''1                   | % m16
      r4 a'8 b' c''4 g'8 g'  | % m17
      g''4 e'' c''8 c'' a'4  | % m18
    }
%\break
    \alternative {
      {
        f''4 e'' d'' e''         | % m19
        d''2. r8 g'              | % m20
      }
      {
        f''4 e'' d'' c''8 c'' ~  | % m21
      }
    }
%\break
    c''2. r4      | % m22
    \alternative {
      \volta 1 {
        e''2^3 d''4 g''       | % m23
        f''2 f''8 e'' c'' g'  | % m24
      %\break
        a'2 g'8 c'' g'4^2           | % m25
        d'4 e' f' g'     | % m26
      }
      \volta 2 \volta #'() {
        \section
        \sectionLabel Coda
      }
    }
  }
%      \mark \markup { \musicglyph "scripts.coda" }
  r4 a'8 b' c''4 g'8 g'  | % m27
%\break
  g''4 e'' c''8\rit_e_dim c'' a' a'   | % m28
  f''4 e'' d'' c''8 c'' ~             | % m29
  c''4 a'8 f' e''2\fermata            | % m30
  \fine
}

lh = {
  \global
  \clef bass
  c'2_1 b   | % m1
  a2 g      | % m2
  f4 c' e2  | % m3
%\break
  b1    | % m4
  \repeat segno 2 {
    f2 e  | % m5
    f2 e  | % m6
%\break
    f2 e    | % m7
    f2 g_2  | % m8
%\break
    f2 e  | % m9
    f2 e  | % m10
%\break
    f2 a          | % m11
    bf2 b8 a g f  | % m12
%\break
    \repeat volta 2 {
      e2 g       | % m13
      a2 f       | % m14
      c'2 f4 fs  | % m15
%\break
      g4 a b g_2  | % m16
      f2 e        | % m17
      c'2 a       | % m18
    }
%\break
    \alternative {
      {
        f2. fs4      | % m19
        g4 b a g8 f  | % m20
      }
      {
        d4 e f g     | % m21
      }
    }
%\break
    f8 a g f e4 g  | % m22
    \alternative {
      \volta 1 {
        c'2 b          | % m23
        a2 g           | % m24
      %\break
        f4 c' e2   | % m25
        b4 c' d e  | % m26
      }
      \volta 2 \volta #'() {
        \section
        \sectionLabel Coda
      }
    }
  }
  f2 e       | % m27
%\break
  a4 g f2     | % m28
  d4 e g g    | % m29
  c1\fermata  | % m30
  \fine
}

\score {
  \new PianoStaff \with { instrumentName = "Piano" }
  <<
    \new Staff \rh
    \new Staff \lh
  >>
  \layout {}
}

\score {
  \unfoldRepeats {
    <<
      \new Staff {
        \set Staff.midiInstrument = "acoustic grand"
        \rh
      }
      \new Staff {
        \set Staff.midiInstrument = "acoustic grand"
        \lh
      }
    >>
  }
 % \midi {
 %   \tempo 4=112
 % }
}

Reply via email to