I'm not sure if this discussion is still relevant in the future ?
The problem with copyright is: how can something that is available in limited quantity be appropriated in any way?

In the meantime, 2 Americans, Damien Riehl and Noah Rubin, have published most of the melodies under a Creative Commons Zero license.
http://allthemusic.info/faqs/

All melody possibilities are calculated and published by an algorithm. The project is still ongoing, as far as I know.

Peter Burke did something similar only with chord progressions.
https://peterburk.github.io/chordProgressions/index.html

The download is a few gb of midis wink