Where are you talking about the G#
in the melody? In your mm.21-24 example, I see only one place with G#
in the melody (treble part) and that is m.24, beat 4. I highlight that in yellow here...
...that G#
is harmonized as a G#
dominant seventh chord, and it next moves to a C#
minor triad, highlighted in blue.
If the justification for listing the key as C# minor is that the harmony/bass uses C# minor chords, can it be said that the melody is in G# Phrygian while the harmony is in C# minor? Is this a coherent statement?
That is not a coherent statement.
Key is determined by tonality, and that is largely a harmonic matter. Even if some music were a single voice melody only, tonal melody often implies harmony in various ways. Harmony is not a justification, it's what makes tonality and key perceptible.
I’ve been told that the tonic of a piece is the key where the melody comes to rest, where it feels resolved.
Kind of. But that description sounds like a lot of non-technical, non-music theory explanations.
You want to make a distinction between a rest in the interior of a piece of music versus the start/end of the music along with the understanding that music often modulates to different keys as the music progresses. When a piece is said to be "in the key of..." the convention is referring to the starting and ending key. All the interior parts of the work may modulate to other keys.
The thing you really want to look for is dominant/tonic harmonic relationships. Cadences are the typical points to look at to find those dominant/tonic relationships. In fact a cadence is the standard musical device used to define when establishment of a key is confirmed.
The opening of this piece has a tonic of C#
. It plays a G#
, then a C#
minor chord, eventually moves through II V I
cadential harmony.
It ends with a V I
cadential harmony movement, which connects to a coda, so the V I
happens quit a bit before the actual end. Also, the very last chord changes in quality from minor to major. That doesn't change the overall mode of the piece. It's more of a chromatic "coloring" at the very end. That device is called a Picardy Third.
Ironically, the section of your excerpt also has a dominant seventh chord in C#
minor, but you need to include m. 25 to see it move to I
.
It seems pretty clearly in C#
minor.
Just a note. I used plain, upper case Roman numerals for the chord analysis to avoid the complications of chord quality and inversions. We don't need the distraction of those details to figure out the key. The II V I
progression at mm.7-9, all diatonic, except for the conventional raised leading tone, the B#
, and a little auxiliary motion to Fx
, only requires identifying the chord roots to understand the cadential harmony establishing the key.