Ghadjeres / DeepBach

code accompanying "DeepBach: a Steerable Model for Bach Chorales Generation" paper
MIT License
499 stars 130 forks source link

352 MIDI chorales after discarding voice divisions #62

Closed asdfang closed 4 years ago

asdfang commented 4 years ago

Hi!

How can I recreate the 352 MIDI chorales after discarding ones with voice divisions? Are these readily available online or from the code? If not, could you point me to the set of 389 MIDI files that you originally started with? I've been searching online and am not sure which one is the reliable one that you used, as some don't have fermata information in them.

Update: I grabbed MIDIs from this repo, and retrieved chorales indexed by Kalmus, as your DeepBach paper suggests. (Aside for anyone else trying to recreate this: in their files.txt, there are 419 non-empty entries for Kalmus catalog numbers, but of those 419, there are only 395 that have valid corresponding file names in the directory.) Of those 395, I parsed with music21.converter.parse and kept only those with 4 parts, and the number remaining was 352. I hope this isn't a coincidence!

Unfortunately, these still don't have fermata information, so I'm still wondering about your original process!

Thanks!

Ghadjeres commented 4 years ago

Hi, I used the chorales included in music21! Check music21.corpus.chorales https://web.mit.edu/music21/doc/moduleReference/moduleCorpusChorales.html

asdfang commented 4 years ago

Ah, thanks so much! From your code, it looks like you use the default music21.corpus.Iterator, which defaults to the Riemenschneider numbering system. So from those 371 chorales, I filtered for chorales who only had 4 music21.stream.Parts and resulted in 351. This is obviously the slightest difference from the 352 that you generate in your paper – not sure if I'm filtering the same way that you did (how to detect voice divisions?) or music21's corpus has been modified slightly.

Update: nevermind, I found the is_valid method in chorale_dataset.py. Thanks for your help!