Modulation is a technique in music where a piece transitions from one key or tonality to another. This change in tonality can create a different emotional and musical effect. The purpose of modulation can be to enhance a piece's expressive power, making the listener feel more emotions and variations; it can also be used to connect different sections of a piece tightly, making the structure of the piece more complete.
The most common way to modulate is to choose a key that is similar or closely related to the current key and use a common or pivot chord to make a smooth transition. A common tone is a note that is present in both keys and can be used as a bridge between the two. A pivot chord is a chord that exists in both the current and new keys and is used as a harmonic pivot point to transition smoothly from one key to another. Chromatic chords can also be used to create tension and instability before a modulation.
Modulation can occur in the melody or harmony. In the melody, a modulation can be achieved by using a modulation note, which is a note that is common to both keys and can be used to lead the melody into the new key. In the harmony, modulation can be achieved by changing chords, such as using a pivot chord or a chromatic chord.