Each of the hundreds of brief musical gems in binary form that were called "sonatas" by Scarlatti is a study of a particular idea -- a fingering technique, a phrase or certain instrumental timbre, a way of creating unusual harmonies, an obsessively cycling motif changed only gradually until it reaches a resolution hardly expected by the listener, and so on. In this sonata, the central gestural idea is that of the anticipatory beat. This creates some wonderful momentary harmonies, and even in the Andantino Cantabile tempo gives a lilt to the melody revealing Iberian influences -- to quote the brilliant keyboardist Wanda Landowska who revived much early music: "When we hear Scarlatti's music, we know that we are in the climate of sunlight and warmth. It is Italy, it is Spain."
The theme opens with a slow arpeggio followed by a descending scale that introduces the gentle skipping rhythm of the anticipation. The line begins to work its way upward again by faster runs in the fourth measure. In the Longo edition of Scarlatti's works, the notes of some of the runs are "corrected" to sound more like what would be expected in the style of Haydn or Mozart, and in this case to eliminate the parallel fifths in the bass forbidden in traditional voice leading. These type of "corrections" only serve to take away the originality of the composer's style, his original decisions sounding interesting and musically just fine.
In the fifth measure, a variation on the first measure is created by a chromatic altering of the melody (the D is sharped) that leads toward the dominant chord but mainly provides a dissonance that is joyfully explored and repeated in the sixth measure. Scarlatti rarely makes changes in the harmony just to blandly modulate to the next chord, but instead creates a new point of musical interest, in this case an obsession on the D sharp which doesn't resolve until the seventh measure. Measures 8 through 10 obsess on a repeating, "vamping" figure of three descending notes in the parallel minor. The next few measures work toward the dominant key, the typical structure for the first half of a Scarlatti sonata going from the tonic to the dominant key (and the reverse in the second half). The first cadence touchingly substitutes C sharp minor for the dominant, and then proceeds to a standard V-I cadence. On the dominant of the dominant (B major), the original score employs the rich sound of the acciaccatura, a favorite device/sound of Scarlatti's (possibly heard in native guitar music). This chord contains both the current harmony and the one it is resolving toward -- thus, the B chord has the notes B, E, F sharp, A, B (B7 sus. 4 in modern notation). This is of course again "corrected" in the Longo edition.
The second half never repeats the theme of the first half but does beautifully expand on the previous running figures.