I have opinions about scary music. Years as part of a local haunted house has left me able to identify horror tracks from movies I’ve never seen. I not only know who Midnight Syndicate is – I have preferred albums. But figuring out what makes music scary takes more than just hours logged in a pitch-dark maze; it takes science.

It isn’t hard to believe that music can affect your emotions; most people have their preferred songs from when they are feeling down or need to get amped before a big day. Movie soundtracks take it a step further and help audiences know where they are and how they should be feeling. Are they hopeful in Middle Earth or anxious in a galaxy far, far away? Or maybe, like in the recent A Quiet Place, silence itself can be the most powerful soundtrack.

But how does one kind of music tell audiences the big kiss is coming and another tell you that the killer is hiding behind that closed door? One group of researchers teamed up with a composer to create soundtracks with different acoustic qualities. Part of their inspiration came from animals in distress. Mammals in distress produce sounds that are non-linear and can have increases in pitch. Other animals, including humans, pay attention because such sounds are designed to stand out and send a message of distress.

The researchers were not going to just record animal screams – though some famous horror soundtracks apparently wove them into their scores. They created musical pieces with the critical acoustic qualities instead. They produced ten-second music selections, some of which had non-linear components at the halfway point. The added instrumentation changes or stimulated distortion marked a shift from the expected, linear quality leading up to that point. Participants listened to the clips and rated them for whether they were emotionally stimulating and if they felt happy or sad. The soundtracks with the distortion were more emotionally stimulating and generally received more negative ratings.

But sound only goes so far. Other researchers found differences in brain signals in the amygadala, hippocampus, and other areas when presenting pleasant music versus dissonant music. Importantly, the activation was greater when visual and music cues were presented together. Removing visual cues altogether can affect the experience as well, like the researchers who found increased reactions in people whose eyes were closed during the experience. But what about when the visual and auditory cues are in conflict? The researchers from the first study paired their ten-second clips with mundane videos and compared it to reactions to the music alone. When the discordant music cues were paired with a trivial moment – like someone turning the page of a book – the difference in arousal was suppressed. It’s not just about the right sound, but the power of the right visual (or lack therof) to go with it.

Cutting the soundtrack for our haunted house was a huge endeavor. You had to pick the right music, figure out how long certain things would take, decide if changes would happen at a certain time or had to be triggered, decide which moments would be cues for the cast, and overlay the sound effects. Maze music is not the same as ghost-in-the-room music, and neither of those are the same as person-breaking-in-through-the-window-during-a-storm music. The music was also loud, because it had to cover the sounds of moving set pieces and cast members working behind the walls. At critical moments, it also kept the people in the group from being able to hear each other, isolating them. But when we asked people at the end about the music, most said that they couldn’t remember any. They sometimes remembered how loud it was when they entered the first room, but after that they noticed only sound effects – the breaking glass, thunder, a music box. But we can hardly consider all of the work creating the ominous and discordant sounds as wasted, they just blended so well as to fade to the background of the whole experience. As classic as certain horror soundtracks are, sometimes the best music is the kind that no one remembers.