Canadian researchers report that the music and sound effects of slot machines help convey the illusion that you are winning.

Does this casino scenario sound familiar? You’re pumping money into a slot machine, very much enjoying the sense that you’re winning more often than you’re losing. Your excitement mounts—right up until that startling, disheartening moment when your money runs out.

How did you misjudge things so badly? It turns out you can’t put all the blame on those complimentary cocktails. Newly published research suggests at least part of the answer involves the slot machine’s music and sound effects.

It seems all those bells and whistles simultaneously perform two functions casino magnates love: They heighten players’ emotional arousal, even as they incite them to “significantly overestimate the number of times they won.”

On modern slot machines, where gamblers wager simultaneously on several lines, success on any one of those lines will produce the music and sound effects associated with a win.

That’s the conclusion of a research team led by psychologist Mike Dixon of the University of Waterloo, who has extensively studied the psychology of gambling. The researchers report two groups of gamblers experienced less pleasure playing silent slot machines. But they were also better judges of how well they were doing.

Writing in the Journal of Gambling Studies, the researchers describe a phenomenon they call “losses disguised as wins.” On modern slot machines, where gamblers wager simultaneously on several lines, success on any one of those lines will produce the music and sound effects associated with a win.

That holds true even if you lost on all of the other lines, resulting in a net loss on that particular wager. This leaves gamblers with the impression they’re winning (and the incentive to play more), even when they are, in fact, losing money.

To determine if the music and sound effects exacerbated this costly misconception, the researchers tested 96 regular slot machine players (a bit over half of them male). Most were recruited at the entrance of an Ontario slots venue; the experiment took place in a meeting room upstairs from the slots floor. Others were recruited online and tested at a university laboratory.

All of the participants played a simulated slot machine game, designed to look and sound like the actual machines, while electrodes attached to their skin measured changes in skin conductance (a good signal of emotional arousal). After playing a block of spins with sound, and one without sound, they were asked to estimate the number of times they won more than they wagered.

“The vast majority of players that were tested preferred the playing session where wins were accompanied by sound,” the researchers report. Skin conductance levels confirmed that the music and sound effects made the experience more exciting.

They estimated winning an average of 33 times when the sound was turned off, and 36 times when it was turned on. In fact, they won only 28 times. This suggests that (a) the multi-line game leads to the false impression of winning, and (b) the music and sound effects exacerbate this misconception, raising the rate of overestimation from 15 percent to 24 percent.

So losses are often masked as wins, and sound effects and music “may be an integral component to the disguise,” Dixon and his colleagues conclude. This, they add, helps explain the “persistence that some players experience when playing slot machines.”

Indeed, there are few things more enticing than the sound of winning money—even when it’s an illusion.