Companies have done a lot of work to optimize music in retail shops to encourage customers to buy more stuff — think of the smooth, just-quirky-enough tunes quietly playing at any given Starbucks, or whatever sonic garbage the Abercrombie store at the mall is always blasting when you walk by.

But there has been less research done on the effect these soundscapes have on employees. So a group of Cornell PhDs got together and ran an experiment to see how different music types affected the collaborative behavior of different groups of people.

They recruited 188 undergrads to take part in a "voluntary contribution mechanism" (VCM) experiment, a well-established tool that researchers use to measure and manipulate cooperative behavior among research subjects.

The students were split into anonymous groups of three and interacted with each other via computer monitors. The VCM trial ran for 20 rounds. In each round, each student was given an allotment of cash that they could either contribute to a group pool or keep for themselves. Cash given to the group pool was multiplied 1.5 times before being distributed among the individuals, creating an incentive for giving.

In other words, a student with $10 at the beginning of a round could choose to either contribute it to the group account, which would result in a return of $15 for the next round, or they could keep it for themselves, in which case they would only have $10 for the next round.

Crucially, the participants didn't know how many rounds the experiment would go on for. So when choosing whether to contribute to the pool, they had no idea whether they would ever see that money again.

Here's where things get interesting: Different types of music were randomly assigned to play for different groups of students. A third of the groups listened to a playlist of "happy" music while the experiment ran: "Yellow Submarine," "Walking on Sunshine," "Brown-Eyed Girl" and the theme from "Happy Days."

Another third listened to a playlist of two "unhappy" songs by relatively obscure metal groups: "Smokahontas" by Attack Attack and "You Ain't No Family" by Iwrestledabearonce.

A control group listened to nothing at all.

The researchers found that through all 20 rounds of the experiment, one group of participants contributed more often.

"We found significantly and persistently higher levels of cooperative behavior by participants who were played Happy music when compared with the other two conditions," the researchers wrote.

The differences were pretty large. By the fifth round of the trial, for instance, the happy music listeners were contributing well over 60 percent of their available funds to the group. The people listening to thrash metal, on the other hand, were only contributing 40 percent to the group.

At the experiment's end, the happy listeners were giving 50 percent for the good of the group. The people listening to no music contributed just over 20 percent. These numbers show "happy music provokes employees to make decisions for the good of the team," according to a news release on the study.

It's worth pointing out that the task the students were performing was a fairly abstract one. Deciding whether to entrust anonymous strangers with money isn't quite the same thing as working as part of a team behind a Starbucks counter. But the benefit of this experiment is that it provides "controlled and validated measures of cooperative behavior," in the words of the researchers.

The study is just a first step in understanding how music can affect employee behavior, because it leaves a lot of unanswered questions. What happens, for instance, when music starts getting repeated over and over (as it often does in retail settings)? The first time the "Happy Days" theme comes over the speaker you may do a little dance. But by the 10th time, or even the fifth, or let's face it, the second time you hear that song, you may be ready to stab someone.

There's also the question of individual preferences in music. What happens if you've got a team of employees who are just really into shouty death metal? What happens when a manager's "Cool Fun Jams for the Work Day" mix is filled with stuff that his employees can't stand?

Still, the study is a useful reminder that workplace music can have a significant impact on employees, not just on customers. Is it better to optimize for playlists that can get customers to buy more, or that can get employees to sell better? For that, more research is needed.

More from Wonkblog: