The generation and updating of expectancies is a crucial process for our understanding and appreciation of music. We present evidence that the dynamic process of musical expectancy can be studied by using several electroencephalographic (EEG) parameters such as amplitude or coherence in various frequency bands between 1.5 and 31.5 Hz. At specific electrodes (amplitude parameter) or electrode pairs (coherence parameter), values of these parameters depend on how an established musical context is completed, that is, if the expectancy generated by the context is violated, the pattern of the brain's electrical activity differs significantly from when the expectancy is fulfilled. The various parameters are also sensitive to the ease with which subjects classify a musical resolution. In our study, musically trained subjects heard repeated trials consisting of cadence primes in various major keys and inversions. Each cadence resolved either to the tonic, the relative minor, or a chord based on the tonic of the most distantly related major key. The three resolutions represented the "best," an "ambiguous," and "worst" possible fulfillments of the expectancy (resolution to the tonic) generated by the priming cadence. In a "response" condition, subjects expressed a yes/no judgment of how well the resolution matched their expectancy of the best possible resolution; in a "no response" condition, subjects were asked to make the same judgment but no overt response was required. Analyses of variance snowed that reaction times, response accuracies, and some EEG parameters differed between the various resolutions. In addition to confirming that a form of expectancy operates in musical contexts, the results point towards the brain structures responsible for the processing of complex musical stimuli. In particular, EEG parameters changed not only at recording sites located above the auditory cortices, but also at sites above right frontal and parietal regions.