Musicians Algorithmically Generate Every Possible Melody, Release Them to Public Domain

Damien Riehl and Noah Rubin generated and saved every possible melody to a hard drive, then turned it back around to the commons.
Person playing guitar.
Getty Images

Two programmer-musicians wrote every possible MIDI melody in existence to a hard drive, copyrighted the whole thing, and then released it all to the public in an attempt to stop musicians from getting sued.

Programmer, musician, and copyright attorney Damien Riehl, along with fellow musician/programmer Noah Rubin, sought to stop copyright lawsuits that they believe stifle the creative freedom of artists.


Often in copyright cases for song melodies, if the artist being sued for infringement could have possibly had access to the music they're accused of copying—even if it was something they listened to once—they can be accused of "subconsciously" infringing on the original content. One of the most notorious examples of this is Tom Petty's claim that Sam Smith's “Stay With Me” sounded too close to Petty's “I Won’t Back Down." Smith eventually had to give Petty co-writing credits on their own chart-topping song, which entitled Petty to royalties.

Defending a case like that in court can cost millions of dollars in legal fees, and the outcome is never assured. Riehl and Rubin hope that by releasing the melodies publicly, they'll prevent a lot of these cases from standing a chance in court.

In a recent talk about the project, Riehl explained that to get their melody database, they algorithmically determined every melody contained within a single octave.

To determine the finite nature of melodies, Riehl and Rubin developed an algorithm that recorded every possible 8-note, 12-beat melody combo. This used the same basic tactic some hackers use to guess passwords: Churning through every possible combination of notes until none remained. Riehl says this algorithm works at a rate of 300,000 melodies per second.

Once a work is committed to a tangible format, it's considered copyrighted. And in MIDI format, notes are just numbers.


"Under copyright law, numbers are facts, and under copyright law, facts either have thin copyright, almost no copyright, or no copyright at all," Riehl explained in the talk. "So maybe if these numbers have existed since the beginning of time and we're just plucking them out, maybe melodies are just math, which is just facts, which is not copyrightable."

All of the melodies they've generated, as well as the code for the algorithm that generated them, are available as open-source materials on Github and the datasets are on Internet Archive.

According to the project’s website, Rubin and Riehl released these melodies using a Creative Commons Zero license, which means they have “no rights reserved.” Functionally, this means they are similar to public domain works, though copyright lawyers disagree on whether this puts them truly in the public domain. A work is considered in the “public domain” if it’s a government work or if it has had its copyright expire, which happens many decades after a work’s release. The Creative Commons Zero license is the closest an artist can get to putting a work in the public domain without having the copyright actively expire (for more about this, Creative Commons and Motherboard have explainers.)

Whether this tactic actually works in court remains to be seen. Copyright law is complicated and often nonsensical. It’s difficult to say whether a court would consider Riehl to be the author of a melody that is made popular by another artist. In any case, he’s optimistic, and it’s a cool project.

"For just the melody alone, maybe those cases go away," Riehl said. "Maybe they're dismissed."