It’s elevator music, 21st-century style: not Herb Alpert, piped tinnily into your local department store, but carefully curated playlists generated by algorithms and used by major restaurants, supermarkets and retailers all over the world to entice us to spend more cash. In the largest study of its kind, researchers from the Swedish Retail Institute – in collaboration with Spotify-backed startup Soundtrack Your Brand – found that specially selected songs increased customers’ spending by 9.1%.

Conducted at an unnamed American burger chain in Sweden, and analysing almost 2m purchases, the research compared the difference in sales when playing music chosen to match the brand with randomly selected popular songs. When playing bespoke playlists, sales of burgers went up by 8.6%, fries by 8.8% and desserts by a whopping 15.6%. The underlying message: if we like a tune, we’ll buy more chips.

But how does it all work? “It’s about priming,” says Professor Charles Spence, an experimental psychologist at the University of Oxford. “If you’re in a store prevaricating between French and German wine and you hear French music, the French wine is going to have a slight advantage. Some studies have shown that if you play classical music, people will spend more money, others that uptempo music makes you move faster through a store or eat or drink more quickly in a restaurant or bar.”

“Music triggers associations in our brain,” says Philip Graves, a consumer behaviour expert. “The way in which we process our environment is primarily unconscious. What gets passed through to us is a feeling, and that feeling is then misattributed to the thing we are looking at.” The result? “We like that thing more.”

A number of studies have shown that music can influence sales and customer choice, but the Swedish one is the first to examine the impact of playlists curated for a specific brand. Or, as Spence describes it, “the new muzak: piped playlists with big data behind it. It’s either exciting or terrifying, depending on how you look at it.” And how does he look at it? “I’m excited. It’s good to be mindful about what’s going on, but I hate being in environments where I don’t like the music.”

Spearheading the revolution is Soundtrack Your Brand. “We’ve spent four years developing an advanced method called Soundscan, used in this research and in all our curation efforts,” explains Ola Sars, Soundtrack’s CEO. “Until now, streaming hasn’t crossed over into background music, which has become a fairly broken market.”

“Anyone can put together a playlist that sounds good,” says Magnus Rydén, the company’s head of music. “But when you’re curating for a business, it’s important to really understand them. It’s about expressing that brand through music.” So how do they pick the tunes? “Once we’ve got the parameters right, it comes down to our daily sourcing of new music,” he explains, somewhat mysteriously. “If a brand is positioning itself as, say, modern and technological, those are the parameters we use,” adds Sars. “Then Magnus’s team rolls through hundreds of thousands of tracks that qualify and handpicks them. We scale through data and then add humans for the last bit of fine tuning and complexity.”

So, just what were they pumping into that fast-food joint? “The Soundscan model doesn’t really give us the perfect burger-and-shake tune,” Rydén laughs. However, he later sends me an email detailing the “welcoming, modern, and expressive” parameters common to restaurants “targeting a millennial audience”. Apparently, Ed Sheeran’s Shape of You fits the bill perfectly, while the “low key” sound of New Zealand band Yumi Zouma “is simply too pale”.