%...+....1....+....2....+....3....+....4....+....5....+....6....+....7....+....
\version "2.26"
\include "globals.ily"
\header {
title = "Sonata in B major"
opus = "K.261"
source = "https://vmirror.imslp.org/files/imglnks/usimg/7/78/IMSLP914409-PMLP509328-E4465_8-12-Scarlatti_-_Keyboard_Sonatas,_L.146-160.pdf"
}
%
% Positions and shapes
%
slurShapeA = \shape #'(
((0 . 0) (0 . 0) (0 . 0) (0 . 0))
((0.3 . 0) (0.3 . 0) (0 . 0) (0 . 0))
) \etc
slurShapeB = \shape #'((0 . 0) (0 . -0.2) (0 . -0.2) (0 . 0)) \etc
slurShapeC = \shape #'((0 . 0) (0 . -0.4) (0 . -0.4) (0 . 0)) \etc
slurShapeD = \shape #'((0 . 0) (0 . 0) (0 . 1) (0 . -1)) \etc
slurShapeE = \shape #'(
((0 . 0) (0 . 0) (0 . 0) (0 . 0))
((0.3 . 0) (0.3 . 0) (0 . 0) (0 . 0))
) \etc
slurShapeF = \shape #'(
((0 . -1) (0 . 1.2) (0 . 1) (0 . 0))
((0 . 0) (0 . 0) (0 . 0) (0 . 0))
) \etc
slurShapeG = \shape #'(
((0 . 0) (0 . 0) (0 . 0) (0 . 0))
((0 . 2.5) (0 . 2.5) (0 . 2.5) (0 . 2.5))
) \etc
slurShapeH = \shape #'(
((0 . 0) (0 . 0) (0 . 0) (0 . 0))
((0 . 2.5) (0 . 2.5) (0 . 2.5) (0 . 2.5))
) \etc
slurShapeI = \shape #'(
((0 . 0) (0 . 0) (0 . 0) (0 . 0))
((0.3 . 0) (0.3 . 0) (0 . 0) (0 . 0))
) \etc
slurShapeJ = \shape #'(
((0 . 0) (0 . 0) (0 . 0) (0 . 0))
((0 . 1.2) (0 . 1) (0 . 0) (0 . 0))
) \etc
%
% Music
%
global = {
\time 2/4
\key b \major
\set Staff.printKeyCancellation = ##f
\beamEighths.24
}
rightHandUpper = \relative {
\repeat volta 2 {
b''8->( fs16-.) ds-. b8-. fs-. |
b,8-.[ ds'-.] ds8.(\trill cs32 ds |
fss8->[ gs)] gs,8.(\trill fss32 gs |
b8 as) \grace { cs32( ds } e4) |
\tuplet 3/2 { ds16( gs fs } e4.) |
\tupletOff \tuplet 3/2 { ds16( gs fs } e4.) |
\tuplet 3/2 8 { ds16\( cs b as gs fs } \grace { e32( } e4)\trill |
\tuplet 3/2 8 { ds16 e fs e ds cs } ds8-.\) cs-.\prall |
\barNumberCheck 9
b4 r |
R2 |
r16 g''( fs e) \appoggiatura { e16 } d8( cs 16 b |
as16 g) g( fs) fs( e) e( d) |
d4 r |
R2 |
r16 g'( fs e) \appoggiatura { e16 } d8-\slurShapeA ( cs 16 b |
a16 b) b( c) \voiceOne fs4->~ |
\barNumberCheck 17
fs4 e4->~ |
e4 d4->~ |
d4 cs4-> |
s2 |
\oneVoice cs,16( es cs gs' es b' gs es' |
b16 gs' b, b' b, gs' b, b') |
\appoggiatura { b16 } as8( gs16 fs) \appoggiatura { as16 } gs8( fs16 es |
fs16 es ds cs) bs8.(\trill cs32 ds) |
\barNumberCheck 25
cs,16( es cs gs' es b' gs es' |
b16 gs' b, b' b, gs' b, b') |
% Second beat, e in source but es in urtext
\appoggiatura { b16 } as8( gs16 fs) \appoggiatura { as16 } gs8( fs16 es) |
\appoggiatura { es8 } fs4 r16 \addStaccato { cs32[ cs cs16 cs] } |
fs8( cs) r16 \addStaccato { cs32[ cs cs16 cs] } |
as'8( cs,) r16 \addStaccato { cs32[ cs cs16 cs] } |
fs16( cs) as'( b as gs fs es) |
\appoggiatura { es8 } fs4 r16 \addStaccato { cs32[ cs cs16 cs] } |
\barNumberCheck 33
fs8( cs) r16 \addStaccato { cs32[ cs cs16 cs] } |
as'8( cs,) r16 \addStaccato { cs32[ cs cs16 cs] } |
fs16( cs) as'( b as gs fs es |
fs8.-\insideSlur \trill es32 fs gs16-.) ds( cs b |
as16) as( b cs) \acciaccatura { b8 } as16( gs fs es) |
\appoggiatura { es8-> } fs4 r |
}
\repeat volta 2 {
\key a \minor
\tuplet 3/2 8 {
\stemDown 16-.-> a a a a a a a a a a a |
16-.-> a a a a a a a a a a a |
\barNumberCheck 41
16-.-> a a a a a a a a a a a |
16-.-> a a a a a a a a a a a |
16-.-> a' a a a a a a a a a a |
\stemNeutral cs16( e, a) a a a d-\slurShapeB ( f, a) a a a |
}
\tuplet 3/2 8 { cs16( e, a) a a a } d8.(\trill cs32 d |
\tuplet 3/2 8 { e16 d cs \stemDown b a gs } a32 b cs d e fs gs a |
\bar "||"
\key b \minor
\stemNeutral a,8) r r4 |
R2 |
\barNumberCheck 49
\tuplet 3/2 8 {
16-.-> b b b b b b b b b b b |
16-.-> b b b b b b b b b b b |
16-.-> b b b b b b b b b b b |
16-.-> b b b b b b b b b b b |
\stemDown 16-.-> b' b b b b b b b b b b |
\stemUp ds16-\slurShapeC ( fs, b) b b b e( g, b) b b b|
}
\tuplet 3/2 8 { ds16-\slurShapeC ( fs, b) b b b } \stemNeutral
e8.-\slurShapeD (\trill ds32 e |
\tuplet 3/2 8 { fs16 e ds cs b as } b32 cs ds e fs gs as b |
\barNumberCheck 57
\bar "||"
\key fs \minor
b,8) r r4 |
R2 |
\tuplet 3/2 8 {
16-.-> cs cs cs cs cs cs cs cs cs cs cs |
16-.-> cs cs cs cs cs cs cs cs cs cs cs |
16-.-> cs cs cs cs cs cs cs cs cs cs cs |
16-.-> cs cs cs cs cs cs cs cs cs cs cs |
16-.-> cs' cs cs cs cs cs cs cs cs cs cs |
es16( gs, cs) cs cs cs fs( a, cs) cs cs cs |
}
\barNumberCheck 65
\tuplet 3/2 8 { es16( gs, cs) cs cs cs } fs8.-\slurShapeE (\trill
es32 fs |
\tuplet 3/2 8 { gs16 fs es ds cs bs } cs32 ds es fs gs as bs cs |
cs,4) r |
r4 r16 d( cs b) |
b16( a gs fs es4) |
R2 |
r16 d'( cs b) s4 |
\voiceOne r4 cs->~ |
\barNumberCheck 73
cs4 b |
\oneVoice cs,16( a') a( gs) a( cs) cs( bs) |
\bar "||"
\key b \major
cs16-\slurShapeF ( a' gs fs e ds cs bs |
cs16 e) e( ds) e( gs) gs( fs) |
\osp #'(-0.5 . 0) gs16( cs b a gs fs e ds |
e16 e,) e( ds) e( gs) gs( fss) |
gs16( e' ds cs b as gs fss |
gs16 b) b( as) b( ds) ds( cs) |
\barNumberCheck 81
ds16( gs fs e ds cs b as) |
as16( b) b'( fs gs e fs cs) |
cs16( ds) b'( fs gs e fs cs |
ds16 e fs cs ds b cs gs) |
gs16( as) fs'( cs ds b cs gs) |
gs16( as) as-. as-. as( b) b-. b-. |
b16( cs) cs-. cs-. cs( ds) ds-. ds-. |
ds16( e) e-. e-. e( fs) fs-. fs-. |
\barNumberCheck 89
fs16( gs) gs( fs) fs( e) e( ds) |
ds( cs) cs( b) b( as b es) |
\voiceOne as,16( fs' gs, es' as, fs' gs, es') |
\oneVoice \appoggiatura { es8 } fs4( fs,8) r |
r8 b16( fs g e e' as,) |
as16( cs b fs g e e' as, |
b16 fs' g e d cs b as |
b8-.) b16( fs g e e' as,) |
\barNumberCheck 97
\osp #'(0 . -1.5) as16( cs b fs g e e' as, |
b16 fs' g e d cs b as) |
\appoggiatura { as8 } b4 r16 \addStaccato { fs'32[ fs fs16 fs] } |
b8( fs) r16 \addStaccato { fs32[ fs fs16 fs] } |
8( fs) r16 \addStaccato { fs32[ fs fs16 fs] } |
b16( fs) gs( e ds cs b as) |
\appoggiatura { as8 } b4 r16 \addStaccato { fs'32[ fs fs16 fs] } |
b8( fs) r16 \addStaccato { fs32[ fs fs16 fs] } |
\barNumberCheck 105
8( fs) r16 \addStaccato { fs32[ fs fs16 fs] } |
b16( fs) gs-\slurShapeJ ( e ds cs b as |
b16 b') as( b cs gs fs e |
ds16 fs) e( cs ds b cs as) |
r16 b16( as b cs gs fs e |
ds16 fs) e( cs ds b cs as) |
\appoggiatura { as8-> } b4 r |
}
}
rightHandLower = \relative {
\repeat volta 2 {
s2*8 |
\barNumberCheck 9
s2*7 |
s4 \voiceFour c''16( b) b( a) |
\barNumberCheck 17
g16( a) a( b) b( a) a( g) |
fs16( g) g( a) a( g) g( fs) |
e16( fs) fs( g) g( fs) \osp #'(0 . 2) fs( e |
\oneVoice d16 fs b a gs! fs es fs) |
s2*4 |
\barNumberCheck 25
s2*8 |
\barNumberCheck 33
s2*6 |
}
\repeat volta 2 {
\key a \minor
s2*2 |
\barNumberCheck 41
s2*6 |
\key b \minor
s2*2 |
\barNumberCheck 49
s2*8 |
\barNumberCheck 57
\key fs \minor
s2*8 |
\barNumberCheck 65
s2*6 |
s4 \oneVoice b16_( a gs fs |
\voiceFour es16 fs) fs( g) g( fs) fs( e) |
\barNumberCheck 73
d16( e) e( fs) fs( e) e( d) |
s2 |
\key b \major
s2*6 |
\barNumberCheck 81
s2*8 |
\barNumberCheck 89
s2*2 |
as'8 gs as[ gs] |
s2*5 |
\barNumberCheck 97
s2*8 |
\barNumberCheck 105
s2*7 |
}
}
rightHand = {
\global
<<
\new Voice \rightHandUpper
\new Voice \rightHandLower
>>
}
leftHandUpper = \relative {
\repeat volta 2 {
s2*16 |
\barNumberCheck 17
s2*7 |
\voiceThree ds8( fs gs fs) |
\barNumberCheck 25
s2*8 |
\barNumberCheck 33
s2*6 |
}
\repeat volta 2 {
s2*2 |
\barNumberCheck 41
s2*40 |
\barNumberCheck 81
s2*3 |
s4 gs |
fs4 s |
fs8( e' ds b |
as8 cs b ds |
cs8 e ds fs) |
\barNumberCheck 89
e8( ds cs b |
as8 gs cs b) |
cs8( cs[ ] |
\override Parentheses.font-size = #-3
\parenthesize as4) s |
s2*4 |
\barNumberCheck 97
s2*8 |
\barNumberCheck 105
s2*7 |
}
}
leftHandLower = \relative {
\repeat volta 2 {
b,2-> |
b8 b'4-> ds,8-. |
e4.-> es8-. |
fs4.-> as8-. |
\addStaccato {
b8 e, fs as |
b8 e, fs as |
b8 ds cs[ fs,] |
b8 e, fs[ fs,] |
}
\barNumberCheck 9
b16->( e d g fs b as e' |
d16 g fs e) \appoggiatura { e16 } d8( cs16 b |
as8-.) fs-. g4->( |
\addStaccato { fs8) e d cs } |
b16->( e d g fs b as e' |
d16 g fs e) \appoggiatura { e16 } d8( cs16 b |
\addStaccato {
as8) fs b[ e,] |
fs8 e ds![ b] |
\barNumberCheck 17
e8 d cs[ a] |
d8 cs b[ g] |
cs8 b as![ fs] |
b8 fs' b[ d,] |
}
cs4-> cs,-> |
cs'4-> cs,-> |
\addStaccato { fs'8 b cs[ cs,] } |
\voiceTwo ds2 |
\barNumberCheck 25
\oneVoice cs4-> cs,-> |
cs'4-> cs,-> |
\addStaccato { fs'8 b cs[ cs,] } |
fs16( gs as b cs b as gs |
fs16 gs as b cs b as gs |
fs16 gs as b cs b as gs |
\addStaccato { fs8) b cs cs, } |
fs16( gs as b cs b as gs |
\barNumberCheck 33
fs16 gs as b cs b as gs |
fs16 gs as b cs b as gs |
\addStaccato {
fs8) b cs cs, |
fs8 cs' es,[ cs] |
fs8 b cs cs, |
}
4-> r |
}
\repeat volta 2 {
\key a \minor
2-> |
2-> |
\barNumberCheck 41
2-> |
2-> |
2-> |
4-> |
4 |
2 |
\key b \minor
r8 g''->( fs-.) e-. |
\addStaccato { ds8 c b as } |
\barNumberCheck 49
2-> |
2-> |
2-> |
2-> |
2-> |
4-> |
4 |
2 |
\barNumberCheck 57
\key fs \minor
r8 a''->( gs) fs-. |
\addStaccato { es8 d cs bs } |
2-> |
2-> |
2-> |
2-> |
2-> |
4-> |
\barNumberCheck 65
4 |
4 r |
cs16( fs es b'! a! d! cs b) |
\appoggiatura { b16 } a8( gs16 fs es8)-. cs-. |
fs8-. b,-. cs16( fs es b' |
a16 d cs b) \appoggiatura { b16 } a8( gs16 fs |
\addStaccato {
es8) cs fs b, |
cs8 b as fs |
\barNumberCheck 73
b8 a! gs e |
}
a4-- a'-\slurShapeG ( |
\key b \major
gs4 gs, |
cs4) cs'( |
b4 b, |
e,4) e'-\slurShapeH ( |
ds4 ds, |
gs4) gs'( |
\barNumberCheck 81
fs4 fs,) |
\addStaccato {
b'8 ds e as, |
b8 ds e as, |
}
b8-. as-. \voiceTwo gs-\slurShapeI ( b |
fs8 as \oneVoice b-.) gs-. |
\voiceTwo fs4 fs |
fs4 fs |
fs4 fs |
\barNumberCheck 89
fs4 fs |
fs4 fs |
fs4 fs |
fs4 \oneVoice r |
\addStaccato {
d8 b' e, fs |
g8 d e fs |
g8 e fs[ fs,] |
b8 d e fs |
\barNumberCheck 97
g8 d e fs |
g8 e fs[ fs,] |
}
b'16( cs ds! e fs e ds cs |
b16 cs ds e fs e ds cs |
b16 cs ds e fs e ds cs |
\addStaccato { b8) e, fs[ fs,] } |
b'16( cs ds e fs e ds cs |
\override DynamicTextSpanner.style = #'none
% \after is used so that the decrescendo and crescendo don't clash
\after 1024 ^\cresc b16 cs ds e fs e ds cs |
\barNumberCheck 105
b16 cs ds e fs e ds cs |
\addStaccato {
b8) e, fs[ fs,]\! |
gs'8 b as fs |
b8 e, fs[ fs,] |
gs8 b as fs |
b8 e fs[ fs,]
}
4-> r |
}
}
leftHand = {
\global
\clef bass
<<
\new Voice \leftHandUpper
\new Voice \leftHandLower
>>
}
dynamics = {
\override DynamicTextSpanner.style = #'none
\repeat volta 2 {
s2\f |
s2*3 |
s8 s4\> s8\! |
s2\p |
s2\f |
s2 |
\barNumberCheck 9
s2*4 |
s2\p |
s2*2 |
s8 s4.\cresc |
\barNumberCheck 17
s2*3 |
s2-\tweak Y-offset #-2 \f |
s2*4 |
\barNumberCheck 25
s2\p |
s2*2 |
s4 s\cresc |
s8\> s4.\! |
s8\> s4.\! |
s2\f |
s4\> s16\p s8.\cresc |
\barNumberCheck 33
s8\> s4.\! |
s8\> s4.\! |
s2\f |
s2*3 |
}
\repeat volta 2 {
% key of a minor
\tuplet 3/2 {
s16\f s8\p\< s8. s8. s8 s16\! |
s16\f s8\p\< s8. s8. s8 s16\! |
\barNumberCheck 41
s16\f s8\p\< s8. s8. s8 s16\! |
s16\f s8\p\< s8. s8. s8 s16\! |
s16\f s8\p\< s8. s8. s8 s16\! |
s16\f s8\p s8.\cresc s4. |
}
s4 s\f |
s2 |
% key b minor
s4. s8-\tweak Y-offset #1 \p |
s4.\< s8\! |
\barNumberCheck 49
\tuplet 3/2 {
s16\f s8\p\< s8. s8. s8 s16\! |
s16\f s8\p\< s8. s8. s8 s16\! |
s16\f s8\p\< s8. s8. s8 s16\! |
s16\f s8\p\< s8. s8. s8 s16\! |
s16\f s8\p\< s8. s8. s8 s16\! |
s16\f s8\p s8.\cresc s4. |
}
s4 s\f |
s2 |
\barNumberCheck 57
% key fs minor
s4. s8-\tweak Y-offset #1 \p |
s4.\< s8\! |
\tuplet 3/2 {
s16\f s8\p\< s8. s8. s8 s16\! |
s16\f s8\p\< s8. s8. s8 s16\! |
s16\f s8\p\< s8. s8. s8 s16\! |
s16\f s8\p\< s8. s8. s8 s16\! |
s16\f s8\p\< s8. s8. s8 s16\! |
s16\f s8\p s8.\cresc s4. |
}
\barNumberCheck 65
s4 s\f |
s2*3 |
s4 s\p |
s2*2 |
s2-\tweak Y-offset #-1 \cresc |
\barNumberCheck 73
s2 |
s2\f |
% key b major
s2 |
s8\> s4.\p |
s2 |
s2\f |
s2 |
s8\> s4.\p |
\barNumberCheck 81
s2 |
s8\> s\p s4\cresc |
s2*3 |
s16\f s8.\p s4\cresc |
s2*2 |
\barNumberCheck 89
s2-\tweak Y-offset #-1 \f |
s2*2 |
\override DynamicLineSpanner.Y-offset = #-5
s4\> s\! |
s8\f s4.\p |
s2\cresc |
\override DynamicLineSpanner.Y-offset = #0
s2\f |
s8 s4.\p |
\barNumberCheck 97
s2\cresc |
s2\f |
s4\> s16\p s8.\cresc |
s8\> s4.\! |
s8\> s4.\! |
s2\f |
s4\> s\p |
s8-\tweak Y-offset #1 \> s4.\! |
\barNumberCheck 105
s8\> s4.\! |
s2\f |
s2*2 |
s8\p s4.\cresc |
s2 |
s2-\tweak Y-offset #-1 -\tweak extra-offset #'(0 . -0.5) \f |
}
}
pedal = {
\repeat volta 2 {
s2*16 |
\barNumberCheck 17
s2*4 |
s2\sd |
s2 |
s2\su |
s2 |
\barNumberCheck 25
s2\sd |
s2 |
s2\su |
s2*5 |
\barNumberCheck 33
s2*6 |
}
\repeat volta 2 {
% key of a minor
s2\sd |
s2-\tag layout \sd -\tag midi \sud |
\barNumberCheck 41
s2-\tag layout \sd -\tag midi \sud |
s2-\tag layout \sd -\tag midi \sud |
s2-\tag layout \sd -\tag midi \sud |
s4-\tag layout \sd -\tag midi \sud s-\tag layout \sd -\tag midi \sud |
s4-\tag layout \sd -\tag midi \sud s\su |
s2 |
% key b minor
s2*2 |
\barNumberCheck 49
s2\sd |
s2-\tag layout \sd -\tag midi \sud |
s2-\tag layout \sd -\tag midi \sud |
s2-\tag layout \sd -\tag midi \sud |
s2-\tag layout \sd -\tag midi \sud |
s4-\tag layout \sd -\tag midi \sud s-\tag layout \sd -\tag midi \sud |
s4-\tag layout \sd -\tag midi \sud s\su |
s2 |
\barNumberCheck 57
% key fs minor
s2*2 |
s2\sd |
s2-\tag layout \sd -\tag midi \sud |
s2-\tag layout \sd -\tag midi \sud |
s2-\tag layout \sd -\tag midi \sud |
s2-\tag layout \sd -\tag midi \sud |
s4-\tag layout \sd -\tag midi \sud s-\tag layout \sd -\tag midi \sud |
\barNumberCheck 65
s4-\tag layout \sd -\tag midi \sud s\su |
s2*7 |
\barNumberCheck 73
s2*32 |
\barNumberCheck 105
s2*7 |
}
}
tempi = {
\repeat volta 2 {
\tempo "Allegro" 4 = 92
s2*32 |
\barNumberCheck 33
s2*4 |
\set Score.tempoHideNote = ##t
s8 \tempo 4 = 84 s \tempo 4 = 76 s \tempo 4 = 69 s |
\tempo 4 = 63 s2 |
}
\repeat volta 2 {
\tempo 4 = 92
s2*2 |
\barNumberCheck 41
s2*64 |
\barNumberCheck 105
s2*5 |
\tag layout { s2*2 | }
\tag midi {
\alternative {
{
s8 \tempo 4 = 84 s \tempo 4 = 76 s \tempo 4 = 69 s |
\tempo 4 = 63 s2 |
}
{
s8 \tempo 4 = 80 s \tempo 4 = 69 s \tempo 4 = 60 s |
\tempo 4 = 40 s2 |
}
}
}
}
}
forceBreaks = {
% page 1
s2*5 \break
s2*5 \break
s2*5 \break
s2*5 \break
s2*5 \pageBreak
% page 2
s2*4 \break
s2*4 \break
s2*4 \break
\grace { s8 } s2*4 \break
s2*4 \pageBreak
% page 3
s2*4 \break
s2*4 \break
s2*4 \break
s2*5 \break
s2*4 \pageBreak
% page 4
s2*5 \break
s2*4 \break
s2*4 \break
s2*5 \break
s2*5 \pageBreak
% page 5
s2*5 \break
s2*4 \break
\grace { s8 } s2*4 \break
\grace { s8 } s2*4 \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 \pedal
\new Dynamics \tempi
\new Devnull \forceBreaks
>>
\layout {}
}
\include "articulate.ly"
\score {
\keepWithTag midi
\articulate <<
\new Staff = "upper" << \rightHand \dynamics \pedal \tempi >>
\new Staff = "lower" << \leftHand \dynamics \pedal \tempi >>
>>
\midi {}
}