Modulation
Modulation is a sustained move from one tonal center to another.
More than one foreign note
A phrase in C major can use F-sharp briefly without becoming G major. A modulation becomes convincing when the music establishes G as a new home, often through bass emphasis, melody and a cadence in G. The boundary can be gradual or abrupt depending on the style.
Build a small bridge
Play C–Am–D7–G. Treat the first two chords as C-major territory, then let D7 point to G. Hold G and write the next melody to settle on G rather than C. Compare with C–Am–Dm–G–C, where the G is only a stop on the way back.
Avoid declaring a key too early
A short tonicization can resemble a modulation for a moment. Listen to what happens after the new chord: does the music stay, develop and arrive there again, or immediately return? Describe uncertain passages honestly rather than forcing a key label at the first accidental.
Related entries
Further reading
These source links provide technical background; the exercises above are Eidolon's own editorial guidance.