Responses to infrequently exchanging two segments of a complex tonal pattern were tested for the presence of the mismatch negativity event-related brain potential component. This component is elicited when an auditory stimulus differs from the sensory memory trace of the previously presented repetitive sound. Because the segments exchanged in the tonal pattern differed from each other only in their durations, the elicitation of the mismatch response revealed that the temporal structure of sound patterns is encoded in the traces underlying the mismatch process. Results showing that the mismatch response was elicited even when the tonal patterns were presented continuously (i.e. without silent intervals separating successive patterns) demonstrate the automatic detection of periodicity in the acoustic stream.