Some computer generated melodies…

Here are five melodies my computer program wrote today, all in one MP3 file:

Examples of computer generated melodies

A few things to note:

1. The program is still working within limitations of only being able to compose in C major, only being able to use the basic triads, only being able to compose 8-bar melodies in 4/4 time. I will, of course, work to remove those limitations, but there is still more work to do on the algorithm first.

2. As you can hear, some of the melodies don’t sound that great. I think they technically work (they don’t sound like random atonal garbage), but they’re not quite memorable. I really like the first one though, and the second and third one have some interesting parts. Anyway, my goal with the program isn’t to get it to output something beautiful every single time; the point is to give the user melodic ideas. As the algorithm is now working pretty fast, the user should be able to have the program generate 100 or so melodies at a time, then he can browse through the results and find whatever strikes his fancy.

3. The five melodies in that MP3 are based on melodic knowledge the program learned from just two melodies. So if they sound kinda similar now and then, that’s why. But still, it amazes me how much musical variety can emerge from such a small set of knowledge. I look forward to building the program’s knowledge database; I can’t wait to see what sort of stuff it might produce with knowledge from several hundred melodies or so.

The Lost Gate by Orson Scott Card


Finally finished reading a book, woohoo!  It was on hold at the library, so I had to hurry up.  ‘Twas The Lost Gate by Orson Scott Card, one of my favourite writers.  ‘Twas a fun read.  Not quite Ender’s Game, but hard to put down nonetheless.  Makes you want to be a gatemage.  Makes you look forward to Portal 2, coming out soon!  Now I look forward to the sequels, for this seems to be the first book of a trilogy or something.

There are two quotes I liked.  First, from page 106:

Besides, it just felt . . . wrong.  Inelegant, perhaps, as Auntie Tweng used to say of kludgy solutions to math or programming problems.  “Yes, it works,” she would say, “but it’s not elegant.  Truth is simple and elegant.  That’s how you know it when you see it.”

Those last two sentences.  “Truth is simple and elegant.  That’s how you know it when you see it.”  Almost Occam’s razor-ish.  I’m not sure if it’s true (for it can’t explain the truth of itself), but I like the idea.

Also, in the afterword, on page 382:

I tell my students in my writing classes that suspense comes, not from knowing almost nothing, but from knowing almost everything and caring very much about the small part still unknown.

Great little writing tidbit.  Mystery can still come from not knowing much, but it’s not suspenseful (or nearly as interesting) until the focus is on that one last answer, that one final piece to the puzzle.  Search your feelings, you know it to be true.  (Plus, it’s simple and elegant.)

Oh, it’s also a fun book if you know your mythology.  Which I don’t, but I’m just assuming.

Melody project: the great reprogramming – update 3

I haven’t gotten much done today because I slept all day because I was up late reading because I have library books that are due soon because they are on hold and I can’t renew them and I want to finish them or at least get as far as I can in them before I have to return them because that’s just the way it is, OK?

Anyway, regarding the melody project… I have created a small set of symbolic knowledge with which to experiment with. I am now continuing to work on reprogramming and restructuring the main melody composition algorithm to make use of the knowledge in its new form. That’s pretty much it. An in-depth look at my meaning of this is strictly confidential.

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

Melody project: the great reprogramming – update 2

Yesterday I successfully designed, programmed, and tested a melodic information symbology, making melodic information easier to input. This should also save the program time and memory, as it will only have to decode the string of symbols if and when it needs them, and when it no longer needs them it can delete them again. The only caveat is that the symbol strings themselves are always held in memory. I’ll leave it like that for now; if I have memory problems in the future, this issue may need more attention.

My goals now are to use this symbology to create a set of knowledge for the program’s knowledge base for further algorithmic reprogramming, restructuring, and testing. An in-depth look at my meaning of this is strictly confidential.

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

Melody project: the great reprogramming – update 1

I’m working on reprogramming my melody generator from scratch in an attempt to make it more organized and more efficient. A higher degree of modulation should also make the programming of future feature additions easier. My overall goals are as follows:

1 – Reprogram the algorithm and get it output easier-to-interpret text
2 – Get the program to output MIDI files
3 – Begin adding other features

For now, work continues on goal #1. I’m trying to program a symbology, so that the program can store a bunch of melodic information in the form of encoded strings. It can then decode these strings when and if it needs to. This is in an attempt to save both time and memory, and to make adding future features much easier for the programmer. An in-depth look at my meaning of this is strictly confidential.

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

Animation Mentor class 3 almost over… what next?

My final week of Animation Mentor Semester 3 is wrapping up! I turned in my last assignment on Sunday; here’s what it looked like through the four weeks I worked on it:

There are still some problems with it, but I think I’m getting better. That’s 3 semesters down and 3 to go! I’m halfway done!

As I’ve stated before, I’m taking a leave of absence for 12 weeks instead of jumping right into semester 4. I’m going to be working as hard as I can on my automatic melody generator, so I’ll keep this blog updated with my progress on that. My current goal is to create it as an Android app. Other platforms may follow, depending on its success or lack thereof.

I also started a new project: I’m creating a Grand Theory of Human Intelligence (or GTOHI), not only detailing the basic principles of what intelligence is and how it works, but trying to simulate the results of human intelligence with basic artificiall intelligence programs. This project might fall flat on its face, but I have some ideas that I think are definitely worth exploring. There’s a lot of research to do, so I probably won’t have a product based on my findings until I’m 70 or 80 years old… or dead.

A poem! Woohoo!

Here’s a poem I wrote a few days ago as I thought about the coming Singularity… I call it:


Remember us, the nameless ones,
Who used to have a face.
Who built and worked and wondered
And then left without a trace.

Remember us, the troddened ones,
Who suffered pain and fear,
And questioned all existence
For the sake of one child’s tear.

Remember us, the stupid ones,
Who thought of nothing new
Because just living was a chore
That took all day to do.

Remember us, the ugly ones,
Who were not bred the gene.
Who dreamt the feel of symmetry
And dreamt of being seen.

Remember us, the wrinkled ones,
Who so young met death.
Whose love and faith could never fade
As could our needed breath.

Remember us in sun and moon,
And see us in the stars.
We never thought the world was yours,
We thought that it was ours.


Oh, and here’s another short one from a couple years ago… still a few words I’m not sure about, but whatever… ’twas written for a fantasy story I’ll never write…


You can’t imagine what they imagine,
Can’t see the things they see.
Your worlds are both too far apart,
There’s too much in between.

But someday you will know, my son,
You’ll learn to tread the wall.
There are things you cannot dream
And you will see them all.