Tim Westergren came up with the idea for Pandora while working as a film composer. He shares the company's early struggles and how it found its footing. (Jhaan Elker/The Washington Post)

Tim Westergren and his team had spent years building a technological masterpiece — a software program that could learn your taste in music and recommend new songs you might like. It worked, too.

What wasn’t working was their business model. They had been trying to sell the software to companies in the music industry, such as record stores, but it wasn’t catching on. So in 2004, they tried something new. Using their algorithms and technology, they tinkered with a consumer-facing product that would help listeners create personalized, online radio stations.

“I remember the first time I saw the beta version of it, I thought, ‘Oh, we’re home,’ ” said Westergren, the founder of what would become Pandora Media, now a $3.6 billion company. “ ‘This is what we should have been doing all along.’ ”

Pandora is one of the world’s most popular music streaming services, with more than 250 million users in the United States, Australia and New Zealand who listen to billions of hours of music every year. Revenue was up to $920 million in 2014, with a gross profit of $412 million, up from $250 million in 2013.

In an interview, Westergren talked about the early years at what was then an ambitious but cash-strapped start-up in San Francisco. This has been edited for length and clarity.

Harrison: What were you doing before Pandora?

Westergren: I was a musician. I spent about 10 or 12 years after college trying to make a living as a performer. I’m a jazz-trained piano player, and then played in rock bands for a long time. I spent a while living out of a van and being part of this sea of working musicians. Then I spent four or five years writing music for films. So I had no formal business training, though I think being in a band is a lot like being in start-up, so I felt well-prepared for Pandora.

Harrison: How did you come up with the idea?

Westergren: It started when I was in bands. I spent years watching talented musicians try to find an audience and having no easy way to do that. As a film composer, you basically spend all your time trying to figure out what a director wants. So I would interview a film director and play songs for them, and I would use their feedback on those songs to glean their musical taste. It’s kind of like a musical Myers-Briggs interview. What I was really doing in my head was developing a taxonomy of their taste.

So musical discovery was in my head, and I read this news article one day and it crystallized. I thought, “Wow, if I could codify this whole profile thing, and marry it with math, the Web could be this great discovery tool.”

Harrison: How did you get started?

Westergren: I sat on it for a while. My then fiance — now wife — encouraged me to investigate it, and I shared the idea with a former college classmate, Jon Kraft, who had some entrepreneurial success. He said, “Hey, this is an interesting idea, why don’t we see if we can form a company.” In a matter of weeks it went from ‘we have an idea’ to ‘we have a business plan and we’re pitching it,’ to a couple months later and ‘we have a million and a half dollars of seed financing,’ and bam, we’re off to the races.

Harrison: When did you raise the money?

Westergren: We began the process in 2000, when the first big dot-com wave was cresting. It was about to fall off a cliff. We closed our Series A round two weeks before the end of the dot-com boom. It was just a matter of calling everybody we knew and asking if they knew people, networking, getting as many introductions as we could, then pitching and practicing the pitch and refining it, and then cobbling together enough people to put together a round.

Harrison: Where were you working?

Westergren: We were working out of our homes. When we raised the money, we rented a small studio apartment in South San Francisco with thick black shag carpeting and we got some tables and chairs and a white board. It was in a neighborhood called Potrero Hill, and it was probably a 20-by-10 room, looking out over the city. It had some nice views. We were joined shortly thereafter by Will Glazer, who was a friend of Jon’s. But when you start from scratch, you buy some computers, get a whiteboard, colored markers and just begin brainstorming sessions.

We had to figure out how to go from this informal taxonomy that I had in my brain to a product. So that’s what we did for a few years, and we brought in the smartest people we knew — mathematicians, computer scientists, musicians, musicologists. It was a big brainstorm.

Harrison: What were you looking for when you hired people?

Westergren: We certainly hired for skill, and one nice thing about Jon and Will was they had a good network of people, certainly on the software side. So they were able to cherry pick their favorite engineers. That part was pretty straightforward. On the music side, I ran into a fantastically talented fellow named Nolan Gasser, a musicologist. We hit it off.

And then we hired musicians who had good music theory chops to do the music analysis piece, and that team grew to about 70. We were looking for smart, talented people and folks looking for an adventure, because we didn’t know how this was going to go and we needed folks who had a strong stomach. It turns out we hired pretty tenacious people to help us through the hard times.

Harrison: The company wasn’t originally named Pandora, right?

Westergren: Right, our first name was Savage Beast Technologies. We were looking for a name that would make us stand out, because there were so many start-ups back then. We wanted something memorable. It’s an allusion to the lyrics “music hath charm, so soothe the savage breast,” (a line from William Congreve’s play “The Mourning Bride”) so there was a musical connection. Savage breast became Savage Beast. But we realized that probably was not the right name for a consumer-facing product.

Harrison: How did you pick Pandora?

Westergren: We all sort of threw ideas around. Our then-CEO, Joe Kennedy, had that idea, and when we heard that name, I think we all thought it was compelling. We liked the myth behind it. And it was an available URL, which was in and of itself a small miracle.

Harrison: What were the biggest challenges during those first years?

Westergren: We had the typical euphoria of raising money and then all of a sudden we had a company and that was exciting. But because the dot-com thing had passed and the investment community basically shut its doors to start-ups, and especially music start-ups, by the end of 2000 we could see that it was going to be hard for us to continue to finance the company.

We began asking our employees to defer an ever greater share of their salary beginning in 2001, and by the end of 2001, we weren’t paying our employees at all. So, about 50 or 55 people worked without getting paid for over two years during that time. Not all of them full-time, but a lot of them.

So there was one big challenge we faced: just a complete lack of financing. I racked up enormous credit card debt, personal debt, we borrowed money from everybody we knew. But we managed to hang on through 2003 and then raised our second round of financing in 2004.

Harrison: During those first few years, what was your revenue model?

Westergren: Our original idea was that we were going to build a technology that we would license out to other companies. So if you were a portal or a music retailer, you could take what we called the Music Genome Project and embed it in your Web site, and that would allow you to help your own consumers navigate catalogues. So we thought of ourselves as a B2B license technology. We chased after that business plan for years, really.

Really, what we were doing was looking for lily pads — someplace to keep us going, some partnership, some sign of progress that would help us raise our next round of financing. So we improvised all sorts of things.

Harrison: When did you pivot to the personalized music streaming service?

Westergren: In 2004, we raised our second financing round, and when we did that, we basically had the time to hit the pause button and say, “Okay, we have this Music Genome Project, this really big piece of intellectual property, but we haven’t figured out the business model yet. Let’s sit down and figure out what we want to do with this thing.” What we realized was that radio was a healthy part of the music industry, and lo and behold, this thing we had been building was perfectly suited to personalized playlists. So we peeled off a team of engineers and built what we called One Click Custom Radio.

Harrison: You didn’t stay small for long. What helped it take off?

Westergren: I think we had good timing, in the sense that broadband connectivity had gone mainstream. So you could listen to streaming audio, it was high quality and reliable, and that had become a mass consumer proposition. I think our product was just the right answer for a big need everybody had, which was “I want to hear music, the stuff I know and love, and discover things that I don’t know that I’ll love. And it needs to be easy.”

Harrison: So were you out advertising Pandora?

Westergren: Our growth for the first, gosh, five or six years was without a dime of marketing. Someone would use it and get so excited about it that they would send it to their friends. Again, I think it was the right product at the right time.

Harrison: Looking back, what was the biggest mistake you made?

Westergren: In those down years, I spent a lot of time trying to raise money. I pitched Pandora 348 times before we got our second round of financing. I think, in hindsight, I was pretty darn inefficient about that. A lot of that energy could have been better spent working on the business itself. It’s hard when you’re bankrupt and people are working for nothing to not be trying to look for money all the time, but I think I could have been much more efficient.

Harrison: What advice would you share with up-and-coming entrepreneurs?

Westergren: The best piece of advice I ever got was from my wife, which was “Don’t be self-conscious about being an entrepreneur.” I think most successful companies go through some kind of trial by fire. During that time, you’re borrowing — you’re borrowing people’s time, you’re borrowing goodwill, you’re borrowing money. You’re begging and borrowing. And that can begin to make you feel self-conscious, feel like you’re failing or that you’re a leech.

It takes a lot to stay committed, and I think a big part of that is accepting that, “Okay, I signed up for this. I’m building a company, and part of building a company is that I have to borrow.” I think that’s one of the big hurdles for entrepreneurs, to stick with it when you feel like you made a big mistake.

An earlier version of this story misidentified the neighborhood where Westergren’s start-up first set up shop after organizers moved out of their homes. This story has been updated.

Follow J.D. Harrison and On Small Business on Twitter.

Related: When we were small: Under Armour

Related: When we were small: Samuel Adams