4

I am a computer science student working on my senior project. My project is to train an artificial neural network to generate music. I have a minimal knowledge of music theory (I took a music theory course in high school, and played a couple instruments as a child).

My algorithm uses MIDI files as the input, and while I plan to train on some classical pieces, I would also like to test training on simple files that are specifically made to represent rules in music theory (basic chords, intervals, etc.).

Does anyone know of a place to get MIDI files like that? Alternatively, are there any simple songs that exemplify theory more than others?

4

I would also like to test training on simple files that are specifically made to represent rules in music theory (basic chords, intervals, etc.)

Chords and intervals aren't really musical 'rules', they're (a way of describing) structures that can exist independently of any rules for their generation or analysis. Of course any particular terminology may have its own rules, but that is conceptually different to musical rules governing 'what sounds are actually played', which sounds like ultimately what you care about.

Anyway, if you want to make some simple midi files consisting of (say) just one chord for test purposes, those should be trivial to generate if you can't find them online.

Alternatively, are there any simple songs that exemplify theory more than others?

At the level of fairly simple rules, you will find that each song exemplifies rules relating to that particular style of music. So if you feed in some Latin jazz pieces, you'll find those tend to follow a certain set of rules, while a set of Baroque organ pieces will have a different set of tendencies (i.e. some of their 'rules' would be different). What you'd probably want to do would be to feed the system with the kind of music that you want it to produce.

Of course it's possible that there are deeper rules at a greater level of abstraction that hold for a wide range of genres. These would probably be discoverable by feeding in a range of different styles of works. How a neural net would cope with that would be interesting - would it end up 'seeing' music as divided into genres, with groups of rules that can be used together?

It might be an interesting experiment to train your net on simpler pieces (nursery rhymes?) before giving it more complex pieces, and compare that approach with throwing more complex stuff at it from the start.

  • That was what I was thinking, I was just having trouble finding simple midi files, but I think nursery rhymes may be exactly what I was looking for. – McAllister Aug 29 '16 at 18:01
  • @McAllister you might consider listening to only certain channels of the midi file if the arrangements are very busy. – topo morto Aug 29 '16 at 21:06
1

well, to answer your main question, just make those midi files yourself. You're going to be building a system to load a bunch of midi files, magically extract rules from them, and create a variety of midi file outputs I'm (totally) guessing?

you should have no problem making a midi file if this is a task you're going to code up. There are already lots of programs to type in music and output a midi file even if you don't use your own code.

but, to NOT answer your question...

I mean, if I were your professor or whatever, I'd tell you that you're trying to build magic. Your specs are way too sketchy. Trying to make a computer program do something that you don't know how to do is basically trying to create gold out of thin air... You may find a way to do it, but probably not by the end of the semester. I'd say narrow your specs way down to something you totally know.

Maybe somethin like load a set of midi files and extract JUST one chord per bar using the best chord recog code you can find. Only look for major n minor n throw the rest of it out. maybe pick out the top notes for a melody. don't do anything more than that or you're back to building magic. Computer programmers may be god like. But we can't create magic. That's up to actual people who spend their lives learning how to compose.

  • 1
    "Gold out of thin air" is the kind of problem people throw neural nets at! – topo morto Aug 21 '16 at 22:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.