In cognitive science and research of artificial intelligence, there are two central paradigms: symbolic and analogical. Within the analogical paradigm, artificial neural networks (ANNs) have recently been successfully used for the modelling and simulating of cognitive phenomena. One of the most prominent features of ANNs is their ability to learn by example, and, to a certain extent, generalise what they have learned. Improvisation, the art of spontaneously creating music while playing or singing, has fundamentally an imitative nature. Regardless of how much one studies and analyses, the art of improvisation is learned mostly by example. Instead of memorising explicit rules, the student mimics the playing of other musicians. This kind of learning procedure cannot be easily modelled with rule-based symbolic systems. ANNs, on the other hand, provide an effective means of modelling and simulating this kind of imitative learning. In this paper, a model of jazz improvisation, based on supervised learning ANNs, is described. Some results, achieved by simulations with the model, are presented. The simulations show that the model is able to apply the material it has learned in a new context. It can even create new melodic patterns, based on the learned patterns. This kind of adaptability is a direct consequence of the fact that the knowledge resides in a distributed form in the network.