A few important aspects of memorising music:
Muscle memory - with enough repetition of the same passage of music, muscle memory is developed whereby your fingers play the notes automatically, eliminating the need to recall the notes consciously. This results in more fluency. Technically it's not the muscles that are remembering what to do, but the brain that has learned the movement. The more repetition of the music that you are aiming to memorise, the more ingrained the muscle memory will be.
Aural memory - memory of the sound of the melody and harmonies. If you have a clear memory of what the piece of music sounds like, a bit like an audio recording in your head, your ear can help you work out where to go next if at any point your muscle memory fails. One way to improve your aural memory of a particular piece of music is to listen to recordings of it being played, lots of times. Once you have started to get the sound fixed in your head, try imagining that you're listening to the piece of music instead of actually listening to it, as if you're playing the recording in your head. This will help to strengthen the aural memory.
Visual memory - of the sheet music. Remembering what the music looks like and whereabouts on the page you are. Studying the sheet music away from the instrument can help with this aspect of memory. Reading the music while imagining the sound at the same time can help to strengthen both the visual memory and aural memory. Read more about studying the score away from the piano.
Structural memory - dividing the piece of music up into sections in your head. This could be as simple as dividing it into two halves. It could be more detailed such as defining intros, expositions, developments, recapitulations, codas etc. Label these sections according to memorable features eg. scale-like passages, chordal passages, key changes, mood changes, repetition, variation of themes, phrasing etc. Annotating the score can be helpful for strengthening your memory of the structure of the piece.
An understanding of music theory contributes to solid memorisation of a piece. Knowing and naming which key you are in, recognising fragments of scales/arpeggios and being able to name them, recognising and understanding harmonic progressions, being able to name the chords you are playing, being aware of melodic/harmonic intervals and how they form a passage of music etc. - all these details and more give you a much stronger memory of the piece you are playing than if you rely on muscle memory alone.
Developing a mental map of the dynamics and other performance directions can also enhance your memorisation of the music. Again, studying the score away from the instrument is helpful, imagining how it will sound if played according to the performance directions, with expression.
More on memorisation.
Muscle memory - with enough repetition of the same passage of music, muscle memory is developed whereby your fingers play the notes automatically, eliminating the need to recall the notes consciously. This results in more fluency. Technically it's not the muscles that are remembering what to do, but the brain that has learned the movement. The more repetition of the music that you are aiming to memorise, the more ingrained the muscle memory will be.
Aural memory - memory of the sound of the melody and harmonies. If you have a clear memory of what the piece of music sounds like, a bit like an audio recording in your head, your ear can help you work out where to go next if at any point your muscle memory fails. One way to improve your aural memory of a particular piece of music is to listen to recordings of it being played, lots of times. Once you have started to get the sound fixed in your head, try imagining that you're listening to the piece of music instead of actually listening to it, as if you're playing the recording in your head. This will help to strengthen the aural memory.
Visual memory - of the sheet music. Remembering what the music looks like and whereabouts on the page you are. Studying the sheet music away from the instrument can help with this aspect of memory. Reading the music while imagining the sound at the same time can help to strengthen both the visual memory and aural memory. Read more about studying the score away from the piano.
Structural memory - dividing the piece of music up into sections in your head. This could be as simple as dividing it into two halves. It could be more detailed such as defining intros, expositions, developments, recapitulations, codas etc. Label these sections according to memorable features eg. scale-like passages, chordal passages, key changes, mood changes, repetition, variation of themes, phrasing etc. Annotating the score can be helpful for strengthening your memory of the structure of the piece.
An understanding of music theory contributes to solid memorisation of a piece. Knowing and naming which key you are in, recognising fragments of scales/arpeggios and being able to name them, recognising and understanding harmonic progressions, being able to name the chords you are playing, being aware of melodic/harmonic intervals and how they form a passage of music etc. - all these details and more give you a much stronger memory of the piece you are playing than if you rely on muscle memory alone.
Developing a mental map of the dynamics and other performance directions can also enhance your memorisation of the music. Again, studying the score away from the instrument is helpful, imagining how it will sound if played according to the performance directions, with expression.
More on memorisation.