% % Demo for mkvideo % % This file defines % - an A4 score (four pages) % - individual sheets for all voices (one page each) % % - one score to be used for video generation \ These will be combined % - five midi files for video generation / to five mp4 videos % % Patch your version of lilypond first, then run % % lilypond Wolf_Resignation % ./mkvideo % % The five videos produced by mkvideo are relatively small (about 4.5M each), % but a lot of temporary data is written to disk (more than 800M). % \version "2.19.65" \include "deutsch.ly" #(ly:set-option 'point-and-click #f) globMus = { #(set-accidental-style 'modern-cautionary) \autoBeamOff \dynamicUp \set Score.tempoHideNote = ##t \override Hairpin.to-barline = ##t \key f \major \time 4/4 \partial 4 } sopMusic = \relative c'' { \set Staff.instrumentName = \markup { \bold "Sopran " } c4\p a4. a8 b4\< d\> d\! (c8) b a4 f\pp f f f f g4. a8 g4 b a4. e8 cis4 dis e4. (fis8) e4 a4\p a4. a8 g4 g fis4. fis8 f4\< b ~ b b8 b des4 des es4. es8 eses4 des des4.\f\> b8 ges4 as f2\p ges4 r r2 r4 a8\p\< [(h)]\! c4. c,8\> h4 a'\! a4. gis8 gis4 h8\< [(cis)] d4. d8 cis4\> h h4\! (b8) a a4\< as8 [(des)] des4.\mf ces8 b4\> as ges4.\p (f8) es4\! r8^\fermata des8\pp des4 ges b8 (ges'4) f8 es4. des8 ces4\< ces ~ ces\> b8 as\! ges4 f b4.\> f8\! ges4 ges\pp ges4. ges8 ges4 f f^\markup {\bold\italic "ritardando"} (e8 [f]) e2 r2 r4^\markup {\bold\italic "a tempo"} c'4\p a4. a8 b4\< d d\> (c8)\! b a4 f\pp f f f f g4. a8 g4 b a4. e8 cis4 dis e4. (fis8) e4 a4\p a4. a8 g4\< g b4 (a8) g a2 c4\f c8\< c d4 d d4.\ff d8 e4\> e f4.\p e8 e8 [(d)] c4 c4 (b8 [c16 b]) a4 r8 f8\pp f4. f8 c' [(b)] a4 <}>> f4\! \bar "|." } altMusic = \relative c' { \set Staff.instrumentName = \markup { \bold "Alt " } c4\p c8 [(d e)] f b\< [(a)] g\> [(f)] f\! [(e f)] g g [(f)]a,4\pp b a d d f8 [(e)] f4 c c cis4. cis8 cis4 h h4. (d8 ~ d [cis]) cis e\p f4. f8 es4 es d4. d8 d\< [(es)] e [(f)] ges4 f f fes es4. es8 ges4 ces b4.\f ges8\> es4 es es4\p (des8 [ces]) b4\! r r1 r4 dis8\mf (e) fis4.\> fis8 eis4.\p eis8 eis4 fis fis\< gis8 [(a)] h4 eis,8 [(fis)] g4\> g g8\< [(fis)] f4 f8\mf [(fes)] es4 d8\> d es f es4\p ( d) es\! r8^\fermata ces8\pp b4 des ges ges ges b ces\< fes,8 [(f)] ges4\> f8 [(es)]\! es4 ces d\> b\! b f'8\pp [(es)] des4. es8 des4 des c4. (h8) b2 r2 r4 c4\p c8 [(d e)] f b\< [(a)] g [(f)] f\> [(e f)]\! g g [(f)] a,4\pp b a d d f8 [(e)] f4 c4 c cis4. cis8 cis4 h h4. (d8 ~ [d cis]) cis e\p f4. f8 f4\< f f e g (f) f\f\< f8 f f4 b h4.\ff g8 gis4\> g f4.\p f8 f4 f d (e) g f\pp c (d8) es f4 f f8 [\< (e16 d c8\> b]) a4\! \bar "|." } tenMusic = \relative c' { \set Staff.instrumentName = \markup { \bold "Tenor " } \clef "G_8" c4\p c4. c8 f4\< b,\> b\! (g8) e a4 f'8\pp [(e)] e [(d)] d [(c)] c (b4) a8 c4. h8 b8 [(c)] d [(dis)] fis [(e cis)] a a [(ais h)] a a [(gis16 fis e8 gis]) a4 cis4\p c4. c8 b4 b h a gis8\< [(a)] b [(ces)] des4 des ges, ges ges ges heses as8 [(f')] ges4.\f des8\> b4 ces as2\p ges4 r r4 fis8\p\< [(gis)] a4 c8 [(h)] a4.\! g8\> fis4 h h\! h8 [(cis)] d4 d h4 h gis\< cis8 [(d)] es4\> d cis8\< [(c)] h4 b\mf ces ges2\> (b4\p as) ges r8^\fermata f8\pp ges4 b des b ces fes fes8\< [(es)] ces4 es\> d8 [(es)]\! as,4 as as4.\> as8\! ges4 ges\pp b4. ges8 b4 b a4 (g) g2 r2 r4 c4\p c4. c8 f4\< b, b\> (g8)\! e a4 f'8\pp [(e)] e [(d)] d [(c)] c (b4) a8 c4. h8 b8 [(c)] d [(dis)] fis [(e cis)] a a [(ais)] h [(a)] a [(gis16 fis e8 gis)] a4\! cis\p c4. c8\< d4 h b b a2 a4\f\< a8 a b4 f' g4.\ff h,8 h4\> b c4.\p a8 b4 f f (g) e a\pp a4. a8 d4 f, c'\< (e,)\> f\! \bar "|." } basMusic = \relative c' { \set Staff.instrumentName = \markup { \bold "Baß " } \clef "bass" c4\p f,4. es8 d4\< b\> g\! (c8) cis d4 f, \pp g a b h c d e r r4 r8 a8 fis4 f e2 a,4 a'4\p f f, g g gis (a8) a b8\< [(h16 c)] des4 ges, ges b b ces4 ces c des ges4.\f f8\> es4 ces des2\p ges,4 fis8\p [(gis)] a4.\< his8 cis4 dis fis4.\> e8 dis4 h8\< [(cis)] d4\> cis\! h a gis fis eis gis a e' es\< d8 [(des)] ges4\mf (ces,2.\> b2\p) ces4 r8^\fermata des8\pp ges4 ges ges es ces ges' g\< (as) a4\> b8 ces\! c4 des b,\> d\! es ces\pp ges4. ces8 ges4 b f (c'8 [g)] c2 r2 r4 c'\p f,4. es8 d4\< b g\> (c8)\! cis d4 f,\pp g a b h c d e r r4 r8 a8 fis4 f e2 a,4 a\p f a h\< d g, c cis d8 [(e)] f4\f\< f b b g4.\ff g8 e4\> c a4.\p c8 b4 a g (c) cis d\pp es4 (d8) cis d4 c8 [(a16 b)] <}>> f,4\! \bar "|." } lA = \lyricmode { Komm, Trost der Welt, du stil -- le Nacht! Wie steigst du von den Ber -- gen sacht, die Lüf -- te } lB = \lyricmode { al -- le } lC = \lyricmode { schla -- fen; ein Schif -- fer nur noch, wan -- der -- müd', singt ü -- bers Meer sein A -- bend -- lied zu Got -- tes Lob im Ha -- fen. Die Jah -- re wie die Wol -- ken geh'n und las -- sen mich hier ein -- sam steh'n, die Welt hat mich ver -- ges -- sen, da trat'st du wun -- der -- bar zu mir, als ich beim Wal -- des -- rau -- schen hier ge -- dan -- ken -- voll ge -- ses -- sen. O Trost der Welt, du stil -- le Nacht! Der Tag hat mich so müd' ge -- macht, das } lD = \lyricmode { wei -- te } lE = \lyricmode { Meer schon dun -- kelt; laß' aus -- ruhn mich von Lust und Not, bis daß das ew' -- ge Mor -- gen -- rot den stil -- len Wald durch -- fun -- kelt, den stil -- len Wald durch -- fun -- kelt. } satWords = \lyricmode { \lA \lB \lC \lD \lE } bWords = \lyricmode { \lA \lC \lE } % % Some global definitions for header, paper and layout % \header { tagline = ##f } #(set-global-staff-size 17) \paper { #(set-paper-size "a4") left-margin = 2.0\cm binding-offset = 0\cm line-width = 17\cm top-margin = 1.7\cm bottom-margin = 1.5\cm horizontal-shift =0\mm ragged-bottom = ##f ragged-last-bottom = ##f print-page-number = ##f annotate-spacing=##f } \layout { \context{ \StaffGroup \override StaffGrouper #'staff-staff-spacing = #'((basic-distance . 0) (minimum-distance . 0) (padding . 0) (stretchability . 0)) \override StaffGrouper #'staffgroup-staff-spacing = #'((basic-distance . 0) (minimum-distance . 0) (padding . 0) (stretchability . 0)) } \context{ \Staff \override VerticalAxisGroup #'staff-staff-spacing = #'((basic-distance . 0) (minimum-distance . 10) (padding . 0) (stretchability . 0)) \override VerticalAxisGroup #'nonstaff-relatedstaff-spacing = #'((basic-distance . 0) (minimum-distance . 0) (padding . 0) (stretchability . 0)) \override VerticalAxisGroup #'nonstaff-unrelatedstaff-spacing = #'((basic-distance . 0) (minimum-distance . 0) (padding . 0) (stretchability . 0)) } \context{ \Lyrics \override LyricText #'font-size = #'0.0 %\override LyricText #'font-size = #'1.0 %\override LyricText #'font-name = "Tele-Antiqua" \override LyricHyphen #'minimum-distance = #0.6 \override LyricHyphen #'padding = #0.1 \override LyricHyphen #'dash-period = #12 \override VerticalAxisGroup #'nonstaff-relatedstaff-spacing = #'((basic-distance . 0) (minimum-distance . 0) (padding . 0.8) (stretchability . 10)) \override VerticalAxisGroup #'nonstaff-nonstaff-spacing = #'((basic-distance . 0) (minimum-distance . 0) (padding . 0.0) (stretchability . 0)) \override VerticalAxisGroup #'nonstaff-unrelatedstaff-spacing = #'((basic-distance . 0) (minimum-distance . 0) (padding . 1.5) (stretchability . 100)) } } % % The Score to be printed on A4 % \book { \bookOutputSuffix "Partitur" \paper { page-count = #4 } \markup { \general-align #X #LEFT \bold { \column { \fontsize #+2 \fill-line { {"Hugo Wolf: Sechs geistliche Lieder"} { "Partitur" }} \fontsize #+0 { "nach Gedichten von Joseph von Eichendorff" } \fontsize #-3 { " " } \fontsize #+4 { "Nr. 3: Resignation" } \fontsize #+5 { " " }}}} \score { \new ChoirStaff << \new Staff {\new Voice = sop {\globMus \tempo "Mäßig langsam" 4=63 \sopMusic}}\new Lyrics \with{}\lyricsto sop {\satWords} \new Staff {\new Voice = alt {\globMus \altMusic}}\new Lyrics \with{}\lyricsto alt {\satWords} \new Staff {\new Voice = ten {\globMus \tenMusic}}\new Lyrics \with{}\lyricsto ten {\satWords} \new Staff {\new Voice = bas {\globMus \basMusic}}\new Lyrics \with{}\lyricsto bas {\bWords} >> \layout{ system-count = #12 \context { \Voice \consists "Ambitus_engraver" } } } } % % Single Voices to be printed on A4 % \book { \bookOutputSuffix "Auszug-Sopran" \markup { \general-align #X #LEFT \bold { \column { \fontsize #+2 \fill-line { {"Hugo Wolf: Sechs geistliche Lieder"} { "Sopran" }} \fontsize #+0 {"nach Gedichten von Joseph von Eichendorff"} \fontsize #-3 { " " } \fontsize #+4 { "Nr. 3: Resignation" } \fontsize #+5 { " " }}}} \score { \new Staff { \globMus \tempo "Mäßig langsam" 4=63 \sopMusic } \addlyrics \satWords \layout { system-count = #10 }} } \book { \bookOutputSuffix "Auszug-Alt" \markup { \general-align #X #LEFT \bold { \column { \fontsize #+2 \fill-line { {"Hugo Wolf: Sechs geistliche Lieder"} { "Alt" }} \fontsize #+0 {"nach Gedichten von Joseph von Eichendorff"} \fontsize #-3 { " " } \fontsize #+4 { "Nr. 3: Resignation" } \fontsize #+5 { " " }}}} \score { \new Staff { \globMus \tempo "Mäßig langsam" 4=63 \altMusic } \addlyrics \satWords \layout { system-count = #10 }} } \book { \bookOutputSuffix "Auszug-Tenor" \markup { \general-align #X #LEFT \bold { \column { \fontsize #+2 \fill-line { {"Hugo Wolf: Sechs geistliche Lieder"} { "Tenor" }} \fontsize #+0 {"nach Gedichten von Joseph von Eichendorff"} \fontsize #-3 { " " } \fontsize #+4 { "Nr. 3: Resignation" } \fontsize #+5 { " " }}}} \score { \new Staff { \globMus \tempo "Mäßig langsam" 4=63 \tenMusic } \addlyrics \satWords \layout { system-count = #10 }} } \book { \bookOutputSuffix "Auszug-Bass" \markup { \general-align #X #LEFT \bold { \column { \fontsize #+2 \fill-line { {"Hugo Wolf: Sechs geistliche Lieder"} { "Baß" }} \fontsize #+0 {"nach Gedichten von Joseph von Eichendorff"} \fontsize #-3 { " " } \fontsize #+4 { "Nr. 3: Resignation" } \fontsize #+5 { " " }}}} \score { \new Staff { \globMus \tempo "Mäßig langsam" 4=63 \basMusic } \addlyrics \bWords \layout { system-count = #10 }} } %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % Video % #(set-global-staff-size 19) #(set! paper-alist (cons '("video" . (cons (* 21 cm) (* 11.8125 cm))) paper-alist)) % We need a 16:9 paper format \include "videohelper.ily" % include only _once_. Exactly one score with \layout {...} must follow, at least one score with \midi {...} must follow. %\noPageRepetitions % If you use noPageRepetitions there will be a pdf with all objects that change color dependent on moment colored, % but _without_ repeated pages. Use as long as you tune the score layout. %\noColorStems % Don't give color to stems and flags %\noColorDots % Don't give color to dots %\noColorHeads % Don't color notehedas % The following three commands might be used to override defaults defined in the mkvideo script: % #(videoResolution 1280 720 ) % Defaults to 1280 x 720. Use default, 1920x1080, 1024x576 or other resolutions. #(videoPreset "veryslow") % Defaults to "veryslow". Possible values: "ultrafast", "superfast", "veryfast", "faster", "fast", "medium", "slow", "slower", "veryslow", "placebo" % There is no reason to use placebo. I recommend "ultrafast" during development and "veryslow" for release. #(audioBitRate "128k") % Defaults to 128k \book { \bookOutputSuffix "Partitur-Video" \paper { #(set-paper-size "video") top-margin = 10\mm bottom-margin = 10\mm line-width = 190\mm left-margin = 12\mm page-top-space = 0\mm horizontal-shift = 0\mm ragged-bottom = ##f ragged-last-bottom = ##f print-page-number = ##f page-breaking = #ly:optimal-breaking system-count = 14 max-systems-per-page = 1 min-systems-per-page = 1 top-system-spacing = #'((basic-distance . 0) (minimum-distance . 7) (padding . 0) (stretchability . 0)) last-bottom-spacing = #'((basic-distance . 0) (minimum-distance . 8) (padding . 0) (stretchability . 0)) } % The title page. There must be exactly _one_ title page . \markup { \column { \vspace #0 %\fill-line { \fontsize #18.0 \override #'(font-name . "Black Jack" ) "Resignation" } \fill-line { \fontsize #18.0 "Resignation" } \vspace #2 \fill-line { \fontsize #5.0 "Composer: Hugo Wolf (1860-1903)" } \vspace #.4 \fill-line { \fontsize #5.0 "Poet: Joseph von Eichendorff (1788-1857) )" } \vspace #1.5 \fill-line { \fontsize #5.0 "Engraved by Knut Petersen using Lilypond 2.19.56" } %\vspace #0 %\fill-line{\center-column{ \epsfile #X #25 #"LilypondLogo.eps" }} } } \pageBreak % Start score on page 2 \score { \new ChoirStaff << \new Staff {\new Voice = sop {\globMus \tempo "Mäßig langsam" 4=63 \sopMusic}}\new Lyrics \with{}\lyricsto sop {\satWords} \new Staff {\new Voice = alt {\globMus \altMusic}}\new Lyrics \with{}\lyricsto alt {\satWords} \new Staff {\new Voice = ten {\globMus \tenMusic}}\new Lyrics \with{}\lyricsto ten {\satWords} \new Staff {\new Voice = bas {\globMus \basMusic}}\new Lyrics \with{}\lyricsto bas {\bWords} >> \layout{ \context { \Voice \consists "Ambitus_engraver" } \context{ \Staff \override VerticalAxisGroup #'staff-staff-spacing = #'((basic-distance . 0) (minimum-distance . 0) (padding . 3.0) (stretchability . 100)) } \context{ \Lyrics \override VerticalAxisGroup #'nonstaff-relatedstaff-spacing = #'((basic-distance . 0) (minimum-distance . 0) (padding . 1.0) (stretchability . 100)) \override VerticalAxisGroup #'nonstaff-unrelatedstaff-spacing = #'((basic-distance . 0) (minimum-distance . 0) (padding . 1.5) (stretchability . 100)) } } } } \pdfforvideo % This passes the name of the pdf to be used for video production to mkvideo % % Some definitions used for midi generation ... you probably want to change instrument names % and you might change or delete the volume overrides ... % #(define my-absolute-volume-alist '()) #(set! my-absolute-volume-alist (append '(("ff" . 1.00) '("f" . 0.90) ("mf" . 0.81) ("mp" . 0.73) ("p" . 0.66) ("pp" . 0.59)) my-absolute-volume-alist)) #(define-public (my-dynamic-absolute-volume s) (assoc-get s my-absolute-volume-alist)) panmidi = { \set Score.dynamicAbsoluteVolumeFunction = #my-dynamic-absolute-volume \set Staff.midiInstrument = #"pan flute" \set Staff.midiMinimumVolume = #0.00 \set Staff.midiMaximumVolume = #1.0 \set Staff.midiReverbLevel = #1.0 } pianomidi = { \set Score.dynamicAbsoluteVolumeFunction = #my-dynamic-absolute-volume \set Staff.midiInstrument = #"acoustic grand" \set Staff.midiMinimumVolume = #0.00 \set Staff.midiMaximumVolume = #0.65 \set Staff.midiReverbLevel = #1.0 } % Video 1: All voices played with a pan flute % % r1*5 \tempo 4 = 60 after \sopMusic adds some silence to the end of the midi file. % Without an event like \tempo silence at the end would be deleted, so we need it. \book{ \bookOutputSuffix "Video-Alle" \score { << \new Staff { \globMus \panmidi \set Staff.midiPanPosition = #-1.00 { \tempo 4=63 \sopMusic r1*5 \tempo 4 = 60}} \new Staff { \globMus \panmidi \set Staff.midiPanPosition = #-0.33 { \altMusic }} \new Staff { \globMus \panmidi \set Staff.midiPanPosition = #+0.33 { \tenMusic }} \new Staff { \globMus \panmidi \set Staff.midiPanPosition = #+1.00 { \basMusic }} >> \midi {} } } \midiforvideo % this passes the name of midi files to be used for video production to mkvideo % % Video 2 to 5 all use a low volume piano version of all voices in the background ... % pianoback = { << \new Staff { \globMus \pianomidi \set Staff.midiPanPosition = #-1.00 { \tempo 4=63 \sopMusic r1*5 \tempo 4 = 60}} \new Staff { \globMus \pianomidi \set Staff.midiPanPosition = #-0.33 { \altMusic }} \new Staff { \globMus \pianomidi \set Staff.midiPanPosition = #+0.33 { \tenMusic }} \new Staff { \globMus \pianomidi \set Staff.midiPanPosition = #+1.00 { \basMusic }} >> } % % ... and a higher volume pan flute for the emphasized voice % \book{ \bookOutputSuffix "Video-Alle-Grand" \score { \pianoback \midi {} }} \midiforvideo \book{ \bookOutputSuffix "Video-Sopran" \score { << \pianoback \new Staff { \globMus \panmidi \set Staff.midiPanPosition = #+0.00 { \sopMusic }} >> \midi {} }} \midiforvideo \book{ \bookOutputSuffix "Video-Alt" \score { << \pianoback \new Staff { \globMus \panmidi \set Staff.midiPanPosition = #+0.00 { \altMusic }} >> \midi {} }} \midiforvideo \book{ \bookOutputSuffix "Video-Tenor" \score { << \pianoback \new Staff { \globMus \panmidi \set Staff.midiPanPosition = #+0.00 { \tenMusic }} >> \midi {} }} \midiforvideo \book{ \bookOutputSuffix "Video-Bass" \score { << \pianoback \new Staff { \globMus \panmidi \set Staff.midiPanPosition = #+0.00 { \basMusic }} >> \midi {} }} \midiforvideo