In popular music, lets say I have a song that appears to be in C major. The progression could be something like C > Em > Am > G.
This progression could also be in G major However. So, let's say we look at the melody but only the C major pentatonic scale is used and the F# or F is absent which would have been able to tell us the tonality of the song.
As a last resort, is it possible to listen to where the notes of the melody fall to get an idea of the tonality. For example the phrase could end on the G note on both the Em chord and the G chord. This kind of gives you the feeling that the song is actually in G not in C even though the chord progression starts on C and uses chords from the diatonic C major scale. Does music work in this way? I mean, the G note does feel like home in this case even without a more unambiguous chord progression being used so my question is: Surely the melody is just as much a determining factor not only in terms of which notes are used but also on what note the melody ends. Is this correct?