http://shamusworld.gotdns.org/music/one-small-child.pdf (see page 2, bars 33-34)
I have a dream, that one day Lilypond will make codas first class citizens instead of having to exist as a series of ugly hacks. In that day, I could simply write \coda (with maybe some options) and Lilypond would automagically do the right thing. Alas, that day is not today. :-( In trying to make nice charts with Lilypond, I keep running into this issue. It works fine for the most part, though it's still an ugly hack that I have to put in multiple places for my charts to look right; but when it fails it's frustrating beyond belief (for me, and, I suspect, others). I can hear the replies already: 'why don't you just put a \break in there, why don't you just do x, y, and z to work around it?' But this is the problem: the hacks are inconsistent, and while they might work in some places they don't in others (like you see on page two, where the 4/4 time signature should be on bar 34 but instead is floating out in space, and spurious bars are floating on the edge of the page). If you somehow manage to make a change where the coda falls in the middle of page, another change will push it to the side and screw things up. So this my my call for an official path within the internals of Lilypond to support codas for real without having to resort to ugly hacks that work only some of the time (depending on where in the line they fall). I am willing to undertake the coding of this feature, if someone can point me in the right direction. But this needs to change. I am very surprised, really, that such a common musical construct has no official support in Lilypond.
\version "2.19.0" \include "pop-chords.ly" \include "english.ly" % Good sizes are 16, 18, & 20 (11, 13, 14, 23, 26) staffSize = #20 #(set-default-paper-size "letter") #(set-global-staff-size staffSize) #(ly:set-option (quote no-point-and-click)) \header { title = \markup { \override #'(font-family . sans) \fontsize #3.5 "One Small Child" } composer = \markup { \override #'(font-family . sans) \fontsize #1.3 "D. Meece" } arranger = \markup { \override #'(font-family . sans) \fontsize #1.3 "arr. Ed Smart" } tagline = $(string-append "Engraved by JLH and Lilypond " (lilypond-version)) } % % Song's structure % Global = { \key d \minor \numericTimeSignature \time 4/4 % Intro s1*4 \bar "||" % 1-4 % Verse \mark \markup { \override #'(font-family . sans) { \box { A } } } s1*9 | % 5-13 \once \override Score.RehearsalMark #'self-alignment-X = #right \mark \markup { { To Coda } \hspace #0.5 \musicglyph #"scripts.coda" } s1 \bar ".|:-||" % 14 \repeat volta 2 { % Verse \mark \markup { \override #'(font-family . sans) { \box { B } } } s1*10 \bar "||" % 15-24 % Bridge \mark \markup { \override #'(font-family . sans) { \box { C } } } s1*7 | % 25-31 } \alternative { { \time 6/4 s1. | % 32 } { \time 6/4 s1. \bar "||" % 33 } } \time 4/4 \once \override Score.RehearsalMark #'self-alignment-X = #right \mark \markup { \hspace #0.0 \raise #1.0 \italic { D.C. al Coda } } % Coda % blank measure between last measure and coda % \stopStaff s1 \bar "" \startStaff % That removed the spurious floating bar line from line break \stopStaff s1 \startStaff % \break % Meh \set Score.currentBarNumber = #34 \once \override Score.RehearsalMark #'self-alignment-X = #left \mark \markup { { \musicglyph #"scripts.coda" } "Coda" } s1*5 \bar "|." % 34-38 } % % Lead vocal % LeadVox = \relative c' { % Intro s1*4 | % 1-4 % Verse d4 a' g f8 e | % 5 d4 e8 f e ( d ) c4 | % 6 d4 a' c c8 c | % 7 b8 a g4 a2 | % 8 d,4 a' g f8 e | % 9 d4 e8 f e ( d ) c4 | % 10 d4 a' g f8 e | % 11 d1 | % 12 d4 a' g f8 e | % 13 d2. r4 | % 14 % Verse d4 a' g f8 e | % 15 d4 e8 ( f ) e ( d ) c4 | % 16 d4 a' c c8 c | % 17 b8 a g4 a2 | % 18 d,4 a' g f8 e | % 19 d4 e8 f e d c4 | % 20 d4 a' g f8 e | % 21 d4 ( a' g ) f8 ( e | % 22 d4 a' g f8 e | % 23 d1 ) | % 24 % Bridge a'4 a g a8 bf | % 25 a4 bf8 a g4 c, | % 26 a'4 a g c | % 27 f,8 ( e ) d4 c2 | % 28 a'4 a g c | % 29 a4 bf8 a g4 c, | % 30 a'4 a g c | % 31 f,8 ( e ) d4 c1 | % 32 f8 ( e ) d4 c1 | % 33 % Coda s1 % For blank measure d1 | % 34 d4 a' g-\fermata f8 c' | % 35 d1 | % 36 s1*2 | % 37-38 } LeadVoxText = \lyricmode { One small child in a land of a thou -- _ sand, One small dream of a sav -- ior to -- night. One small hand reach -- ing out to the star -- _ light, One small ci -- ty of life. One small ci -- ty of life. One king bring -- ing his gold and _ ri -- _ ches, One king rul -- ing an ar -- my of might, One king kneel -- ing with in -- cense and can -- dle -- light, One King bring -- ing us life. __ _ _ Oh, __ _ _ _ _ _ _ _ See him ly -- ing a cra -- dle be -- neath him, See him smil -- ing in _ the stall. See his moth -- er prais -- ing his fa -- ther, See his ti -- ny eye -- _ lids fall. _ _ _ _ life. One small sav -- ior of life. } LeadVoxTextB = \lyricmode { One small child in a land of a thou -- _ sand, One small dream in a peo -- ple of might, One small hand reach -- ing out to the star -- _ light, One small sav -- ior of life. One small sav -- ior of _ One small light from the flame of a can -- _ dle, One small light from a ci -- ty of might, One small light from the stars in the end -- less night, One small light from his face. __ _ _ Oh, __ _ _ _ _ _ _ _ See the shep -- herds _ kneel -- ing be -- fore him, See the kings on bend -- _ ed knee, See the moth -- er prais -- ing his fa -- ther, See the bless -- ed _ _ _ _ in -- _ fant sleep. } Riffs = \relative c''' { % Intro \tiny << { \tiny a2 g } \\ { \tiny r8 a, d f c4 g } >> | % 1 << { f'2 e } \\ { a,4 d8 a bf4 g } >> | % 2 << { d'4 e8 f e4 ~ e16 d cs8 } \\ { f,2 g } >> | % 3 << { <a d>1 } \\ { g2 f } >> | % 4 s1*27 | % 5-31 s1.*2 | % 32-33 s1*3 | % 34-35 (+ blank Coda measure) << { \tiny a'2 g } \\ { \tiny r8 a, d f c4 g } >> | % 36 << { f'2 e } \\ { a,4 d8 a bf4 g } >> | % 37 <fs a d>1-\fermata | % 38 \normalsize } % % Chord names % Chords = \chordmode { % Intro d2:m c/e | % 1 d2:m/f g:m6 | % 2 d2:m/a a:7 | % 3 d2:sus4 d:m | % 4 % Verse d2:m c | % 5 d2:m a:m7 | % 6 d2:m f | % 7 g2 a4:sus4 a | % 8 d2:m a:m | % 9 bf2:maj7 a:m7 | % 10 g2:m7 a:m7 | % 11 d2:m c | % 12 bf2:maj7 c | % 13 d2:sus4 d:m | % 14 % Verse d2:m c | % 15 bf2:maj7 a:m7 | % 16 d2:m f | % 17 g2 a4:sus4 a | % 18 d2:m a:m7 | % 19 bf2:maj7 a:m7 | % 20 g2:m7 a:m7 | % 21 d2:m7 c | % 22 bf2:maj7 c | % 23 d1:m | % 24 % Bridge f2 g:m/f | % 25 f2 g:m/f | % 26 f2 c/e | % 27 d4:m7 g:7 c2:sus2 | % 28 f2 g:m/f | % 29 f2 g:m/f | % 30 f2 c/e | % 31 d4:m7 g:7 c1:sus2 | % 32 d4:m7 g:7 c1:sus2 | % 33 % Coda s1 % For blank measure bf2:maj7 a:m7 | % 34 g2:m7 c | % 35 d2:m c/e | % 36 d2:m/f g:m6 | % 37 d1 | % 38 } % % Chord rhythms % Rhythm = \relative c { \numericTimeSignature \override NoteHead #'style = #'slash \teeny % Intro c2 c | % 1 c2 c | % 2 c2 c | % 3 c4 c c2 | % 4 % Verse c4 c c c | % 5 c4 c c c | % 6 c4 c c c | % 7 c4 c c c | % 8 c4 c c c | % 9 c4 c c c | % 10 c4 c c c | % 11 c4 c c c | % 12 c4 c c c | % 13 c4 c c2 | % 14 % Verse c4 c c c | % 15 c4 c c c | % 16 c4 c c c | % 17 c4 c c c | % 18 c4 c c c | % 19 c4 c c c | % 20 c4 c c c | % 21 c4 c c c | % 22 c4 c c c | % 23 c4 c c c | % 24 % Bridge c4 c c c | % 25 c4 c c c | % 26 c4 c c c | % 27 c4 c c c | % 28 c4 c c c | % 29 c4 c c c | % 30 c4 c c c | % 31 c4 c c2 ~ c2 | % 32 c4 c c2 ~ c2 | % 33 % Coda \stopStaff s1 \startStaff % For blank measure c4 c c c | % 34 c4 c c2-\fermata | % 35 c2 c | % 36 c2 c | % 37 c1-\fermata | % 38 } Dynamics = { % s1*4 | % 1-4 % s4_\markup { \italic { 1st X: Melody, 2nd X+: Solos } } s2. | % 5 % s1*38 | % 1-38 % s4_\markup { \bold \italic { Double Chorus 2nd X } } s2. | % 39 % s1*7 | % 40-46 % s4_\markup { \bold { Tutti } } s2. | % 47 } \score { << \Global % The "roadmap" that everything else depends on \set Score.skipBars = ##t \set Score.melismaBusyProperties = #'() \context Staff << \new Voice = "lead" \LeadVox \new Voice \Riffs \new Lyrics \lyricsto "lead" \LeadVoxText \new Lyrics \lyricsto "lead" \LeadVoxTextB >> \new ChoirStaff << \new ChordNames \Chords %Capo 4 edition % \new ChordNames \transpose b g \Chords \new RhythmicStaff << \Rhythm \Dynamics >> >> >> } \paper { #(define fonts (make-pango-font-tree "Times New Roman" "LilyJAZZText" "Luxi Mono" (/ staffSize 20))) % Spread staves vertically across last page (default: t) ragged-last-bottom = ##f % Don't spread staves vertically across the page (default: f) % ragged-bottom = ##t % Allow partial line for last stave (default: f) ragged-last = ##t % To find out what's eating the space at the top... % annotate-spacing = ##t }
% Pop chords as used in English/American popular music % by James L. Hammons % Written against \version "2.16.0" % Was \raise #1.0 for both chordFlat = \markup { \hspace #0.2 \tiny \raise #0.8 \flat } chordSharp = \markup { \hspace #0.1 \teeny \raise #0.8 \sharp } popChordsMusic = { % Triads <c g>-\markup { "5" } <c d g>-\markup { "2" } % <c d g>-\markup { "sus2" } <c f g>-\markup { "sus" } % <c f g>-\markup { "sus4" } % <c ees ges>-\markup { \small \raise #1.0 "o" } <c ees ges>-\markup { \raise #0.8 "o" } % <c ees ges>-\markup { "dim" } % <c e gis>-\markup { "aug" } % or + % Sixths <c e g a>-\markup { "6" } <c ees g a>-\markup { "m6" } % Sevenths (including altered) <c e g bes>-\markup { "7" } <c ees g bes>-\markup { "m7" } <c e g b>-\markup { "maj7" } <c f g bes>-\markup { "7sus4" } <c d g bes>-\markup { "7sus2" } <c e ges bes>-\markup { "7" \chordFlat "5" } <c e gis bes>-\markup { "7" \chordSharp "5" } % <c e gis bes>-\markup { "aug7" } % or +7 <c ees g b>-\markup { "m(maj7)" } % <c ees ges beses>-\markup { \small \raise #1.0 { "o" } "7" } <c ees ges beses>-\markup { \raise #0.8 { "o" } "7" } % <c ees ges beses>-\markup { "dim7" } % <c ees ges bes>-\markup { \small \raise #1.0 { $(ly:wide-char->utf-8 #x00f8) } "7" } % <c ees ges bes>-\markup { \raise #0.8 { $(ly:wide-char->utf-8 #x00f8) } "7" } <c ees ges bes>-\markup { "m7" \chordFlat "5" } <c e ges b>-\markup { "maj7" \chordFlat "5" } <c e gis b>-\markup { "maj7" \chordSharp "5" } % Ninths (including altered--incomplete) <c e g bes d'>-\markup { "9" } <c ees g bes d'>-\markup { "m9" } <c e g b d'>-\markup { "maj9" } <c e g d'>-\markup { "add9" } <c e g a d'>-\markup { "6/9" } <c ees g a d'>-\markup { "m6/9" } <c ees g b d'>-\markup { "m(maj9)" } <c e g bes des'>-\markup { "7" \chordFlat "9" } <c e g bes dis'>-\markup { "7" \chordSharp "9" } %dim7add9, dim7b9, dim7#9, 9#5, 9b5, maj9#5, maj9b5, 9sus4, 9sus2 <c e gis bes dis'>-\markup { "+7" \chordSharp "9" } % Elevenths (incomplete) <c e g bes d' f'>-\markup { "11" } <c ees g bes d' f'>-\markup { "m11" } <c e g b d' f'>-\markup { "maj11" } <c e g f'>-\markup { "add11" } <c ees g f'>-\markup { "m add11" } <c ees g bes f'>-\markup { "m7add11" } % Thirteenths (incomplete) <c e g bes d' a'>-\markup { "13" } <c ees g bes d' a'>-\markup { "m13" } <c e g b d' a'>-\markup { "maj13" } <c e g a'>-\markup { "add13" } <c ees g a'>-\markup { "m add13" } <c e g bes des' a'>-\markup { "13" \chordFlat "9" } % Misc add chords <c e g bes des' aes'>-\markup { "7" \chordFlat "9" \chordFlat "13" } <c e gis bes des'>-\markup { "7" \chordSharp "5" \chordFlat "9" } <c e g b d' fis'>-\markup { "maj9" \chordSharp "11" } <c e g bes d' fis'>-\markup { "9" \chordSharp "11" } % <c e g bes d' a'>-\markup { "9/13" } } % Add to existing exceptions popChordsAdd = #(append (sequential-music-to-chord-exceptions popChordsMusic #t) ignatzekExceptions) % Bah, can't we set this globally? YES! See below... % \set chordNameExceptions = #popChords % Bah, this doesn't work either... % #(set chordNameExceptions popChords) % Let's try fixing the accidentals with some Scheme... #(define (chord-name->pop-markup pitch lowercase?) (let* ((alt (ly:pitch-alteration pitch))) (make-line-markup (list (make-simple-markup (vector-ref #("C" "D" "E" "F" "G" "A" "B") (ly:pitch-notename pitch))) ;; If it's natural, do nothing (if (= alt 0) (make-line-markup (list empty-markup)) (if (= alt FLAT) ;; Otherwise, handle adding the flat symbol (make-line-markup (list (make-hspace-markup 0.3) ;; WAS: 0.4 (make-tiny-markup (make-raise-markup 1.0 (make-musicglyph-markup "accidentals.flat"))) ) ) ;; or handle adding the sharp symbol (make-line-markup (list (make-hspace-markup 0.1) ;; WAS: 0.2 (make-teeny-markup (make-raise-markup 1.0 (make-musicglyph-markup "accidentals.sharp"))) ) ) ) ) ) ) ) ) %{ popChords = { \set chordNameExceptions = #popChordsAdd \set chordRootNamer = #chord-name->pop-markup \override ChordName #'extra-spacing-width = #'(-1.25 . 1.25) } %} \layout { \context { \Score chordNameExceptions = #popChordsAdd chordRootNamer = #chord-name->pop-markup \override ChordName #'extra-spacing-width = #'(-1.25 . 1.25) } }
_______________________________________________ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user