Virginia, I want to thank you for your note and for your request. Such a great question... "How do I modulate?" If your playing for your own enjoyment or for church, you'll definitely want to learn how to do it. I've blogged about it before and if you have the time, look at these posts: What if there isn't a transpose button? and How to transpose, modulate, and memorize.
My answer: Usually it's the V7 chord of the next key you want to go to that is the pivotal chord. You can hear how the sound sets it up. So, if you're playing along in the Key of D, you've landed on the V chord which is A, and you want to head over to the Key of E, then play B7 chord. Do you hear the change?
Modulation and the Pivot Chord
Most basic teaching on the process of modulation concentrates on the role of the pivot chord. A chord is chosen which is common to the two keys involved. The chord is ambiguous and takes on one function in the first key and is reinterpreted as a chord on a different degree of the scale in the new key. For the chord to be truly ambiguous then it should be neither the tonic nor dominant of either key. This process smoothes the flow from the first key to the second key. An outline of this would be as follows:
While we're on the subject of transposition, I'd like to share Chapter 18 from Edly's Music Theory For Practical People - Third Edition. I sure hope the information helps many of you.
What is transposition? It is simply changing the key of the melody, a chord progression, or even an entire song.
Why might one want to transpose? Common reasons include: to put a song within a certain singer's vocal range, or a certain instrument's best playing range, or to allow instrumentalists to play in a key with fewer accidentals, or for a transposing instrument to read from concert key sheet music. Lastly, transposition is used part way through a song in the form of modulation (changing key), to "freshen" the aural palette, and especially in pop music, to create a feeling of intensity.
Basic Transposition... Transposing Melodies
How does one transpose? The most basic way to transpose a melody is to use the chromatic scale, and move each note the same number of half-steps up or down. A common example of this is men and women singing the same melody together. Women's vocal ranges are naturally about an octave higher than those of men. Singing the same melody separated by an octave is the simplest transposition: octave transposition.
Some melodies fall into a range that men and women share. In this case, they can sing in unison. An example requiring a bit more thought on the part of the transposer is a melody which is a bit too slow for a female singer and a bit too high for the male singer to sing in unison. A solution for this is to transpose the melody up, for example, five half-steps for the woman, and down seven half-steps for the man.
One could use this method (of transposing using half-steps) to transpose any distance, but there is an easier way for anyone comfortable with intervals. This easier, quicker, way is to transpose by interval. If you know your intervals, transposing each chord or melody note up or down the appropriate interval is a breeze. Up five half-steps is a perfect fourth, and down seven half-steps is a perfect fifth. Why count half-steps when you can calculate by interval? So, both of these techniques yield the same result: the men and women will be singing in octaves in the key a fourth higher (or a fifth lower).
More Advanced Transposition... Transposing Chords
Chords can also be transposed. I'll show you an example... When transposing chords, change only the root of the chord! Do not change the chord type at all. If you were to change the chord type, you'd be reharmonizing (changing the harmony), not transposing.
For example, take the chord progression Em, Eb, Abmaj7, G6, and transpose the roots up a minor third. You wind up with Gm, F#, Bmaj7, Bb6. Easy!
* There's lots more to the chapter but basically this last point is essential here. *
The quickest way to transpose is based on understanding keys well enough that you can think of (and ideally, hear) what you're playing, whether melodies or chords, in non-key-specific terms. This would mean that you are sufficiently aware of chords' (or notes') relationships to each other, that you see (and hear) the original key as just one of twelve possibilities. That is, instead of thinking of C, F, and G7, you think think of I, IV, V7 occurring. If you know your keys and scaled well enough, it is easy to think of I, IV and V7 in any of the twelve keys.
The more you transpose, the more it will come naturally to you!
You may want to check out Song Robot Software to help with modulation of songs.
"The beautiful thing about learning is that no one can take it away from you." B.B.King