%...+....1....+....2....+....3....+....4....+....5....+....6....+....7....+.... \version "2.26" \include "globals.ily" \header { title = "Sonata in E minor" opus = "K.263" source = "https://vmirror.imslp.org/files/imglnks/usimg/2/2e/IMSLP914405-PMLP475896-E4524_20-25-Scarlatti_-_Keyboard_Sonatas,_L.316-330.pdf" } % % Positions and shapes % slurShapeA = \shape #'((0 . 1) (0 . 0) (0 . 1) (0 . 0)) \etc slurShapeB = \shape #'((-0.5 . -2) (0 . 1) (0 . 0.5) (0 . 0)) \etc slurShapeC = \shape #'( ((0 . 0) (0 . 0) (0 . 0) (0 . 0)) ((0 . 0) (0 . 0) (0 . -0.5) (0 . 1)) ) \etc slurShapeD = \shape #'( ((0 . 1) (0 . 1) (0 . 1) (0 . 1.2)) ((0 . 0) (0 . 0) (0 . 0) (0 . 0)) ) \etc slurShapeE = \shape #'( ((0 . 0) (0 . 0) (0 . 0) (0 . 0)) ((0 . 0) (0 . 0) (0 . 0) (0 . 1)) ) \etc slurShapeF = \shape #'( ((0 . -1) (0 . 0) (0 . 0) (0 . 0)) ((0 . 0) (0 . 0) (0 . 0) (0 . 0)) ) \etc slurShapeG = \shape #'( ((0 . 0) (0 . 0) (0 . 0) (0 . 0)) ((0.3 . 0) (0.3 . 0) (0 . 1) (0 . -1.5)) ) \etc slurShapeH = \shape #'((0.3 . 0) (0.3 . 0) (0 . 0) (0 . 0)) \etc slurShapeI = \shape #'((0.3 . 0) (0.3 . 0) (0 . 0) (0 . 0)) \etc slurShapeJ = \shape #'((0.3 . 0) (0.3 . 0) (0 . 0) (0 . 0)) \etc slurShapeK = \shape #'( ((0 . 2.5) (0 . 2) (0 . 0) (0 . 0)) ((0.3 . 0) (0.3 . 0) (0 . 0) (0 . 0)) ) \etc slurShapeL = \shape #'( ((0 . 0) (0 . 0) (0 . 0) (0 . 0)) ((0.3 . 0) (0.3 . 0) (0 . 0) (0 . 0)) ) \etc slurShapeM = \shape #'((0 . 0) (0 . 0) (0 . 0) (0 . -1)) \etc slurShapeN = \shape #'((0 . 0) (0 . 0) (0 . 0) (0 . -1)) \etc slurShapeO = \shape #'((0 . -1.5) (0 . 0) (0 . 0) (0 . -1)) \etc slurShapeP = \shape #'((0 . 0) (0 . 1) (0 . 1) (0 . -1)) \etc slurShapeQ = \shape #'((0.3 . 0) (0.3 . 0) (0 . 0) (0 . 0)) \etc slurShapeR = \shape #'((0 . -2) (0 . 0) (0 . 0) (0 . -0.5)) \etc slurShapeS = \shape #'((0 . -1) (-1 . 1) (0 . 1) (0 . 0)) \etc slurShapeT = \shape #'( ((0 . 0) (0 . 0) (0 . 0) (0 . 0)) ((0 . 2.5) (0 . 2.5) (0 . 2.5) (0 . 2.5)) ) \etc slurShapeU = \shape #'( ((0 . -0.5) (0 . 0.5) (0 . 0) (0 . 0)) ((0.3 . 2.7) (0.3 . 2.7) (0 . 2.7) (0 . 2.7)) ) \etc slurShapeV = \shape #'( ((0 . 0) (0 . 0) (0 . 0) (0 . 0)) ((0 . 1.5) (0 . 1.5) (0 . 1.5) (0 . 1.5)) ) \etc slurShapeW = \shape #'( ((0 . 0) (0 . 0) (0 . 0) (0 . 0)) ((0.3 . 0) (0.3 . 0) (0 . 1) (0 . 0)) ) \etc slurShapeX = \shape #'( ((0 . 0) (0 . 0) (0 . 0) (0 . 0)) ((0 . 0) (0 . 0) (0 . 0) (0 . -1.5)) ) \etc slurShapeY = \shape #'( ((0 . 0) (0 . 0) (0 . -1) (0 . 0)) ((0.3 . 0) (0.3 . 0) (0 . 0) (0 . 0)) ) \etc slurShapeZ = \shape #'( ((0 . 0) (0 . 0) (0 . 0) (0 . 0)) ((0.3 . 0) (0.3 . 0) (0 . 0) (0 . 0)) ) \etc slurShapeAA = \shape #'( ((0 . 0) (0 . 0) (0 . 0) (0 . 0)) ((0 . 0) (0 . 0) (0 . -2) (0 . -2.5)) ) \etc slurShapeAB = \shape #'( ((0 . 0) (0 . 0) (0 . 0) (0 . 0)) ((0.3 . 0) (0.3 . 0) (0 . 0) (0 . 0)) ) \etc slurShapeAC = \shape #'( ((0 . 0) (0 . 0) (0 . 0) (0 . 0)) ((0.3 . 0) (0.3 . 0) (0 . 0) (0 . 0)) ) \etc slurShapeAD = \shape #'((-0.5 . 0) (-0.5 . 0) (-0.3 . 0) (-0.3 . 0)) Slur rotateHairpinA = \once \override Hairpin.rotation = #'(16 1 0) rotateHairpinB = \once \override Hairpin.rotation = #'(10 1 0) % % Music % global = { \time 4/4 \key e \minor } rightHandUpper = \relative { \repeat volta 2 { s1*3 | s4 \voiceOne b'2-\slurShapeK ( a4~ | a4 g8 fs g e fs ds | e4) 8( ) | \voiceOne \acciaccatura { a'8 } g16( fs e4.) \oneVoice r8 fs( g a) | \acciaccatura { a8 } g16-\slurShapeH ( fs e8) 8( | \barNumberCheck 9 8 ) ^( \voiceOne d'!4 c) | \acciaccatura { c8 } b16( a g8) \oneVoice r4 r2 | r2 r4 \grace { a32( } a8.)-\slurShapeI (\trill g32 a | b16) g( a b c d e fs g8) fs4-\slurShapeL ( e8 | \stemDown d16) g,( a b c d e fs g8) fs4( e8) | \acciaccatura { fs8 } e16( d cs4 d8) \acciaccatura { e } d16( c b4 c8) | \acciaccatura { d8 } c8( b16 a) \acciaccatura { c8 } b( a16 g \stemNeutral a8-.) \osp #'(1 . -1) g4( fs8 | g8) d'( cs c b4 a | \barNumberCheck 17 gs8) e'( ds d cs4 b | a8) a'( gs g fs4 e | d8) d'( cs c \voiceOne b4) a( | \oneVoice 4) ( g'16) g,( a b c d e fs | e16 fs, g a b c d e d e, fs g a b c d | c16 d, e fs g a b c b4)-\slurShapeG ( e | c4 a' b, g' | a,4 fs' g16 fs e d c b c d | \barNumberCheck 25 e16 d c b a g fs e d4) r | r8 g \acciaccatura { a } g-\slurShapeJ ( fs) fs16_( g a b \appoggiatura { d } c8 b16 a | g16 a32 g fs g a16) \appoggiatura { b32 } a4(\trill g16) d-\slurShapeM ( e fs g a b c | e8) c4( a8 b16) d,-\slurShapeN ( e fs g a b c | e8) c4-\slurShapeO ( a8 b4) r | r4 ( 2) | r4 -\slurShapeP ( g'16 fs e d c b c d | e16 d c b a g fs e d4) r | \barNumberCheck 33 r8 g \acciaccatura { a } g-\slurShapeQ ( fs) fs16_( g a b \appoggiatura { d } \stemUp c8 b16 a | g16 a32 g fs g a16) \appoggiatura { b } a4(\trill g16) d_( e fs b g a fs | g16 d b' c d b c a b) d,_( g a b g a fs | g16 d b' c \stemNeutral d b c a b) g-\slurShapeR ( d' b e c g' g,) | g4( \appoggiatura { b32 } a4\trill g) r | r4 ( 2) | r4 ( 2) | r4 ( ) r | } \repeat volta 2 { \barNumberCheck 41 r8 b'16( c d b c a \stemDown b g b c d b c a | b16 g) d'-\slurShapeS ( e f d e c d b c a \stemNeutral b gs a fs! | gs16 e) b'( c d b c a b e, b' c d b c a | b16 e,) c'( d e c d b c e, c' d e c d b | c4.) 8^( 4.) 8^( | 2)~ c'8 b-\slurShapeT ( c d | c16) e,( fs! gs a b c d f8) e4( d8 | c16) e,( fs! gs a b c d f8) e4( d8 | \barNumberCheck 49 c16) e,( fs! gs a b c d g!8) fs4-\slurShapeV ( e8 | ds16) fs,( gs as b cs ds e g!8) fs4( e8 | ds16) b( cs ds e fs g a c!8) b4( a8 | g16) b,( cs ds e fs g a c!8) b4( a8 | g16) \osp #'(-1 . 0) e( fs g a b c d c d, e fs g a b c | b16 c, d e fs g a b a b, cs ds e fs g a | g4)-\slurShapeW \( c fs, b | e,4 a ds, b'~ | \barNumberCheck 57 b16 a g fs e d c b \grace { c32( } c2)\trill | b4\) r8 b-\slurShapeY ( as a gs g | fs8 b e,) e'( ds d cs c | b8 e ds a' gs) g( fs b | as8 a gs g fs) b( as a | gs8 g fs e ds c! b a | g8 fs e fs16 g \stemUp a b c b a g fs e | 4) r r8 e \acciaccatura { fs } e( ds | \barNumberCheck 65 e4) r4 r8 a \acciaccatura { b } a( gs | a4) r r8 \stemNeutral e' \acciaccatura { fs } e( ds | e16) b( cs ds e fs g a c!8) b4( a8) | \voiceOne \appoggiatura { a16 } \osp #'(0 . -1.5) g8( fs16 g a8 g16 fs \oneVoice 4 | e'16) b16( e fs g e fs ds e b g' a b g a fs | g16) b,16-\slurShapeAB ( e fs g e fs ds e b g' a b g a fs | g16 e fs ds e b c a g ds' e a, g e' fs, ds' | e4) r r ( | \barNumberCheck 73 4) r r -\slurShapeAC ( | 4) r r -> | \voiceOne \appoggiatura { \slurShapeAD a'32 } g8( fs16 e) e( ds e fs \oneVoice g, ds' e a, g e' fs, ds' | 4) r r2 | } } rightHandLower = \relative { \repeat volta 2 { R1 | r2 e'_( | e'2 d8 c b a | \voiceFour g8 fs e d c2 | b2) s | s1 | e8 s s2. | s1 | \barNumberCheck 9 s4. \hideNoteHead \voiceOne e8-\slurShapeA _( \voiceFour fs d e fs) | g8 s s2. | s1*6 | \barNumberCheck 17 s1*2 | s2 b'8 \osp #'(0 . -0.5) d,( cs c | \hideNoteHead b4) s2. | s1*4 | \barNumberCheck 25 s1*16 | } \repeat volta 2 { \barNumberCheck 41 s1*24 | \barNumberCheck 65 s1*3 | b4 c s2 | s1*4 | \barNumberCheck 73 s1*2 | c4 c s2 | s1 | } } rightHand = { \global << \new Voice \rightHandUpper \new Voice \rightHandLower >> } leftHandUpper = \relative { \repeat volta 2 { s1*2 | \voiceThree c8( fs g a b2) | s2 a8( g fs e | \oneVoice ds8 b e a, \osp #'(0 . 1) b4-.)_( b'-.) | s1 | s4 8( | \voiceThree g4) s2. | \barNumberCheck 9 s1*2 | s4. \hideNoteHead c8-\slurShapeB ( d!4 c | b4) g'2( e4 | << { \hideNoteHead \voiceTwo d4) } \new Voice { \voiceThree r4 } >> \voiceThree g2 r4 | s1*3 | \barNumberCheck 17 s1*3 | s2. e4-\slurShapeD (~ | e4 d2 c4~ | c4 b) s2 | s1*2 | \barNumberCheck 25 s1*8 | \barNumberCheck 33 s1 | 4( < a c>) s2 | s1*6 | } \repeat volta 2 { \barNumberCheck 41 s1*8 | \barNumberCheck 49 s1*4 | s4 \clef treble c'2( b4~ | b4 a2 g4) | s1*2 | \barNumberCheck 57 s1*8 | \barNumberCheck 65 s1*3 | s4 \clef bass \hideNoteHead \osp #'(-2 . 0) e4( g fs) | s1*4 | \barNumberCheck 73 s1*4 | } } leftHandLower = \relative { \repeat volta 2 { e2_( e' | d8 c b a g fs e d | \voiceTwo c2 b | e2 a,) | s1 | \oneVoice 2. \osp #'(2.5 . 0) b'4( | e4) s2. | \voiceTwo e2 \oneVoice r4 b-\slurShapeC _( | \barNumberCheck 9 e2 d!4 d, | g4) 8( | 8 ) \osp #'(-1 . -2.5) _( \voiceTwo fs d e fs | g2.) c4( | 2.) 4( | \oneVoice d4) \osp #'(-1 . 0) d,_( e fs | g4 b, c d | g,2) \clef treble r8 g''( fs f | \barNumberCheck 17 e2) r8 a( gs g | fs4 e d8) d'_( cs c | b4 a g) r | \clef bass r8 d( cs c b4) \voiceTwo c4-\slurShapeE ( | fs,4 b e, a | d,4 g) \oneVoice r16 g-\slurShapeF ( a b c d e fs | e16 fs, g a b c d e d e, fs g a b c d | c16 d, e fs g a b c b4 g | \barNumberCheck 25 c4 c,) r16 d( e fs g a b c | e8) d d( c b4 c | d4) d,_( ) r | r4 _( ) r | r4 r16 g( a b c d e fs | a8-.) fs4( c8) r16 g( a b c d e fs | a8-.) fs4( c8 b4) g( | c4 c,) r16 d( e fs g a b c | \barNumberCheck 33 e8) d d( c b4 ) | \voiceTwo d,2 \oneVoice 4 r | r4 2 | r4 c_( | d4 d, g8)\noBeam g'16( a b g a fs | g16 d b' c d b c a b) \osp #'(0 . 2) d,( g a b g a fs | g16 d b' c d b c a b g a fs \stemDown g d b g | \stemNeutral d2)( 4) r | } \repeat volta 2 { \barNumberCheck 41 2. q4_( | 2.) q4_( | 2.) q4 | q4 | 8\noBeam c'16-\slurShapeU ( d e c d b c a c d e c d b | c16 a b gs a e f d e c d b c a b gs | a4) r r _( | 4) r r _( | \barNumberCheck 49 4) r r \clef treble _( | 4) r r _( | 4) r r _( | 4) r r _( | 4) \voiceTwo \osp #'(0.5 . 1) a( d, g | c,4 fs b, e) | \oneVoice r16 e-\slurShapeX ( fs g a b c d c d, e fs g a b c | b16 c, d e fs g a b a b, cs ds e fs g a | \barNumberCheck 57 g4 e a a, | b8) e( ds d cs c b e | ds8 d cs c b) b'( as a | gs8 g fs4 e8) e'-\slurShapeZ ( ds d | cs8 c b e ds d cs c | b4) a8( g fs e ds c! | \clef bass b8 a g fs e d c4) | r16 b( cs ds e fs g a c8) b b( a | \barNumberCheck 65 gs16) e( fs gs a b c d f8) e e( d | \clef treble c16) a( c ds e fs g a c8) b b_( a | g4 e b | 4) \clef bass _( \voiceTwo b2) | \oneVoice 4 r r | 4 r r -\slurShapeAA _( | e4 a b b, | e8)\noBeam \clef treble e'16( fs g e fs ds e b g' a b g a fs | \barNumberCheck 73 g16) b,_( e fs g e fs ds e b g' a b g a fs | g16 e fs ds e \clef bass b g e b4) b'-> | 4 4( | 4) r r2 | } } leftHand = { \global \clef bass << \new Voice \leftHandUpper \new Voice \leftHandLower >> } dynamics = { \override TextScript.Y-offset = #-0.5 \override DynamicTextSpanner.style = #'none \repeat volta 2 { s1-\tweak Y-offset #-6 \p | s1*3 | s4 s2-\tweak Y-offset #1 \> s8 s\! | s1\p | s8\> s\! s2. | s8-\tweak Y-offset #1 \> s\! s2. | \barNumberCheck 9 s2 s-\tweak extra-offset #'(0 . 0.5) \mf | s4 s2.-\tweak Y-offset #3 \p | s4-\tweak Y-offset #3 \< s\! s2-\tweak Y-offset #4 \mf | s4 s2.-\tweak Y-offset #4 \f | s16 s2...\p | s1\cresc | s1 | s8\f s2..\p | \barNumberCheck 17 s1\cresc | s1 | s8 s2..\f | s1 | s1-\tweak Y-offset #1.5 \dim | s2 s4\p s\cresc | s1*2 | \barNumberCheck 25 s2 s-\tweak Y-offset #-1 \f | s8 s2..\p | s8.\< s16\! s2.\f | s2 s16 s4..\p | s2 s16 \rotateHairpinA s8.-\tweak Y-offset #1.5 \< s s16\! | s2-\tweak Y-offset #1 \f s16 s4..\p | s2 s\cresc | s2 s\f | \barNumberCheck 33 s8 s2..\p | s8.\< s16\! s4\f s16 s4..\p | s1-\tweak Y-offset #-1 \cresc | s1 | s2\mf s8 s4.\p | s1-\tweak Y-offset #1 \cresc | s1 | s1\f | } \repeat volta 2 { \barNumberCheck 41 s2.\p s4\mf\> | s16 s8.\p\< s2\! s8.\> s16\! | s8.\< s16\! s4 s8.\< s16\! s4 | s1\cresc | s8\f s4\p s8-\tweak Y-offset #1 \cresc s2 | s1 | s1\f | s16 s2...\p | \barNumberCheck 49 s16 s2...\f | s16 s2...\p | s16 s2...\f | s16 s2...\p | s1^\sempreP | s1 | s1-\tweak Y-offset #0.5 \cresc | s2. s4\f | \barNumberCheck 57 s1 | s8 s2..-\tweak Y-offset #-1 \p | s2 s-\tweak Y-offset #-0.5 \cresc | s1 | s2 s\mf | s4 s2.\dim | s4\p s\< s8. s16\! s4\> | s16\! s4..\< s8\! s4.\mf | \barNumberCheck 65 s16 \rotateHairpinB s4..-\tweak Y-offset #-2 \p-\tweak Y-offset #1 \< s8\! s4.\mf | s16 s4..-\tweak Y-offset #-1 \p-\tweak Y-offset #-1 \< s8\! s4.-\tweak Y-offset #-1.5 \mf | s16 s4..-\tweak Y-offset #-1 \< s2-\tweak Y-offset #-1.5 \f | s1 | \override DynamicLineSpanner.Y-offset = #-5.5 s16 s4..\p\cresc s4 s8.\f\> s16\! | s16 s4..\p\cresc s4 s\f | s1 | \override DynamicLineSpanner.Y-offset = #0.5 s8 s2..\p\cresc | \barNumberCheck 73 s1 | s2. s4\f | s1*2 | } } tempi = { \repeat volta 2 { \tempo "Andante" 4 = 108 s1*32 | \barNumberCheck 33 s1*7 | \set Score.tempoHideNote = ##t \tempo 4 = 96 s4 \tempo 4 = 88 s \tempo 4 = 80 s2 | } \repeat volta 2 { \tempo 4 = 104 \barNumberCheck 41 s1*32 | \barNumberCheck 73 s1*2 | \tag layout { s1*2 | } \tag midi { \alternative { { s2 \tempo 4 = 96 s4 \tempo 4 = 88 s | \tempo 4 = 80 s1 | } { s2 \tempo 4 = 92 s4 \tempo 4 = 80 s | \tempo 4 = 40 s4 \tempo 4 = 104 s2. | } } } } } forceBreaks = { % page 1 s1*4 \break s1*4 \break s1*4 \break s1*4 \break s1*4 \pageBreak % page 2 s1*3 \break s1*3 \break s1*4 \break s1*3 \break s1*3 \break s1*4 \pageBreak % page 3 s1*3 \break s1*3 \break s1*3 \break s1*3 \break s1*3 \break s1*3 \pageBreak % page 4 s1*3 \break s1*3 \break s1*3 \break \grace { s16 } s1*3 \break s1*3 \break } \score { \keepWithTag layout \new PianoStaff \with { \override StaffGrouper.staff-staff-spacing = #'((basic-distance . 9) (padding . 1)) } << \new Staff = "upper" \rightHand \new Dynamics \dynamics \new Staff = "lower" \leftHand \new Dynamics \tempi \new Devnull \forceBreaks >> \layout {} } \include "articulate.ly" \score { \keepWithTag midi \articulate << \new Staff = "upper" << \rightHand \dynamics \tempi >> \new Staff = "lower" << \leftHand \dynamics \tempi >> >> \midi {} }