This is a question I keep coming back to, both as a performer and as a teacher. I've had ample opportunity to investigate it this week, since I've started learning Morse code for a fun project with a friend.
This kind of memorization doesn't come easy to me, so I needed to make a plan. I started with the vowels.
The trick is to learn in a logical, step-by-step fashion, while at the same time mixing up one element of it. This makes your brain establish new neural connections at every step.
So I memorized the code for A, E, I, O, and U. But then, I'd quiz myself, while mixing up the order. I'd tap out E, I, O, U, A, then I, O, U, A, E, etc. After that I'd do it backwards: U, O, I, E, A, and start with the different vowels in turn that way. The next day, after I'd learned them well using this method, I opened a book and recited the code (dot-dash, etc) for only the vowels in each word. Tomorrow I'll start learning the consonants.
This type of "shifting repetition" can be surprisingly effective, and applies to learning music, too. Let's say you're memorizing a tune. First learn the melody, but then sing it from memory, without playing it. Then play it with the left hand. Then memorize the bass line. Play the bass 5 times. Then the melody again, then both together, then the bass alone. Then move on to the chords. Or alternate different sections of the same piece.
Practicing in this way forces your brain to constantly remember what you've previously learned, even while a new element is slightly confusing the issue. It also brings in different parts of our minds and musical ear, and establishes strong connections between them. Studies have shown that practicing in this way is more effective than focusing exclusively on one thing at a time, in always the same way.
Try it for yourself: choose something to learn this week and develop a practice plan that shifts a little. Then share your experience with us so we can compare notes.
Get my free ebook: Left Hand Techniques for Jazz Piano
You'll also get my weekly jazz newsletter with practice tips and inspiration