I started to learn the Rachmaninoff Prelude in C# Minor (Op. 3 No. 2). Until recently I have had not much experience with music theory, except for the very basic things. In order to remember the piece better, I would like to understand some parts better from a theoretical point of view.
Take for example the last two triplets in bar 17. The last one is a
c# minor, so the triplet before occurs to me to be a dominant seventh, that is
g#, to resolve in the classic way of
Bar 21 starts with
A and ends with
A. The final resolution to the
A seems to be a
d diminished seventh chord. Why has this to be a
d? What is the reason or explanation behind this?