Nothing inspires a great pop song like falling in love, unless it’s getting your heart broken. So Mini Mansions frontman Michael Shuman was doubly inspired, since he went through both in the course of writing the L.A. pop trio’s third album, “Guy Walks Into a Bar …”

“The ‘dot dot dot’ in the title is important,” Shuman said this week. “For us humans, the first thing we do is go out in search of a partner. It could happen at a gym or a restaurant or an online dating site, but for us, it happened to be a bar. That’s how this relationship started, and it’s how this record started as well. The album takes you through everything, and it was written in real time. The recording process lasted two years, which is how long my relationship with this woman lasted. It was a challenging process and emotionally fatiguing, but I think it made for a real and honest record.”

The members of Mini Mansions all double in better-known bands: Shuman is also the bass player in Queens of the Stone Age; bassist Zach Dawes is in the English supergroup Last Shadow Puppets; and keyboardist Tyler Parkford is a touring member of Arctic Monkeys. They’ve had musical friends guest on their three albums, including members of the above bands plus Alison Mosshart of the Kills, and even one of their heroes, Brian Wilson (whom Dawes knew from earlier session work).

“One problem for our band is that people might not take it seriously because they think it’s a side project,” Shuman said. “We don’t see it that way and we always want to say, ‘Hey, wait a minute, this is for real.’ At the same time, I like to keep my eyes open and learn from every band that I’m associated with, and I probably bring some of this band into the Queens. It’s inspiring to have someone like Alison in the studio, and you want to watch the way they do the creative process. It’s a mistake if you can’t learn from someone like that.”

They didn’t get to watch Brian Wilson in the studio, since he likes to work alone.

“The song (‘Any Emotions’ from their previous album, ‘The Great Pretenders’) was already done, but we sent him the tape and said, ‘We have this idea for an extra vocal. What can you do about it?’ He sent back 30 tracks’ worth of amazing vocal harmonies and said, ‘Do what you want with it.’ So we pretty much used it all.”

The new album won’t be out until July, so fans will hear a few songs from it for the first time at the Middle East on Monday. Expect a mix of hard rock, dance grooves, ’80s synth pop and a lot of melodies and hooks.

“I realized lately that my favorite songs are all love songs, and until this album, we weren’t writing them. But our records are always pretty schizophrenic; we can write a ballad, a punk song, then an abstract jam and still have it sound like Mini Mansions. I’ve never understood people who only listen to one kind of music, and I’ll never be like that. If you only eat chocolate ice cream every day, it’s going to get old.”

Mini Mansions, with James Supercave, at the Middle East, 472 Massachusetts Ave., Cambridge, Monday. Tickets: $15.