Here is a clue if you are wondering how a listener's brain recognise if an unknown melody played by a pianist without reading from a musical score melody is improvised or memorized.
Researchers at the Max Planck Institute for Human Cognitive and Brain Sciences in Leipzig investigated jazz musicians to discover which brain areas are especially sensitive to features of improvised behaviour.
Among these are the amygdala and a network of areas known to be involved in the mental simulation of behaviour.
Furthermore, the ability to correctly recognise improvisations was not only related to the musical experience of a listener but also to his ability to take the perspective of someone else.
In order to examine such basic mechanisms of social abilities in controlled settings, Peter Keller, head of the research group "Music Cognition and Action" at the Max Planck Institute for Human Cognitive and Brain Sciences, Leipzig and his research associate Annerose Engel investigated musical constellations ranging from solos and duos to large musical ensembles.
They investigated the brain activity of jazz musicians while these musicians listened to short excerpts of improvised melodies or rehearsed versions of the same melodies. The listeners judged whether each heard melody was improvised.
"Musical improvisations are more variable in their loudness and timing, most likely due to irregularities in force control associated with fluctuations in certainty about upcoming actions-i.e., when spontaneously deciding what to play-during improvised musical performance", explained Keller.
The amygdala, part of the limbic system, was more active while listening to real improvisations and was sensitive to the fluctuations of loudness and timing in the melodies.
Thus, the amygdala seems to be involved in the detection of spontaneous behaviour, which is consistent with studies showing an involvement of this structure when stimuli are difficult to predict, novel or ambiguous in their meaning.
If a melody was judged as being improvised, regardless of whether this was in fact the case, stronger activity was found in a network which is known to be involved in the covert simulation of actions. This network comprised the frontal operculum, the pre-supplementary area and the anterior insula.
"We know today that during perception of actions, similar brain areas are active as during the execution of the same action", explained Engel.
"This supports the evaluation of other people's behaviour in order to form expectations and predict future behaviour," added Engel.