Musician uses algorithm to generate every possible melody to prevent copyright lawsuits