Smell makes music inside our brains. Each aroma, a different melody.

Scientific American organizes some notes on the neurology of scent, with experiments that show the brain distinguishes between similar scents in the same way we hear notes of a song – by understanding which sequence makes this or that melody:

When stimulated by a chemical with a smell, or an odorant, they send nerve impulses to thousands of clusters of neurons in the glomeruli, which make up the olfactory bulb, the brain’s smell center. Different patterns of glomerular activation are known to generate the sensation of specific odors. Firing one set of glomeruli elicits the perception of pineapples; firing another evokes pickles.

To do so, they used a technique called optogenetics to activate glomeruli in mice. Optogenetics uses light to stimulate specific neurons in the brain. And it can help determine the function of particular brain regions.

By activating certain patterns of activity in glomeruli, the researchers generated “synthetic smells” that the mice perceived as real. They first trained the rodents to recognize the switching on of six specific glomeruli, causing them to perceive an odor that was unknown to the researchers. The mice received a water reward when they recognized the correct smell and received water from a spout. When other glomeruli were activated—generating a different odor—there was no reward.

When they changed which glomerulus was activated first, the mice demonstrated a 30 percent drop in the ability to sense the correct odor. When they changed the last one activated, there was only a 5 percent reduction in detection ability.

“We created an artificial activation pattern, or artificial smell, and trained the mice to recognize it,” explains the paper’s senior author Dmitry Rinberg, a neuroscientist at N.Y.U.Langone. “Then we modified that pattern to see which cues were most important to forming a perception of it. The thing is, we have no idea what the mice are actually smelling—if it’s an apple or an orange, if it stinks, if it’s pleasant!”

Rinberg likens smell perception to the melody of a song: The notes—in this case, representing activated glomeruli—are important. But without the right timing, the song, or the perceptual experience, falls apart. Changing the seventh note of a melody might be unnoticeable. Swapping the first two might result in a new tune altogether.