Many of us will accumulate vast libraries of digital books and music over the course of our lifetimes. But when we die, our collections of words and music may expire with us.

Someone who owned 10,000 hardcover books and the same number of vinyl records could bequeath them to descendants, but legal experts say passing on iTunes and Kindle libraries would be much more complicated.

And one’s heirs stand to lose huge sums of money. “I find it hard to imagine a situation where a family would be OK with losing a collection of 10,000 books and songs,” says Evan Carroll, co-author of “Your Digital Afterlife.” “Legally dividing one account among several heirs would also be extremely difficult.”

Part of the problem is that with digital content, one doesn’t have the same rights as with print books and CDs. Customers own a license to use the digital files — but they don’t actually own them.

Apple AAPL, -0.75% and Amazon.com AMZN, -0.91% grant “nontransferable” rights to use content, so if you buy the complete works of the Beatles on iTunes, you cannot give the “White Album” to your son and “Abbey Road” to your daughter.

According to Amazon’s terms of use, “You do not acquire any ownership rights in the software or music content.” Apple limits the use of digital files to Apple devices used by the account holder.

“That account is an asset and something of value,” says Deirdre R. Wheatley-Liss, an estate-planning attorney at Fein, Such, Kahn & Shepard in Parsippany, N.J.

But can it be passed on to one’s heirs?

Most digital content exists in a legal black hole. “The law is light years away from catching up with the types of assets we have in the 21st Century,” says Wheatley-Liss. In recent years, Connecticut, Rhode Island, Indiana, Oklahoma and Idaho passed laws to allow executors and relatives access to email and social networking accounts of those who’ve died, but the regulations don’t cover digital files purchased.

Apple and Amazon did not respond to requests for comment.

'Common sense' on patents

There are still few legal and practical ways to inherit e-books and digital music, experts say. And at least one lawyer has a plan to capitalize on what may become be a burgeoning market. David Goldman, a lawyer in Jacksonville, says he will next month launch software, DapTrust, to help estate planners create a legal trust for their clients’ online accounts that hold music, e-books and movies. “With traditional estate planning and wills, there’s no way to give the right to someone to access this kind of information after you’re gone,” he says.

Here’s how it works: Goldman will sell his software for $150 directly to estate planners to store and manage digital accounts and passwords. And, while there are other online safe-deposit boxes like AssetLock and ExecutorSource that already do that, Goldman says his software contains instructions to create a legal trust for accounts. “Having access to digital content and having the legal right to use it are two totally different things,” he says.

The simpler alternative is to just use your loved one’s devices and accounts after they’re gone — as long as you have the right passwords.

Chester Jankowski, a New York-based technology consultant, says he’d look for a way to get around the licensing code written into his 15,000 digital files. “Anyone who was tech-savvy could probably find a way to transfer those files onto their computer — without ending up in Guantanamo,” he says. But experts say there should be an easier solution, and a way such content can be transferred to another’s account or divided between several people.“We need to reform and update intellectual-property law,” says Dazza Greenwood, lecturer and researcher at Massachusetts Institute of Technology’s Media Lab.

Technology pros say the need for such reform is only going to become more pressing. “A significant portion of our assets is now digital,” Carroll says. U.S. consumers spend nearly $30 on e-books and MP3 files every month, or $360 a year, according to e-commerce company Bango. Apple alone has sold 300 million iPods and 84 million iPads since their launches. Amazon doesn’t release sales figures for the Kindle Fire, but analysts estimate it has nearly a quarter of the U.S. tablet market.