Most work on how pitch is encoded in the auditory cortex has focused on tonotopic (absolute) pitch maps. However, melodic information is thought to be encoded in the brain in two different “relative pitch” forms, a domain-general contour code (up/down pattern of pitch changes) and a music-specific interval code (exact pitch distances between notes). Event-related potentials were analyzed in nonmusicians from both passive and active oddball tasks where either the contour or the interval of melody—final notes was occasionally altered. The occasional deviant notes generated a right frontal positivity peaking around 350 msec and a central parietal P3b peaking around 580 msec that were present only when participants focused their attention on the auditory stimuli. Both types of melodic information were encoded automatically in the absence of absolute pitch cues, as indexed by a mismatch negativity wave recorded during the passive conditions. The results indicate that even in the absence of musical training, the brain is set up to automatically encode music-specific melodic information, even when absolute pitch information is not available.