The ternary form with the contrasting middle is an easy form to hear the structure of and it became hugely popular during the 19th century. Mind you, it was also frequently used for slow movements during the Classical era. I want to pick out a couple of examples from the 19th century. Here is the Impromptu op. 90 no. 4 in A flat by Schubert played by Alfred Brendel:
That sparkling opening arpeggio is very distinctive which means that when we hear it return we become very aware of the ABA form. Here is how it looks:
This goes on until the 2:11 mark in the clip. The first section has been ended with a full cadence in A flat major, the home key. Then there are two measures of A flat with an added minor seventh. This is the enharmonic equivalent of G# major seventh which is the dominant of C# minor. Thus with the addition of one single note, that G flat (F# in the new key) Schubert modulates from A flat major to C# minor. Here is how the new section begins:
|Click to enlarge|
At the 4:52 mark in the clip, Schubert begins to transition back to the first section. He does this in two ways. First he prepares the change in key by moving to the dominant of the dominant in C# minor. This is D# major with a seventh. If we respell this as E flat major with a seventh, it is the dominant of the original key, A flat major. Again, a beautifully efficient modulation. While sitting on this chord he changes the key signature and the texture, returning to the high, sparkling arpeggios of the opening. This slips seamlessly into a repeat of the whole opening section. Finis. Here is how that transition looks:
|Click to enlarge|
In terms of what we might call the mood-schema of these pieces, typically the outer sections are more brilliant and energetic while the inner section takes us inward into a more reflective mood. This was why the form was particularly popular in the 19th century as this was the kind of effect composers were looking for.
I want to put up another example, from the end of the century. This is the Asturias (Leyenda) by Isaac Albéniz that is more often heard on guitar than piano these days. It offers a particularly stark contrast of tempo, texture and mood in the middle section. As it is so easy to hear, I won't put up musical examples. This performance is by John Williams on guitar: