"If music be the food of love, play on." -- William Shakespeare, Twelfth Night.

Music lovers, rejoice, there's still a spot in your portfolio for music-related companies, although it doesn't always seem that way. The music industry appears to always be in the midst of transition, whether it be from format (records to 8-tracks to cassettes to CDs to digital download) or retailers (mom-and-pop record stores to record-only chains to megaretailers to online retailers), but music has always had a place in our society and will continue to do so.

So whether you dig Coltrane, rock out to Metallica, or enjoy a nice beat from Dr. Dre (more on him later), here are three solid companies taking advantage of our need to jam.

Pandora: A leader in the latest format
While many audiophiles and artists have shunned the streaming-music format, many more have flocked to the new outlet. And when it comes to streaming music, there's a clear leader: Pandora Media (NYSE:P). For perspective, the company reported roughly 9% of the entire U.S. radio share (a figure that includes terrestrial radio) in its fiscal second quarter, along with a massive 78% Internet-only radio share.

Source: Pandora Media

The company does face challenges, however. First and foremost, can Pandora continue to grow in the face of new competition from deep-pocked challengers such as Amazon.com, Google and Apple (NASDAQ:AAPL)? Second, Pandora faces questions regarding the scalability of its business model.

As is, Pandora isn't profitable: Pandora must balance ad-based and subscription-based revenue versus its main expense -- song royalty fees. In order to become profitable the company must either lower the fees it pays for content, increase its RPM (revenue per thousand listener hours) metric through more relevant ads, or a combination of the two.

Apple: A dual-format threat
Apple's Tim Cook stated at the company's iPhone 6 rollout on Tuesday that "Music runs deep in Apple's DNA; it runs through the core of all our products." He's right: the company reinvented music delivery with its iPod device and music shopping via the iTunes Store. In fact, the company is still the largest source of digital downloads: According to Billboard, Apple's iTunes store had a 41% digital market share in 2013.

Source: The Motley Fool

However, the company is looking to diversify beyond mere digital downloads. That's good, because the same Billboard article noted that digital downloads overall fell 5.7% in 2013. It appears streaming-based services are replacing downloads. Fortunately for investors, Apple got the memo. First, the company created iTunes Radio, a streaming-based service for iOS; then the company acquired streaming service Beats Music with the purchase of Beats Electronics from Jimmy Iovine and Andre Young, better known by his hip-hop pseudonym: Dr. Dre.

Dolby's Incredible Run
The last pick is one that even audiophiles can get behind: Dolby Laboratories (NYSE:DLB). Dolby has a long and storied history for those looking for better sound. The company specializes in audio encoding and noise reduction -- long story short, it makes music and film tracks more realistic. Although it's a semi-niche market, many home-theater shoppers are familiar with the words Dolby Digital.

Source: Dolby Labs

The company is changing its business model from licensing its technology to a more-streaming based model. The stock has had a renaissance of sorts by providing investors a 65% return over the last three years in addition to a special dividend of $4 in late 2012. Obviously there are risks in a company has run up so far, but this is still a good company for your watchlist.

Final thoughts
One of my favorite investors is Peter Lynch, who famously declared "buy what you know." Music lovers are probably familiar with these three companies, but they might not have considered them for their portfolio. In addition to providing solid returns, these companies are at the forefront of delivering or improving the music you listen to -- and nothing sounds better than that.

Jamal Carnette has no position in any stocks mentioned. The Motley Fool recommends Apple, Dolby Laboratories, and Pandora Media. The Motley Fool owns shares of Apple and Pandora Media. Try any of our Foolish newsletter services free for 30 days. We Fools may not all hold the same opinions, but we all believe that considering a diverse range of insights makes us better investors. The Motley Fool has a disclosure policy.