HackerPoet / Composer

Generates video game music using neural networks.
https://youtu.be/UWxfnNXlVy8
1.13k stars 189 forks source link

the midi files don't seem to have any duration #12

Open jtn191 opened 5 years ago

jtn191 commented 5 years ago

the notes in the midi files don't seem to have any duration or length, as seen in a midi editor. they do seem to have "starts" or pulses

HackerPoet commented 5 years ago

Is this possibly caused by using Python 3 instead of 2?

BrandonDyer64 commented 5 years ago

I don't think so. I ran the scripts with Python 2 and saw the same results.

jtn191 commented 5 years ago

@HackerPoet my guess is it would have something to do with how the midi files are generated. I know more about midi functionally than the technical "programmerly" aspects of it but my guess is that your program currently generates midi data--but without the duration data. Whatever you use to test the midi file (like Windows Media player? that's what I first reach for) might "round up" going "I have the start of these notes, I'll just pretend they're 16th notes, 8th notes or whatever". In Reaper, they are inaudible (and invisible unless highlighted) and in something like https://onlinesequencer.net/import they play but they're invisible unless highlighted iirc.

One other thing is duration could be an element that is initially analyzed in the model?

I have some super beginner questions about how I would go about training neural nets with my own data. Can I email you?

HackerPoet commented 5 years ago

Ah I see what you mean now. Yeah the notes have zero duration when saved to midi, it was just easier to code that way and I didn't know there were midi players/editors that had a problem with it.

Unfortunately, this project is currently not maintained. The GitHub is just here to share the code, and I don't have time to solve issues or add features. However, I may be able to review and merge simple pull requests.