Stuff I’m doing

You might be wondering: “gee whiz, I wonder what exactly Sean is up to these days?” If so, I will tell you in this post that I am writing right now.

I’m in week 10 of class 3 of Animation Mentor. It continues to go very well; I’ve learned a ton of stuff this semester. I’ve gotten better at managing my time, but I still find myself pulling very late-nighters or all-nighters the night before assignments are due. But at least I’m not feeling the pressure like I was during the previous classes. I still wish my (almost full-time) part-time job didn’t take up so much time, but I need the $$$ for Animation Mentor tuition (and paying off college loans).

I requested a Leave of Absence for the Animation Mentor Spring 2011 term because I want to watch the trees blossom. But mostly because I want to dedicate as much time as I can to researching and developing my melody generator. My main goal would be to be create and sell an Android app; that has the potential to make some $$$, and Android is Java-based and I’m developing my algorithms in Java anyway, so it would be mostly a matter of getting an Android GUI to work, and figuring out how Android can handle MIDI files (I know it can play them, but can it create them?). I’m not sure if this is something I could accomplish in just 12 weeks, but it’s worth a shot.

Other than that, I’m reading The Lost Gate by Orson Scott Card (the first non-Ender novel from him I’ve read), which is quite fun, along with a number of non-fiction books (I tend to just read whatever chapters interest me, because of my limited time).

I’m also continuing to plan out my fantasy novel and working on a couple of new short stories, one likely to be titled The Boy in the Sword (which I’m almost done writing) and the other currently untitled.

Oh, and I rarely preorder stuff on Amazon, but I had to preorder this: The Lord of the Rings: The Motion Picture Trilogy (Extended Edition) [Blu-ray]. Really looking forward to it.

Melody generator update…

My obsession with programming an automatic melody generator (that actually gives good results, unlike just about every other melody generator out there) continues. Again, the program works by analyzing existing melodies and “learning” from them. In my 2008 version, the program analyzed the given melodies while it composed new ones from them. Now the program stores its “knowledge” so it doesn’t have to analyze a melody more than once. Of course, there’s still the problem of getting the program to find the right sort of knowledge and to use it appropriately. But what I have is coming up with some interesting results. I’ll post more later, but here’s one melody the program wrote early this morning: MelodyExperiment2.mid (melody stated and repeated ad nauseam in pizzicato… the output of the program just gives chords and melody numbers; the tempo, the instrument choice, and alberti bass were added by me)

EDIT: By the way, obviously some of the melodies it outputs sound much worse than that. That’s one of the better ones…

Unfortunately there are still a lot of limits in the program that need to be dealt with:

1. It can still only compose an 8-bar melody in 4/4 time. I need to give it a wider range of time signatures (3/4, 2/4, and 6/8 at the very least), and I need to let it be able to compose 16 and 32 bar melodies, and “extended” melodies, such as a 10-bar melody which is really just an 8-bar melody that takes two extra bars to resolve. Ideally the user could choose the bar length and time signature.

2. It can only compose in C major. That might seem trivial; can’t the program just transpose the melody up and down afterward generating it? Unfortunately that can lead to notes that are way too high or way too low. To keep the melody within a certain range, we’ll have to deal with this.

3. It can only compose diatonic melodies. It can not yet shift into other keys or limit itself to a certain scale. Fortunately I don’t think this would be very hard functionality to add; it’s just a matter of giving the program more options, and making sure it uses them appropriately.

4. It can only compose within a certain range of notes. Which is fine, but ideally the user could decide what range is allowed, and what interval leaps are allowed.

5. There are limits on chord progressions. It must always start and end with the I chord. This makes it sound nice and complete, but it should have the ability to start on a different chord or something. It also sometimes comes up with some pretty odd chord progressions that are technically fine, but just odd. It would be interesting to program an “inventive” variable, telling the program how much it should do whatever it wants with the chord progression (within reason), and how much it should adhere to what it “knows.” Also, it currently only recognizes the main triads; it ignores major 7ths, major 9ths, sustains, etc. I’m not sure that matters much; a listener could always change that himself if he wants to use the melody for something, so if I do add that feature, it will probably be the last thing I concern myself with.

And then matters of practicality:

6. It outputs numbers in a text file which then have to be laboriously converted manually into a MIDI file, which takes too long. It should be able to output a MIDI file (or files) by itself, or at least a much easier to read text file.

7. It’s programmed in Java. To get it to work on the Internet (if that’s what I decide I want), it will probably have to be converted to PHP, and we better make sure it’s not too computationally heavy for that. (I don’t think it would be.)

That’s all! Enjoy that beautiful melody! Look out for more!

Computer, write a melody in G major, please…

I’ve been finding it hard to focus on my animation studies this week. I had a little musical epiphany, and my mind is now once again obsessed with working on my book on writing melodies and the “melody generator” computer program to go with it. The program is now capable of outputting some pretty nice stuff, a huge improvement compared to the 2008 version. But you’ll just have to take my word for it because I’m not quite ready to share samples just yet. But soon, I hope. I also think I’m pretty close to getting it to generate complete songs (in melody + chords format, not entire instrumental arrangements), at least algorithm-wise; then I still have to program it. I’m tempted to expand the topic of the book from melody composition to musical composition in general; after all, couldn’t one define any polyphonic piece as just a bunch of melodies played together? It’s the natural extension of my work, so why not just go for it? But who knows how long that would take…

Anyway, I’m extremely excited, and I’m pretty confident that within this decade, perhaps even within the next few years, we’ll have some great computer music generating programs (from me or from someone else) that will provide us with a lot of inspiration. I’m confident because I have it now. In baby form, at least.

But I’m probably getting way ahead of myself. “Don’t get excited.” It’s in the artist’s creed. Gah, it’s hard…

I’m not really sure why I’m posting this. I don’t have anything useful or interesting to share yet. I guess I just wanted to let out my excitement.

Oh, I’ve also been composing endless melodies. When you’re writing a book on the subject, the ideas just pour from the mind. I suppose that’s part of what’s fueling my obsession… melodies, melodies everywhere…

Paul Williams writes article about nothing

Does music need “professional” musicians?

Paul Williams, the songwriter and current president of ASCAP, recently wrote this article.  It’s pretty short, but one thing is missing from it: a point.  The only point I can see is that “piracy is bad.”  Well, duh.

Anyway, I’m going to go off on a little tangent here.  I think at some point in the future (perhaps still hundreds of years away) people will no longer be able to make a living off of writing music.  One reason is quite simple: computers will write music.  People won’t need to.  People will continue to write music, though, because it’s fun.  People being able to make a living off of writing music is, from what I can tell, a pretty recent phenomenon in the history of human existence.  (As are the sorts of economies we have now, for that matter.)  The creation of beautiful music doesn’t depend on people making a living off of it.  The reason people defend and fight for being able to make a living off of it is because it’s a dream come true! Being able to make a living off of doing something you love is just fantastic.  (At least, I imagine; it still hasn’t happened to me yet, but I’m working on it!)

So, I’ll whole-heartedly agree that piracy is bad, and I’ll defend protocols and systems that try to counter it (as long as they don’t get in the way of what us legitimate non-pirates want to do, which they do too often), but I won’t do this in defense of the music.  The music will always exist.  Piracy is bad for moral reasons, not monetary reasons.  Well, it is bad for monetary reasons, but I’m not against it just because I want more $$$$, like perhaps a number of other composers and publishers (and PROs?).

My automatic music generator

Recently, I’ve been continuing work on my computer program that will, if my daydreams come true, write music.  OK, it’s still such a difficult task that I probably won’t live to see (or hear) it work, but it’s still a puzzling challenge that obsesses me sometimes.  Anyway, I spent the day thinking about new algorithms to try out.  To help me do this, I began writing a semi-fictional dialogue.  In it, I appear as a character and I meet with William Wobbler, a character from my recently finished screenplay The Melody Box.  The two of us then contemplate how to create a computer program that can write music.  It’s a lot of fun to write, and if I ever succeed at my goal of creating this program and if it makes me insanely rich (a dream that motivates me), then I will someday release it to the public so that everyone can learn how it was done, and how my thought process worked while creating it.  Or if I die having failed (which is more likely), I can leave it for generations after me to perhaps have something to work with (though the possibility remains that it is and will forever be useless garbage, but, I don’t know, somebody out there might read it).

I guess that’s it.  I have to go back to work tomorrow.  Snow got me an entire week off, but the vacation’s over now!  (The week off did give me a torturous glimpse of what life might be like if I could ever make enough money writing or composing to work from home.  I risk becoming a hermit then, but it’s still something I cannot stop myself from desiring.)

Java programming blather

I spent the day doing some more Java programming on my melody project. I’m attempting to add some new features (with different algorithms) to the program so that it will work with music of any length, and with multiple melodic lines, thus different instruments and the emerging harmonies. But of course to say it is difficult is an understatement. The algorithms work; that is, they run. But they go far too slowly and take up a lot of memory. I think I can fix the memory problem by greatly reducing redundancy with some algorithmic improvements, but I’m still not sure how I can get it to go any faster; the algorithms simply have to do too much calculating. So I’ll probably have to abandon the algorithms altogether and try coming up with new ones. Since the program is going so slow now, I can’t get it to output anything but gibberish, and thus can’t really tweak the current algorithms to improve them. Anyway, if I can ever get it to work and create musical output that actually sounds musical, the musical mixing possibilities would be pretty cool. It’s just too bad computers aren’t faster and don’t have more memory; I could sure use it.

If I do get my musical-mixer-generator thing to work as well as I do in my daydreams, I can’t quite decide what I’ll do with it. Part of me would like to sell it and make $$$ off of it, but another part of me is quite tempted to keep the software a secret and use it to create hundreds of thousands of musical pieces under a pseudonym and not tell anybody my secret power. Both possibilities are still distant daydreams, of course, but I guess I’d probably sell it, since that seems more honest, and would probably result in a lot more $$$. But the other choice remains a temptation, and if I choose that road, I won’t blog about it, bwahahahaha!!

Working

I’ve been working a bit more on my melody mixer creator thing; I’m working on expanding its abilities so that it will be compatible with any size melody in any time signature. I think I’ve finished planning out the necessary algorithms, now just programming awaits. And there will be quite a lot that will need to be reprogrammed, as there were quite a few shortcuts I was able to take when programming it to work with just one size melody. I’ve also been writing a book on my melody mixing algorithmic methods. It’s obviously not very long right now, but as I continue to program and explore this area of computer generated music it will hopefully chronicle all my explorations and algorithmic design decisions. It will probably be finished in 10 or 20 years. Or never.

Haven’t been up to much else lately… getting a bunch of hours at my part-time job, which is good for the money, but when I come home I tend to sit in front of the TV, surf the net, or play The Sims 3, which are all fun, but not very productive.  I can’t say I really want a full-time job…

Blagh … and java programming

I’m tired.  My sleep schedule is just terrible.  That holiday weekend wasn’t good for me.

I don’t have much to say right now anyway.  I’m not sure I’ll have my first album ready by August anymore; my interests have once again shifted to something else.  Over the past week, I’ve been working on my melody project again, something I started quite a few months ago (August 2008), but it’s just been sitting there for a while.  I made some minor improvements to the algorithm (to be more specific, I took the recursive inverse directional beta loops and strongly conjoined them with the dysfunctional relative note sequence data curves coupled with reticulating splines, and programmed in the consciousness of a monkey. (More seriously, I changed the algorithm so that the output melody would be guaranteed to not be any of the input melodies, which had been a threat in the previous version if you were mixing only a few melodies that didn’t sound very much alike.  With the modified algorithm, the program forces the melodies you’re using to mix.  Overall, I think it gives better results, but it depends on the melodies you input and how similar they already sound (and your own melodic tastes, of course).)), and I also made this spiffy javascript page which aids in the formatting of the text files the program uses as input.

What I’d like to do this summer is release the melody project in it’s current form so that others can fool around with it.  I’m hoping to turn it into a Java applet that will run on a web page.  It shouldn’t be too hard; it’s already Java after all.  I mainly need to program a good input-output system, since it can’t so easily load and save text files from a visitor’s computer, since it will be on a web page.  I can load the text files from my server easily enough, then I suppose the output could just be text in a text box.  That would be the easiest, and will probably be what I end up doing to start off with.  But that is a pretty annoying burden for the site visitors; they’ll have to interpret the output text by themselves (it’s not really hard, it’s just extra labor).  So I’ll have to program a text-to-MIDI converter so visitors can easily and quickly hear what the output melodies sound like.  And then there are a thousand other improvements I could blather on and on about, but those are my first ambitions.

So that’s what I’ve been working on…

Oh, and remember to vote for a note!  (That whole experiment is going to take forever…)