The cerebral cortex is divided into four lobes: The frontal lobe controls executive function, impulse control, long-term planning, motor function, and speech production. The parietal lobe controls sensations of touch, pressure, temperature, and pain; spatial processing; orientation; and manipulation. The occipital lobe controls visual processing. The temporal lobe controls sound processing, speech perception, memory, and emotion.