In recent years the Top 40 has become a sonically edgier place, thanks in large part to people like Ariel Rechtshaid and Rostam Batmanglij who’ve worked on both sides of the increasingly blurry line between the mainstream and the underground. Rechtshaid got his start playing in ska-punk band before moving on to indie rock with the folk-inflected Foreign Born. Since entering a second-act career as a producer, he’s gone on to work with megastars like Beyoncé, Madonna, Usher and Adele. Batmanglij’s a multi-instrumentalist who recently parted ways with the Pitchfork-beloved Vampire Weekend; he made his debut as a frontman just last weekend, but these days he’s best known as a songwriter/producer for the likes of Charli XCX and Carly Rae Jepsen (who also tapped Rechtshaid for her latest album, Emotion).

It’s rare for musicians to make the long climb from dingy rock clubs to the peaks of the Hot 100 like these guys have, and even rarer to find ones who’ve kept their credibility intact–when they’re not working with pop stars, both continue to collaborate with cult artists like singer-songwriter Cass McCombs (Rechtshaid) and former Walkmen frontman Hamilton Leithauser (Batmanglij). They also shared production duties on Vampire Weekend’s 2013 album, Modern Vampires of the City.

We got on the phone with Rechtshaid and Batmanglij to talk about their paths from the indie scene to the pop world and the differences—and surprising similarities—between the two.

Is it us, or was there a point when it wasn’t really accepted in indie-rock circles to be interested in what was happening on pop radio?
RECHTSHAID: I grew up listening to music I liked, and it was never really an issue within my peer group. I grew up in Los Angeles, where you drive around in your car and listen to the radio. I love ABBA. I love Usher. These are artists that I grew up listening to.
BATMANGLIJ: I never really felt that closely aligned with indie. I don’t really know what that term signifies. I think when Vampire Weekend started, people thought they knew where we were coming from musically, and it kind of took us three albums to explain. I’ve been using drum machines and making beats since I was 14 years old. I’ve always wanted to make pop music.

It seems like the definition of pop has grown a lot broader since then.
BATMANGLIJ: That’s something I’ve always been interested in: making pop music that sounds like nothing you’ve ever heard before. It’s important to me to make music that’s next level—pushing things forward.
RECHTSHAID: I’m constantly trying things. It’s sort of the way I work. I’m always up for experimenting, with the idea that it very well may never turn into anything.

You both work on smaller projects along with the pop-star ones. It seems like there would be a lot of difference between the two, but are there also similarities?
RECHTSHAID: More than you would imagine. Artists should have a point of view. They should have something they’re reaching for. Sometimes they get confused or lost, and that’s what I’m here to help with. Madonna and Usher and Cass [McCombs] are all very much in control of their music, so the process wasn’t really all that different.
BATMANGLIJ: Every song is different. Every process is different.

What got you started down the path towards doing more crossover work?
BATMANGLIJ: I think that it was just a natural thing. I’ve always loved pop music. Part of it has to do with moving to L.A. and having a studio behind my house that I can invite people over to. You have to take your shoes off when you come in.
RECHTSHAID: I don’t think me or any of my peers were ever intentionally operating on the fringe. We just were. And then it seeped its way toward the center. What we did became more accepted.

When someone comes to you to produce a song rather than, say, Mark Ronson or Max Martin, what do you think it is they’re looking for you to bring to the process?
RECHTSHAID: It depends. Everybody’s looking for something different. Some people are just looking for help. People have taken note of the fact that I’ve created music with so many different kinds of artists, in so many different genres, that perhaps I can help with what they’re doing. Other people are very specific. They love something I did. They want to explore that, but I discourage it because what I’ve done with one person was sort of a chemical reaction between everyone in the room that day. It doesn’t apply to somebody else. When I did “Climax” with Usher, there were a bunch of people who wanted to do that kind of thing, and I was like, that’s not what I normally do. That’s just what I did that day. I think trying to recreate it is certainly possible on a superficial level, but I don’t think that’s what made that song resonate. What I’m after is something that is timeless. It’s just about working with people who you have chemistry with, and being honest about it. There are a lot of forced collaborations.

The whole definition of the word “producer” seems to have gotten a lot blurrier since you got started. How do you see your role in the process?
RECHTSHAID: I think that ultimately the one constant in any situation is just an outside perspective that’s trusted within the sensitive confines of the studio. Beyond that it can vary from anything from writing a whole song and composing a track to as little as giving your opinion. In the middle is working very closely with everyone performing and getting great performances out of everyone who’s playing on the track. I’ve been involved with everything from making everything from the ground up, short of vocals, to just working with the vocalist to get the most compelling, honest, soulful performance.

Rostam, you and Charli XCX seem to have an especially good working relationship. Why do you think that is?
BATMANGLIJ: I think she really cares about songwriting. I feel like there aren’t too many people that care about it the way she does. That’s something that really connects us. She has her own very specific flavor that she curates for herself. She brings that to everything she does, including who she collaborates with creatively.

You guys and Blood Orange’s Dev Hynes and several other people with similar backgrounds have worked together a lot. Is there an indie-rock cabal in the pop industry?
RECHTSHAID: [laughs] I mean, we’re friends. In the scheme of things, we’re probably likeminded, musically. We’re all very close. With Carly Rae, she just liked what we do, so she asked us. Who didn’t like “Call Me Maybe”? But of course when we worked with her it didn’t sound like “Call Me Maybe.” It sounded like what we do.