Ghadjeres / DeepBach

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

'Chord' object has no attribute 'pitch' #4

Closed King-of-Limbs closed 7 years ago

King-of-Limbs commented 7 years ago

I was able to process the included "God Save the Queen" sample (by running python3 deepBach.py -l 100). But when I try to run DeepBach with another midi (from musescore) I get an: AttributeError: 'Chord' object has no attribute 'pitch'

What's the problem with those?

And thanks for the great work on this one btw. :)

Ghadjeres commented 7 years ago

Your midi file must be monophonic, otherwise you get a Chord object instead of a Note object when parsing your file

King-of-Limbs commented 7 years ago

I see! I thought that God save the Queen midi in the repository to be the source not the processed file (by only looking on but not listening to it) and assumed polyphonic midis would work fine. Thanks monophonic ones work.