Melody project – update 8

I was too tired to podcast yesterday; maybe I will today. But I’m still really tired due to my sleep schedule being awfully messed up, so who knows.

So… about my Android melody generator project… Part of me really wants to maximize profits for this thing, so, as mentioned before I am preparing to query producers about my screenplay yet again, this time mentioning that a music box that writes infinite melodies is a true possibility. (At least, to the extent that my program can do it.) Part of me also wants to focus on the algorithmic programming of this generator, and not worry so much about creating a user interface for it, for Android or anything else. So, if a movie deal doesn’t work out (it would be a miracle if it did), I’m seriously considering just hiring / outsourcing some other person or company to program the interface. It would be less work for me, and, with experience, they’d probably do a better job than me anyway. Problem is I’m not sure how much that would cost… anyway, the point is that an actual Android app is still at least months away, because I want to give the movie idea a chance, as to me that seems like the most lucrative (though least likely) path.

Stories and code and stuff and whatever

I hit a snag in my in-progress short story Through a Flame of Blue and Green. I realized one of my scenes is purely expositional. The information given in the scene is important for the story, but there’s no action, at least no action that’s important to the story. My natural response to this snag is to just stop writing the story until I can figure out a way to make the scene work. “But wait,” I say to myself, “just skip the scene! Come back to it later!” Of course! Why didn’t I think of that? “You just did!” I say to myself. Oh yeah! Both I and me are the same! So I’ll do that… later.

I’m still working on my Android melody generator program as well, but learning to program Android interfaces is boooooooooring, so progress is slow. However, a friend of mine recently gave me some extremely helpful feedback on the screenplay I wrote last year, The Melody Box, so I’ve been thinking about sending out another round of query letters, this time mentioning that a potential film could have the tie-in of software that does what the melody box in the screenplay does: generate melodies. Seems like both products would boost interest in each other. Not sure if that will truly interest anyone, but it’s worth a try, yes? Then I’ll get back to trying to learn how to program Android interfaces.

Other than that, I’ve been endlessly tweaking my outlines for Atarius Destroy This World. There are some tricky little issues here and there. But I’ll probably start writing on Saturday or next week. I’m kind of scared to start. I’ll have to keep saying to myself: “It’s just a rough draft. It’s allowed to be awful. Just get something down.”

Melody project: the great reprogramming – update 7

Whew, I can’t believe it’s Friday already. This week I’ve been mostly learning Android programming. I played around with some OpenGL graphics programming for Android a year and a half ago, but that experience is really no help for what I want to do now. So I’ve been going through a book on Android programming and playing around with some examples. There’s a lot to learn, so I’m not sure how long this will take, but I’ve only got 8 more weeks until my leave of absence from Animation Mentor ends, so I hope it won’t take too long… even though there are features I still want to add to my melody generator, I wouldn’t mind releasing it as it is (at a small cost) if I end up running out of time. So my priority now is programming an Android interface for the program.

And that is all I have to say at this moment.

Happy Easter!

Making a list… checking it once…

There are still plenty of features I’d like to give my melody generator eventually, but there are only certain features I think really need to be a part of my melody generator before I work on getting it out there for the world to play around with (in the form of an Android app). So here’s what I hope to work on before I try selling it:

1. – A couple minor changes to the main algorithm. (And fix that bug mentioned in the last post.)
2. – The ability to write 8-bar and 16-bar melodies.
3. – The ability to compose in any key.
4. – The ability to write a melody in major or minor.
5. – The ability to let the user decide the chord progression.
6. – The ability to let the user decide the ending note.
7. – The ability to let the user decide the tempo.
8. – The ability to write a melody in 2/4, 4/4, 3/4, or 6/8.
9. – Create an Android interface for all this.

Obviously there are other features I’d like my program to have eventually (more bar amount possibilities, more time signatures, key changes within a melody, etc.), but they can wait until the program is actually out there and on the market.

1,000 computer generated melodies…

For the past couple days, I’ve been working on getting my melody generation program to output MIDI files so I wouldn’t have to convert them manually from a text file, which takes an annoying amount of time. And… I’ve done it, haha! So now I can tell my program… hey, I want 1,000 melodies, go. And it spits it all out over the course of a couple minutes. So here are 1,000 short little MIDI files my program wrote just a few moments ago, in a zip file:

Zip file with 1000 computer generated melodies

Some notes:

1. – Again, the program is currently restricted to 8-bar melodies in 4/4 time, and must start with the I chord and end on the tonic.

2. – For the sake of a little variety, I set the tempo to be a random BPM between 80 and 150, and the key signature to be random between A major and D major (it starts in C major then just shifts all notes up or down).

3. – There is one small bug you might hear in some of the melodies: the bass notes are shifted offbeat. I’m workin’ on it. Fortunately it doesn’t seem to happen often.

Melody project: the great reprogramming – update 6

It’s week 3 of the great reprogramming of my upcoming melody generator! While I could continue tweaking the main algorithms endlessly, I’m at the point now where I feel I need to branch off into three directions:

1. I need to get the program to output MIDI files automatically so I don’t have to keep interpreting text files.

2. I need to get the program to write in different time signatures, different bar lengths, etc.

3. I need to figure out how exactly I’m gonna get this program on the Android.

My main goal for now is #1… being able to output MIDIs, I can then have the program write 100 melodies or so in a row, and then go through the results and pick out the melodies I like, and perhaps orchestrate them into a little piece or something…

Yet even more computer generated melodies…

Here are yet more computer generated melodies from my in-development automatic melody generator. I have made a lot of changes to the algorithm since I posted the last set of examples, but I’m not sure how much you can actually hear. Still more work to be done… anyway, here are 12 more melodies…

Computer generated melodies

Enjoy!

I’ll probably spend another week on the main algorithms, then I’ll start trying to add more diverse capabilities, like different time and key signatures.

More computer generated melodies! Woohoo!

Even though I’ve still got plenty of work to do on my automatic melody generator, it’s at the point now where I’m finding it quite addicting. Here are a bunch of melodies it came up with today (I think there are 12 altogether, each stated twice):

Computer generated melodies

Again, I don’t think the melodies sound super fantastic by themselves, but there are definitely some surprisingly good phrases, in my opinion.

Some notes:

1 – Again, it’s still limited to 8-bar melodies in 4/4 time in C major that begin and end on the I chord and can only use the basic triads. I still have algorithmic changes to make before I start expanding its abilities in this area. (For the audio above, I transposed it up a step to D major; sounded just a bit better to me.)

2 – The program is “creating” its own “melodic knowledge” and, as you might hear, the biggest problem this creates is that it likes to write large melodic leaps every now and then, which can sound funky. It didn’t do this before because it based its melodies on observations, and large melodic leaps like that would never (or rarely) be observed. So I’m going to have to hardwire an interval limit into the algorithm, perhaps letting the user set it.

3 – In the last two melodies, I gave the program the ability to use to 16th notes. You don’t hear them in the other melodies because the program wasn’t allowed to use them, but it’s an easy ability to give the program. Triplets, on the other hand, will be tricky… I guess I’ll have to figure out those at some point. Meh… that can come much later…

4 – The program outputs a text file with note values and accompanying chords; it doesn’t actually output the sound you hear in the MP3 … I had to manually enter the info into Overture 4 and use Garritan Personal Orchestra to create the actual sounds.

Melody project: the great reprogramming – update 5

As I stated yesterday, I’m now working on getting my program to create its own melodic knowledge rather than depend on melodic patterns found in pre-existing melodies. This turns out to be harder than I thought it would be — or at least more time consuming. I’m sure it’s possible, it will just take more programming. So I’m continuing to work on that. If I can’t get it done by the end of the week, I’ll give up on it for a while. In the end, perhaps I’ll use a combo of both methods.

Uh… yeah, that’s pretty much it for today.

Melody project: the great reprogramming – update 4

It’s week 2 of melody generator programming fun! Over the weekend, I was preparing to add more knowledge to my program’s melodic knowledge database, but then I thought: Wait a sec. If the knowledge in the knowledge database comes from patterns found in other melodies, why not create a knowledge database from the patterns found in that database? That way we’d only need a small database, and we can have the program create random melodic knowledge from it. Does that make sense? I have no idea if it will work or not, but I’ll give it a try, so that’s what I’ll be working on today: a melodic knowledge generator. I’ll try to have more musical examples by tonight or tomorrow night (or… later).

Thank you for reading update #4. I will keep the blog informed of any and all progress made on this revolutionary product.

In other news, I wrote some melodies over the weekend and started to hear a piece in my head, so I finally bought Garritan World Instruments, which I hope to use soon. I should be saving my money, but when you’re high on your own melodies playing through your mind, you sometimes just can’t help it. And Garritan products are at least priced awesomely for the amount of stuff you get.