%...+....1....+....2....+....3....+....4....+....5....+....6....+....7....+.... \version "2.26" \include "globals.ily" \include "initial-clef-engraver.ily" \header { title = "Sonata in B♭ major" opus = "K.267" source = "https://ks15.imslp.org/files/imglnks/usimg/4/47/IMSLP914427-PMLP475945-E4549_57-59-Scarlatti_-_Keyboard_Sonatas,_L.421-435.pdf" } % % Positions and shapes % slurShapeA = \shape #'((0 . 0) (0 . 0) (0 . 2) (0 . 0)) \etc slurShapeB = \shape #'( ((0 . 0) (0 . 0) (3 . 1) (3 . 1)) ((0.3 . 0) (0.3 . 0) (0 . 0) (0 . 0)) ) \etc slurShapeC = \shape #'((0 . 0) (0 . -1) (0 . -1) (0 . 2.5)) \etc slurShapeD = \shape #'( ((0 . 0) (0 . 0) (0 . 0) (0 . 0)) ((0 . 0) (0 . 0) (0 . -1) (0 . 2)) ) \etc slurShapeE = \shape #'( ((0 . -2.5) (0 . -1) (0 . 0.5) (0 . 0)) ((0 . 0) (0 . 0) (0 . 0) (0 . 0)) ) \etc slurShapeF = \shape #'((0.3 . 0) (0.3 . 0.5) (-0.3 . 0.5) (-0.3 . 0)) \etc slurShapeG = \shape #'((0 . 0) (0 . 0.5) (-0.3 . 0.5) (-0.3 . 0)) \etc slurShapeH = \shape #'((0 . 0) (0 . 0.5) (-0.3 . 0.5) (-0.3 . 0)) \etc slurShapeI = \shape #'( ((0 . -1) (0 . -0.5) (0 . 0) (0 . -0.3)) ((0 . 0) (0 . -0.5) (0 . -1.5) (0 . -2)) ) \etc slurShapeJ = \shape #'((0 . -0.5) (0 . 1) (0 . 1) (0 . 0)) \etc slurShapeK = \shape #'( ((0 . -0.5) (0 . 1) (0 . 1.5) (0 . 0)) ((0 . 0) (0 . 0.5) (0 . 0.5) (0 . 0)) ) \etc slurShapeL = \shape #'( ((-1 . 0.3) (0 . 0) (0 . 0) (0 . 0)) ((0 . 0) (0 . 0.5) (0 . 0.5) (0 . -1)) ) \etc slurShapeM = \shape #'( ((0 . -2.5) (0 . -1.5) (0 . 0.5) (0 . 0)) ((0.3 . 0) (0.3 . 0) (0 . 0) (0 . 0)) ) \etc slurShapeN = \shape #'((-0.3 . -0.5) (0 . 0) (0 . 0) (0 . 0.5)) \etc slurShapeO = \shape #'((0.3 . 0) (0.3 . 0) (0 . 0) (0 . 0)) \etc slurShapeP = \shape #'((-0.3 . -0.5) (0 . 0) (0 . 0) (0 . 0)) \etc slurShapeQ = \shape #'( ((0 . -0.3) (0 . 0) (0 . 0) (0 . 0)) ((0.3 . 0.8) (0.3 . 0) (0 . 0) (0 . 0)) ) \etc slurShapeR = \shape #'( ((0 . 0) (0 . 0) (0 . 0) (0 . 0)) ((0.3 . 0) (0.3 . 0) (0 . 0) (0 . 0)) ) \etc slurShapeS = \shape #'( ((0 . 0) (0 . 0) (0 . 0) (0 . 0)) ((0 . 1.5) (0 . 1.5) (0 . 1.5) (0 . 1.5)) ) \etc % % Music % global = { \time 3/4 \key bf \major } rightHandUpper = \relative { \repeat volta 2 { \osp #'(0 . 1) f''4--( f4. g8 | \appoggiatura { bf,8 } a2~ a8) bf-\slurShapeA \( | \grace { f16( } \afterGrace 15/16 ef2.)\trill { d16 ef } | d8\) bf'-\slurShapeB ( a c bf d | c8 g' f ef d c | d8 f a, bf c d) | r8 g( b, c d ef) | r8 c'( f, ef d c | \barNumberCheck 9 d8 f a, bf c d) | r8 g( b, c d ef) | r8 c'( f, ef d c | d8 ef f bf, a g | \grace { f16)( } f2.)~\startTrillSpan | f2.~ | f2. <>\stopTrillSpan | f8-. g( f ef d c | \barNumberCheck 17 d8-.) bf'4-\slurShapeC ( e,8\noBeam f c'~ | c8 g a)\noBeam f'4( b,8) | \appoggiatura { b4 } c2. | r8 a'( g4. bf,!8 | \voiceOne a8 d c4 f~ | f8) a( g4. bf,!8 | a8 d c4 f~ | f8) a( \oneVoice g4. bf!8 | \barNumberCheck 25 a8 d c4. f,8 | g8 bf a g f e) | \appoggiatura { e4 } f2. | r8 a( g4. bf,8 | \voiceOne a8 d c4 f~ | f8) a( g4. bf,!8 | a8 d c4 f~ | f8) a( \oneVoice g4. bf!8 | \barNumberCheck 33 a8 d c4. f,8 | g8 bf a g f e | f8) d( c4. f,8 | g8 bf a g f e | f8) d( c4. f8 | d8) ( | f2.) | } \repeat volta 2 { r8 bf'-\slurShapeJ ( af c, df g~ | \barNumberCheck 41 g8 e f c df bf~ | bf8 g af4. bf8~ | bf8 b c4) r | r8 bf'-\slurShapeK ( af c, df g~ | g8 e f c df bf~ | bf8 g af4. bf8~ | bf8 b4 c4) r8 | r8 af'( g4.) bf,!8( | \barNumberCheck 49 af8 g' f4.) c'8( | b8 g f4.) d8( | ef bf'! a!4.) g8( | fs8 d c4.) \osp #'(0.5 . 0) a8( | bf8 a' g4.) f!8( | e8 c bf4.) \osp #'(0.5 . 0) g8( | af8 g' f4.) \osp #'(0 . 2.5) ef!8( | d8 bf af4.) f8-\slurShapeL ( | \barNumberCheck 57 g8 ef'4 a,!8\noBeam bf f'~ | f8 c d8\noBeam bf'4 e,8) | \appoggiatura { e4 } f2. | r8 d'( c4. ef,!8 | \voiceOne d8 g f4 bf~ | bf8) d-\slurShapeS ( c4. ef,!8 | d8 g f4 bf~ | bf8) d( \oneVoice c4. ef,!8 | \barNumberCheck 65 d8 c' bf4. f8 | g8 ef f d ef c | d8) g( f4. bf,8 | c8 ef d c bf a) | \appoggiatura { a4 } bf2. | r8 d'( c4. ef,8 | \voiceOne d8 g f4 bf~ | bf8) d( c4. ef,!8 | \barNumberCheck 73 d8 g f4 bf~ | bf8) d( \oneVoice c4. ef,!8 | d8 c' bf4. f8 | g8 ef f d ef c | d8) g( f4. bf,8 | c8 ef d c bf a | bf8) g'( f4.) f,8( | g8 f' ef4.) ef,8-\slurShapeQ ( | \barNumberCheck 81 f8 bf a c bf d | c8 g' f ef d c | bf8) g'( f4.) f,8( | g8 fs' g4.) \osp #'(-1 . 0) ef8( | a8 f! g a bf f | g8[ ef] \voiceOne f)( bf) ef,( a) | \oneVoice \appoggiatura { 4 } 4 r r | } } rightHandLower = \relative { \repeat volta 2 { s2.*16 | \barNumberCheck 17 s2.*4 | s4 \voiceFour c''4.-\slurShapeE ( b8 | c4) s2 | s4 c4.( b8 | c4) s2 | \barNumberCheck 25 s2.*4 | s4 c4.( b8 | c4) s2 | s4 c4.( b8 | c4) s2 | \barNumberCheck 33 s2.*7 | } \repeat volta 2 { s2. | \barNumberCheck 41 s2.*16 | \barNumberCheck 57 s2.*4 | s4 f4.( e8 | f4) s2 | s4 f4.-\slurShapeM ( e8 | f4) s2 | \barNumberCheck 65 s2.*6 | s4 f4.( e8 | f4) s2 | \barNumberCheck 73 s4 f4.( e8 | f4) s2 | s2.*6 | \barNumberCheck 81 s2.*5 | s4 d c | s2. | } } rightHand = { \global \mergeDifferentlyDottedOn << \new Voice \rightHandUpper \new Voice \rightHandLower >> } leftHand = \relative { \global \clef treble % Initial bass clef, see initial-clef-engraver.ily \repeat volta 2 { \osp #'(-1 . -1) bf'4_( a g | f4 ef d | \clef bass c4 bf a | bf c d | ef4 f f,) | \clef treble 4( | 4) q q | 4( a) | \barNumberCheck 9 4( | 4) q q | \osp #'(0 . -2.5) 4_( a | bf4) r r | \clef bass r8 d,( bf c d ef) | r8 a,( f g a bf) | r8 d,-\slurShapeD _( bf c d ef | f4 g a | \barNumberCheck 17 bf4 g a | e4 f d | c2.) | c'4.( d8 e4 | f4. e8 d4 | c4.)-\slurShapeF ( d8 e4 | f4. e8 d4 | c4.)( d8 e4 | \barNumberCheck 25 \osp #'(-1 . 0) 4.)_( g8 a4 | bf4 c c, | f4 f,) r | c''4.-\slurShapeG ( d8 e4 | f4. e8 d4 | c4.)-\slurShapeH ( d8 e4 | f4. e8 d4 | c4.)( d8 e4 | \barNumberCheck 33 4.)-\slurShapeI _( g8 a4 | bf4 c c, | \osp #'(0 . -0.5) f4.)( g8 a4 | bf4 c c, | f,4.)( g8 a4 | bf4 c c,) | 2. \clef treble | } \repeat volta 2 { f''2_( bf4 | \barNumberCheck 41 a4 af e | d4. ef!8 df4 | \clef bass c4. bf!8 af g | f2) \clef treble bf'4_( | a4 af e | d4. ef!8 df4 | \clef bass c4 g c,) | c'4.( d8 e4 | \barNumberCheck 49 f4. g8 af4 | 4.) a!8 b4 | c4. d8 ef4 | 4.) e8 fs4 | g4. a8 bf4 | 4.) d8 e4 | f4. g8 af4 | bf4. c8 d4 | \barNumberCheck 57 ef4 c d | a4 bf g) | 2 r4 | \clef treble f''4._( g8 a4 | bf4. a8 g4 | f4.)_( g8 a4 | bf4. a8 g4 | f4.)^( g8 a4 | \barNumberCheck 65 4.) c8 d4 | ef4) \clef bass a,( f | bf4. c8 d4 | ef4 f f, | bf4 bf,) r | \clef treble f''4._( g8 a4 | bf4. a8 g4 | f4.)-\slurShapeO _( g8 a4 | \barNumberCheck 73 bf4. a8 g4 | f4.)^( g8 a4 | 4.) c8 d4 | ef4) \clef bass a,_( f | 4. c8 d4 | ef4 f f,) | bf'4.-\slurShapeR ( c8 d4 | ef4. d8 c bf | \barNumberCheck 81 f4 ef d | ef f f,) | \osp #'(-0.5 . -2) bf'4.( c8 d4 | ef4. d8 c bf | f4 ef d | ef f f,) | 2 r4 | } } dynamics = { \override DynamicTextSpanner.style = #'none \repeat volta 2 { s2.\p | s2. | \grace { s16-\tweak Y-offset #-1.5 \mf } s2. | s2\p\< s8 s\! | s2\> s8 s\! | s2\p\< s8 s\! | s8 s\p s2 | s8 s\> s4. s8\! | \barNumberCheck 9 s2.\p | s2.*2 | s4. s\< | \grace { s16\! } s8 s\p s2 | s2.\cresc | s2. | s2.\mf | \barNumberCheck 17 s8 s\cresc s2 | s2. | \grace { s4-\tweak X-offset #-0.5 \f\> } s4 s2\! | s2.-\tweak Y-offset #1 \p | s2.*3 | s2.\cresc \barNumberCheck 25 s2.\mf | s2. | \grace { s4-\tweak Y-offset #-1 \> } s2.\! | s2.\p | s2.*3 | s2.\cresc | \barNumberCheck 33 s2.\mf | s2.*6 | } \repeat volta 2 { s2.\p | \barNumberCheck 41 s2. | s2\< s8 s\! | s2\> s8 s\! | s2.\p | s2. | s2\< s8 s\! | s8 s4\> s\! s8 | s2.\p | \barNumberCheck 49 s2-\tweak Y-offset #1 \< s8 s-\tweak Y-offset #1 \mf | s4. s\p | s2.*2 | s2\< s8 s\mf | s4. s\p | s2. | s2\< s8 s\! | \barNumberCheck 57 s2.\cresc | s2. | \grace { s4-\tweak X-offset #-0.5 \f\> } s4 s2\! | s2.\p | s2.*2 | s2.\cresc | s2.\mf | \barNumberCheck 65 s2.*4 | \grace { s4\> } s2.\! | s2.\p | s2.*2 | \barNumberCheck 73 s2.\cresc | s2.\f | s2.*2 | s2.\p | s2. | s2.\mf | s4. s4\> s8\p | \barNumberCheck 81 s2\< s8 s\! | s2\> s8 s\! | s4.\p s\cresc | s2.*2 | s2.\f | s2. | } } tempi = { \repeat volta 2 { \tempo "Allegro" 4 = 152 s2.*32 | \barNumberCheck 33 s2.*5 | \set Score.tempoHideNote = ##t \tempo 4 = 138 s4 \tempo 4 = 126 s \tempo 4 = 116 s | \tempo 4 = 108 s2. | } \repeat volta 2 { \tempo 4 = 152 s2. | \barNumberCheck 41 s2.*40 | \barNumberCheck 81 s2.*5 | \tag layout { s2.*2 | } \tag midi { \alternative { { \tempo 4 = 138 s4 \tempo 4 = 126 s \tempo 4 = 116 s | \tempo 4 = 108 s2. | } { \tempo 4 = 132 s4 \tempo 4 = 116 s \tempo 4 = 104 s | \tempo 4 = 80 s2. | } } } } } forceBreaks = { % page 1 s2.*5 \break s2.*5 \break s2.*5 \break s2.*6 \break s2.*6 \pageBreak % page 2 s2.*6 \break s2.*6 \break s2.*6 \break s2.*6 \break s2.*6 \pageBreak % page 3 s2.*6 \break s2.*6 \break s2.*6 \break s2.*6 \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" \with { \clef bass } \leftHand \new Dynamics \tempi \new Devnull \forceBreaks >> \layout { \context { \Staff \consists #initial-clef-change-engraver } } } \include "articulate.ly" \score { \keepWithTag midi \articulate << \new Staff = "upper" << \rightHand \dynamics \tempi >> \new Staff = "lower" << \leftHand \dynamics \tempi >> >> \midi {} }