The Write Stuff is an occasional series about songwriters.

Ryan Tedder loves the frozen food aisle. Standing in a grocery store surrounded by ice cream is where he's experienced some of his favorite moments as a songwriter. "When I see the person next to me doing that thing where they're looking at the ingredients on the back of the box and they don't realize that they're kind of dancing and singing out loud and they're singing my song? That, to me, is my absolute favorite moment," he tells EW.

Despite being the frontman for OneRepublic and starring on NBC's Songland, much of the world still doesn't know Tedder's full resume. Outside of his band's music — their next album, Human, is due later this year — Tedder is one of the most successful songwriters today. If you're driving in your car humming to "Sucker" by the Jonas Brothers, you love his work. If you sing along any time "Burn" by Ellie Goulding comes on, you love his work. And the list goes on. Tedder has written for (and with) Maroon 5, Beyoncé, Adele, Taylor Swift, Jennifer Lopez, Ed Sheeran, Demi Lovato, and many more.

"My very first memory of any song is [the Beach Boys'] 'Sloop John B,' and that's the memory of me discovering, 'Oh my god I love whatever this is,'" Tedder says. "And then right around that same time Stevie Wonder's 'I Just Called to Say I Love You' was the first song I learned on piano." Tedder would go on to play classical piano for 10 years. Growing up as an only child in Oklahoma, he recognized the advantages of being raised in what he calls "not the most boring state on earth." "I was a kid with headphones on. Music was my soundtrack to everything all the time," he says. "I'd change the music depending on the mood or the location of where I was at. I was always kind of making soundtracks to my life and if I wasn't listening to music, I was reading."

Around age 15, those two obsessions collided when he learned the name of songwriter Diane Warren. "I discovered that most recording artists didn't write their own songs," he says. "That's like finding out Santa Claus isn't real. And then I said, 'Well who did write it?' Once I discovered that there were these songwriters that were writing all these songs, I became obsessed."

But Tedder's obsessions weren't all about music. He also had his sights set on a different segment of Hollywood: He wanted to be an actor. He started doing musical theater in high school and went into college unsure of which path he'd ultimately follow. "I applied for internships to probably five record labels and five film studios. I said, 'Okay God, you tell me. Do I do music or do I do film? And whichever one gives me the internship, that's my answer.' And I ended up at Dreamworks Publishing in the songwriting department of Dreamworks Records."

By the time he turned 20, it was clear he'd made the right call when Tedder won a record deal after performing an original song titled "The Look" on TRL. It was a surprise to pretty much everyone who knew him. He hadn't even told his family that he'd been writing songs for the last four years. "I'm the kind of guy, if I know I'm going to go to the beach five months from now, I'm going to hit the gym now," Tedder says. "I'm going to get as shredded as possible so when I do hit the beach, I am in good shape. Music was the same way for me. I don't want to cook food for somebody until I've nailed the recipe, it's very simple. And that more or less was my approach."

Though TRL was the launching point of Tedder's career, but his big moment as a songwriter wouldn't come until 2007 with Leona Lewis' "Bleeding Love." EW asked Tedder to reveal the story behind that song and a handful of his other hits.

"Bleeding Love" by Leona Lewis

"I was a brand new writer on the scene, and I was working with Jesse McCartney on his album. He told me, 'I want this album to have a Prince vibe.' I sat down at my keyboard and I thought Prince and then I thought of "dearly beloved" and some of the beginnings of Prince's songs. I started playing those chords on the organ, mocked it together. I had a melody in five seconds, I had the opening line. I ran to the studio, played it for Jesse, we finished the lyric together, and then Jesse's A&R told me, 'I don't think this song's a hit, it's not going to make Jesse's album.' I remember telling my wife, 'If this song isn't a hit, I need to pick a new industry.' I sent it to Clive Davis and Simon Cowell, and they wanted it for Leona. It had been years since a British artist had had a hit in the U.S. I remember the day I got the call that it hit No. 1. Simon told me, 'This is going to cross the pond.' That was my first number one. And it was me doing my best to write a Prince record — what Prince would do for Sinéad O'Connor in 2007, that's what I was swinging for."

"Halo" by Beyoncé

"I was on tour with OneRepublic and I blew out my achilles heel, which sent me into surgery and then flew me home to L.A. I couldn't work, couldn't do anything and it got old really quick. Beyoncé had called me a month before. She wanted me to write her a song like [OneRepublic's] 'Come Home.' I was like, 'I'll write you a song, but let me do whatever comes naturally.' I had not written a song in probably two months at this point, I called my friend Evan Bogart and said, 'I got three hours by myself today, I'm going crazy, can you come over, let's write for Beyoncé.' I turned on my keyboard, and the very first thing that came out sounded like a bunch of angels singing, and that's the intro of 'Halo.' It was total luck that the particular keyboard patch that came on sounded like angels. I was like, 'If you're looking at an angel, you can see their halo. What if you're staring at the person you love and you can see their halo?' That entire song was written in under three hours. I did this piano solo in the bridge and Beyoncé ended up, instead of doing the lyrics that were in the bridge, she just sang my piano melody, which is insanity because it was not an easy one to do."

"Rumour Has It" by Adele

"I was on tour in Scotland blasting 19 and listening to 'Hometown Glory' on repeat. I called my manager, I said, 'Track down this Adele chick, I gotta work with her.' She was like, 'Who?' [Laughs] What I didn't know is, at the same time, Adele was trying to reach out to me because 'Halo' was her favorite song like ever. Fast forward four, five months and it's the Grammys. She's staying at the London Hotel [in Los Angeles], so am I. I'm walking into the lobby late one night, I hit the elevator button right as it's closing on somebody, it opens and it's Adele standing in the elevator holding 19 balloons because her label had given her 19 balloons for 19. We made a deal right there. I was like, 'I'm gonna be in London in three weeks, cool, let's get together.'

So first session we wrote 'Turning Tables' and then we got together three weeks later in the U.S. and she had written 'Rolling in the Deep' and 'Someone Like You' and said, 'What do you want to do today?' I said, 'I just don't want to do a ballad.' She's like, 'Alright let's do something that moves.' I started stomping and playing the guitar riff. It felt bluesy, and I was referencing Muddy Waters and Radiohead and all these weird references and came up with the melody. But it came from a conversation: She walked into the studio and was so pissed off, saying, 'I'm so mad, all my friends are spreading rumors — rumor has it Adele did this, rumor has it Adele's sleeping with this guy....'"

Image zoom Christopher Polk/Getty Images

"Welcome to New York," by Taylor Swift

"I thought we were going to walk in and start something from scratch because that's what I was used to. Then she calls me and says, 'Is it cool if I already have an idea?' I said, 'Sure.' She said, 'I have this song, I'm obsessed with New York and I just moved there, I want to write an ode to New York because no one's done it in a long time.' And then she sent me a voice memo. She's like, 'I want it to sound like the 1980s.' So the next day I brought in a Juno-106, which is a very 1980s keyboard, and I literally programmed that entire song right in front of her. It was very much on the fly, and that song was done in about three hours. And I did the rest of the production I think later that week. I was in Switzerland on a tour bus, and I did four versions of 'Welcome to New York,' one of which I liked personally more, but the thing about artists is they become very obsessed with the demo. She was in love with the demo so no matter how hard I fought, she brought it back to the demo, so really what you hear is what I did on the first day. And then the fine folks at Illumination played the entire song as the opening for Secret Life of Pets and that was the jewel on the crown because my kids obviously loved that movie."