User:Crantila/FSC/Typesetting/LilyPond/Piano

\version "2.12.2"

\header { title = "Impromptu (Excerpt)" composer = "Schubert, Franz" opus = "Opus 90/4" % Remove default LilyPond tagline tagline = ##f }

tempoMark = { \once \override Score.RehearsalMark #'self-alignment-X = #LEFT \once \override Score.RehearsalMark #'break-align-symbols = #'(time-signature key-signature) \once \override Staff.TimeSignature #'break-align-anchor-alignment = #LEFT \mark \markup \bold "Allegretto" }

global = { \tempoMark \key as \major \time 3/4 }

%%%%%%%% NOTES %%%%%%%% %%%% RIGHT %%%% right = \relative c''' {  \global % Music follows here. ces16(-2 es ces as-1  as-3 ces as es-1   es as es ces |   ces16-2 es ces as   as-3 ces as es   8-. r |   ces'16(-2 es ces as-1   as-3 ces as es-1   es as es ces | ces16-2 es ces as  as-3 ces as es   8-.) r |   % M.5   4-_-3 -.( -. |  4-. -.-4 -.)-3 |  ces'16( es ces as   as ces as es   es as es ces | ces16 es ces as  as ces as es   8-.) r |   ces'16( es ces as   as ces as es   es as es ces | % M.10 ces16 es ces as  as ces as es   8-.) r |   4-_-2 -.( -. |  4-. -.-4 -.)-3 |  es''16(-2 ges es ces   ces-2 es ces ges   ges-2 ces ges es | es16-2 ges es ces  ces-3 es ces ges   <> r |   % M.15   es'16( ges es ces   ces es ces ges   ges ces ges es | es16 ges es ces  ces es ces ges   <> r |   4-_-3 -.( -. |  4-. -.-4 -.-)-3 |  d'16(-2 fis d b   b-2 d b fis   fis-2 b fis d | % M.20 d16-2 fis d b  b-3 d b fis   8-.) r |   d'16( fis d b   b d b fis   fis b fis d | d16 fis d b  b d b fis   8-.) r |   4-_ -.( -. |  4-. -.-4 4-.-3 | % M.25 4-.) <ais cis g'>-.(-5 <ais cis gis'>-. |  <ais cis g'>4-. -. -.-4 |  4-.) <fes as! fes'>-.(\> <fes as fes'>-. |  <fes as fes'>4-. <es! as es'!>-. <des! as' des!>-. |  4-.) -.( -. |   % M.30 4-.) -.( -.) |  c''!16(-2 es c as   as-3 c as es   es-2 as es c | c16-2 es c as  as-3 c as es   8-.) r |   c'16( es c as   as c as es   es as es c | c16 es c as  as c as es   8-.) r |   % M.35   es''16(-2 as es c   c-2 es c as   as-3 c as es | es16-2 as es c  c-2 es c as   8-.) r |   es''16( as es c   c es c as   as c as es | es16 as es c  c es c as   8-.) r |   c16(-2 es c as   as-2 c as es   as8-.) r |   % M.40   des16(-3 f des as   as-2 des as f   as8-.) r |   es'16(-3 g es bes   bes-2 es bes g   bes8-.) r |   es16(-2 as es c   c-2 es c as   c8-.) r |   c'16(-2 es c as   as-2 c as es as8-.) r |   des16(-3 f des as   as-2 des as f   as8-.) r |   % M.45   es'16(-3 g es bes   bes-2 es bes g bes8-.) r |   es16(-2 as es c   c-2 es c as   c8-.) r |   c,16( es c as   as c as es   as8-.) r |   des16( f des as   as des as f   as8-.) r |   es'16( g es bes   bes es bes g   bes8-.) r |   % M.50   es16( as es c   c es c as   c8-.) r |   c'16( es c as   as c as es as8-.) r |   des16( f des as   as des as f   as8-.) r |   es'16( g es bes   bes es bes g bes8-.) r |   es16( as es c   c es c as   c8-.) r |   % M.55   es16( g es bes   bes es bes g bes8-.) r |   es16( as es c   c es c as   c8-.) r |   \ottava #1   f='''16( a f c   c f c a   c8-.->) r | f16( bes f des  des f des bes-1   des8-.->) r | f16( a f c  c f c a   c8-.->) r | % M.60 f16( bes f des  des f des bes-1   des8-.->) r | as'!16( c as es  es as es c   es8-.) r | as16( des as f  f as f des   f8-.) r | as16( c as es  es as es c   es8-.) r | as16( des as f  f-2 as f des   des-3 f des as |   % M.65   \ottava #0   as=''16(-2 des as f   f-2 as f des   des-3 f des as) |   as'16( des as f   f as f des   des f des as | as16 des as f  f as f des   des f des as) |   des16-3( fes des bes   bes-2 des bes ges  des'-3 fes des bes | bes16 des bes ges  des' fes des bes   bes des bes ges) |   % M.70   des'16->(-3 es des bes   bes16-2 des bes ges   des'->-3 es des bes | bes16 des bes ges  des'-> es des bes   bes des bes ges) |   << {         es'4(-3 as 4 g-4 | f4-3 des' bes | bes4)(-5 as) as |        % M.75         as4(-5 g) g |         es4(-3 as g-4 | f4 f' des-5 | des4)( c)-4 c |        c4(-5 bes)-4 bes |      } \\      {         \times 2/3 {es,8[ c as]} \times 2/3 {as'[ es-2 c]} \times 2/3 {g'[ es c]} |         \times 2/3 {f8[ des as]} \times 2/3 {des'8[ f, des]} \times 2/3 {bes'[ f des]} |         \times 2/3 {bes'8[ es, des]} \times 2/3 {as'[ es c]} \times 2/3 {as'[ es c]} |         % M.75         \times 2/3 {as'8[ es c]} \times 2/3 {g'[ es bes]} \times 2/3 {g'[ es bes]} |         \times 2/3 {es8[ c as]} \times 2/3 {as'[ es-2 c]} \times 2/3 {g'[ es c]} |         \times 2/3 {f8[ des as]} \times 2/3 {f''[ as, f]} \times 2/3 {des'[ f, des]} |         \times 2/3 {des'8[ as-2 f]} \times 2/3 {c'[ as es]} \times 2/3 {c'[ as es]} |         \times 2/3 {c'8[ es, des]} \times 2/3 {bes'[ es, des]} \times 2/3 {bes'[ es, des]} |      }   >>   % M.80   c'16(-2 es c as   as-2 c as es   as8-.) r |   des16(-3 f des as   as-2 des as f   as8-.) r |   es'16(-3 g es bes   bes-2 es bes g   bes8-.) r | es16(-2 as es c  c-2 es c as   c8-.) r | c'16(-2 es c as  as-2 c as es   as8-.) r | % M.85 des16(-3 f des as  as-2 des as f   as8-.) r | es'16(-3 g es bes  bes-2 es bes g   bes8-.) r | es16(-2 as es c  c-2 es c as   c8-.) r | c,16( es c as  as c as es   as8-.) r | des16( f des as  as des as f   as8-.) r | % M.90 es'16( g es bes  bes es bes g   bes8-.) r | es16( as es c  c es c as   c8-.) r | c'16( es c as  as c as es   as8-.) r | des16( f des as  as des as f   as8-.) r | es'16( g es bes  bes es bes g   bes8-.) r | % M.95 es16( as es c  c-2 es c as   c8-.) r | es16( g es bes  bes es bes g   bes8-.) r | es16( as es c  c es c as   c8-.) r | es16( g es bes  bes es bes g   bes8-.) r | es16( as es c  c-2 es c as   as-3 c as es |   % M.100   es16-2 as es c   c-2 es c as   as-3 c as es) | es'16( as es c  c es c as   as c as es |   es16 as es c   c es c as   es'-3 as es c)-1 | \clef bass as16(-2 c as es  as c as es   as c as es |   as16 c as es   as c as es   as c as es) | % M.105 \clef treble << {         as'2.~ | as2. |     } \\      {         es16 ges es as,   es' ges es as,   es' ges es as, | es'16 ges es as,  es' ges es as,   es' ges es as, | }  >> %% TRIO %% \bar "||" \key cis \minor gis'2. }

%%%% LEFT %%%% left = \relative c { \global % Music follows here. as4-. <as' ces es>2~-3 | 2 <es bes' es>8-. r | as,4-. <as' ces es>2~ | 2 <es bes' es>8-. r | % M.5 4-_ <es bes' fes'>-.( <es bes' fes'>-. | <es bes' fes'>4-. <es bes' es>-.-4 <es bes' des>-.-3) | as,4-. <as' ces es>2~ | 2 <es bes' es>8-. r | as,4-. <as' ces es>2~ | % M.10 2 <es bes' es>8-. r | 4-_ <ges bes fes'>-.( <ges bes fes'>-. | <ges bes fes'>4-. -.-4 -.-3) | ces,4-. <ges' ces es>2~-4 | 2 <ges fes'>8-. r | % M.15 ces,4-. <ges' ces es>2~ | 2 <ges fes'>8-. r | 4-_ <ges fes'>-.( <ges fes'>-. | <ges fes'>4-. <ges es'>-._4 <ges des'>-._3) | b,4-. <fis' b d>2~_4 | % M.20 2 <fis e'>8-. r | b,4-. <fis' b d>2~ | 2 <fis e'>8-. r | 4-_ <a g'>-.( <a g'>-. | <a g'>4-. <a fis'>-. <a_5 e'_1>-. |% <<a-.-5 e'-1>> |  % M.25  4-.) <fis e'>-.( <fis e'>-. |  <fis e'>4-. <fis-._4 cis'_1>-. -. |  4-.) <des! as'! des!>-.( <des as' des>-. | <des as' des>4-. <es!_4 as ces>-. <fes_3 as>-. |  4-.) -.( -. |  % M.30  <es_3 g bes>4-.) -.( -.) | as,4-. <es' as c>2~ | 2 <es des'>8-. r | as,4-. <es' as c>2~ | 2 <es des'>8-. r | % M.35 as,4-. <es' as c>2~ | 2 <es des'>8-. r | as,4-. <es' as c>2~ | 2 <es des'>8-. r | as,4 <ges' as c>2 | % M.40 des4-. 2 | es,4-. <es' bes' des>2 | as,4-. <es' as c>2 | as,4 <ges' as c>2 | des4-. 2 | % M.45 es,4-. <es' bes' des>2 | as,4-. <es' as c>2 | << { e=4(-2 as4.-> g8-1 |      f4-2 des'4.->-1 c8-1 |       bes4-2 es4.->-1 d8-1 |       % M.50       c4-2 es2->) | es,=4(-2 as4.-> g8-1 |      f4-2 des'4.->-1 c8-1 |       bes4 es4.-> des8-1 |       c4-2 es4.-> c8 |       % M.55       bes4)( es4.-> des8 |       c4 es4.-> c8) | c4( f4.-> es8-2 |      des4-3 f4.-> des8-2 |       c4)( f4.-> es8 |       % M.60       des4 f4.-> des8 |       \clef treble       es4)( as4.-> ges8-1 |       f4-2 as4.-> f8 |       es4)( as4.-> ges8 |       f4) % end of polyphonic section } \\    { as,,=,2. |      des2.-4 | es2.-5 | % M.50 as2.-3 | as,=,2. |      des2.-4 | es2. |      as2.-3 | % M.55 es2. |      as2. |      f2. |      bes2.-4 | f2. |      % M.60 f2.-4 | \clef treble as2. |      des2.-3 | as2. |      des4 % end of polyphonic section } >>  r4 r | % beats 2 and 3 only; this eliminates redundant rests % M.65 R2. | as'8-1 r f r des r | \clef bass as8-1 r f r des r | <ges, bes des fes>2 4~ | 4 2 | % M.70 2 4~ | 4 2 |  as2-3( c4 |  des4-2 bes des |  es2.)( |  % M.75  es,2.) | as2-3( c4 | des4 bes-5) << {      bes'~-1 | bes4( as-2) as~-1 | as4( g-2) g-1 | } \\    {       des(-4 |       es2.) | es2. |    }  >>  % M.80 as,4-. <ges' as c>2 | des4-. 2 | es,4-. <es' bes' des>2 | as,4-. <es' as c>2 | as,4-. <ges' as c>2 | % M.85 des4-. 2 | es,4-. <es' bes' des>2 | as,4-. <es' as c>2 | << {      es4( as4.-> g8-1 |       f4 des'4.-> c8-1 |       % M.90       bes4 es4.-> des8-1 |       c4-2 es2->) | es,4( as4.-> g8 |      f4 des'4.-> c8 |       bes4 es4.-> des8 |       % M.95       c4 es4.-> c8 |       bes4)( es4.-> des8 |       c4 es4.-> c8 |       bes4)( es4.-> des8 |       c4) } \\    {       as,2. | des2.-4 | % M.90 es2. | as2.-3 | as,2. | des2. | es2. |      % M.95 as2. | es2. | as 2. | es2. | as4 } >>  r4 r | % M.100 R2. | es'8-2 r c-1 r as r | ees8 r c r es-2 r | as,4-5 r r | R2. | % M.105 <c, as' c>2.~ | <c as' c>2. | %% TRIO %% \bar "||" \key cis \minor cis8 <gis'_4 cis e>   | }

%%%% DYNAMICS %%%% dynamics = { s2.\pp | R2.*3 | % M.5 s4\< s\! s\> | s2 s4\! | R2.*4 | % M.11 s4\< s\! s\> | s2 s4\! | R2.*4 | % M.17 s4\< s\! s\> | s2 s4\! | R2.*4 | % M.23 s4 s2\> | s2 s4\! | % M.25 s4\< s\! s\> | s2 s4\! | s4 s\f s\> | s2 s4\! | s4\p s2 | % M.30 R2. | s2.\pp | R2.*3 | % M.35 \crescTextCresc s2.\< | R2.*2 | s2 s8 s\! | s16 s\pp s8 s2 | % M.40 R2.*3 | s2.\< | R2.*2 | % M.46 s2 s8 s\! | s16 s\pp s8 s2 | R2.*3 | % M.51 s2.\< | R2.*5 | % M.57 s32 s\f s8. s2 | R2.*4 | % M.62 s2.\< | R2. | % M.65 s32 s\ff s8. s2 | R2.*3 | s2\fz s4\fz | % M.70 s4 s2\fz | \dimTextDim s8\> s\! s2 | % with this \! I eliminated the dashed line without tweaking settings s32 s\p s8. s2 | s16 s\pp s8 s2 | % M.74 R2.*7 | % M.81 s32 s\p s8. s2 | R2.*3 | % M.85 s2.\< | R2.*3 | s32 s\p s8. s2 | % M.90 R2.*3 | s32 s\f s8. s2 | R2.*3 | % M.97 s2.\< | R2. | s32 s\ff s8. s2 | % M.100 R2.*8 | %% TRIO %% s32 s\p s8. s2 | }

%%%%%%%% SCORE %%%%%%%%

% This is completely optional, but taken right from the LilyPond %  reference manual. I wanted to ensure the right paper size, since %  the default is A4. I also wanted to squeeze the music onto %  fewer pages, since it seemed like there was a lot of vertical %  space being wasted. \paper { #(set-paper-size "letter") between-system-padding = #0.1 ragged-last-bottom = ##f }

% This is the standard, obligatory "score" section. Note the %  addition of the extra \context commands in the "layout" %  portion, which are for the piano-centred-dynamics. \score { \new PianoStaff \with {     instrumentName = "Piano" } <<    \new Staff = "right" \right \new PianoDynamics = "dynamics" \dynamics \new Staff = "left" { \clef bass \left } >> \layout {   % Everything below here is for the piano dynamics. % Define "PianoDynamics" context. \context {     \type "Engraver_group" \name PianoDynamics \alias Voice \consists "Output_property_engraver" \consists "Script_engraver" \consists "New_dynamic_engraver" \consists "Dynamic_align_engraver" \consists "Text_engraver" \consists "Skip_event_swallow_translator" \consists "Axis_group_engraver" \override DynamicLineSpanner #'Y-offset = #0 \override TextScript #'font-size = #2 \override TextScript #'font-shape = #'italic \override VerticalAxisGroup #'minimum-Y-extent = #'(-1 . 1) }   % Modify "PianoStaff" context to accept Dynamics context. \context {     \PianoStaff \accepts PianoDynamics }   % End of PianoDynamics code. } }