Programmers generate every possible melody in MIDI to prevent lawsuits

Tired of seeing musicians sued for their work, Damien Riehl and Noah Rubin looked for a solution.

When you purchase through affiliate links on, you may contribute to our site through commissions. Learn more
MIDI Melody case

Damien Riehl, musician, programmer and copyright attorney, teamed up with programmer colleague, Noah Rubin, to find a way to stop musicians getting sued for their music.

The solution was to algorithmically generate every single possible melody in existence and write them into MIDI files. They then copyrighted them and stored them on a hard drive before releasing it out to the public, NME reports.

Once written to MIDI, it can be considered a tangible format, and therefore copyrighted. However, Rubin and Riehl have released these melodies under the Creative Commons Zero license, meaning they have ‘no rights reserved’.

Riehl noticed a disconcerting amount of popular musicians facing lawsuits for their music sharing a likeness with a previously released track. A popular example recently was that of Sam Smith and Tom Petty, after Petty’s estate argued that Smith’s Stay With Me shared a striking likeness to Petty’s I Won’t Back Down. While there were no hard feelings, Smith awarded royalties to Petty.

But, in the Smith and Petty case, it was noted that the likeness was of complete coincidence, with no ill intention of imitating the catchy chorus. This is where Riehl saw an unjust accusation, and in his TED Talk (below), he points out how musicians can be punished for subconsciously thinking of a melody before writing their own.

To complete the project, Riehl and Rubin created an algorithm capable of recording every possible 8-note, 12-beat melody combo. Riehl claims the algorithm works at a rate of 300,000 melodies per second.

“The copyright system is broken and it needs updating”, Riehl explained in his TED Talk. “Under copyright law, numbers are facts, and under copyright law, facts either have thin copyright, almost no copyright, or no copyright at all”.

“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.”

Although a potentially great tactic, the solution is yet to be seen to work in court.

All of the generated melodies, as well as the algorithm’s original code that generated them, are available as open-source materials on Github.


Get the latest news, reviews and tutorials to your inbox.

Join Our Mailing List & Get Exclusive DealsSign Up Now

The world’s leading media brand at the intersection of music and technology.

© 2024 MusicTech is part of NME Networks.