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…)

Programming and melodies

[display_podcast]

Been a while, huh?  I haven’t been up to much besides programming.  I did compose a wee bit of music for my album, but my programming has been too much of an obsession lately for me to get much else done.  (I’m also way behind on my email, a couple hundred messages still unread.  Of course, most of it is spam or newsletters I don’t care about, but I’m sure there are some people I need to get back to in there too… and a bunch of YouTube comments I want to respond to eventually.)

Anyway, hopefully you won’t mind it if I just blather a bit on what I’ve been working on.  I started out writing a book on melody, though I didn’t get much writing done at all; I mostly just planned out how I was going to analyze melodies.  Then I started writing a computer program that could be fed melody information and spit out an “analysis” of that melody (“analysis” being mostly a collection of statistics).  It was my intention to use these statistics in my book, but then I decided to try reversing the process.  So I made my program take a melodic analysis and create a melody for it.  That in and of itself isn’t special, it just gives you back the original melody you put in.  But if you change that analysis around a bit, based on similarities of other melodic analyses (and some randomness), you get … new melodies!  Or at least melodies that are variations of the original melodies.  In other words, the more similar two melodies are, the easier they will mix.  The more different they are, the more my program will just regurgitate one of them, after having been unable to mix them that well.

That said, I’ve so far only tried a very limited amount of melodies… probably only around ten at this point.  It’s kind of a tedious process because right now the program only takes text files as input and outputs another text file.  So every melody you want the program to use you have to convert into numbers, and then to hear the melody it comes up with, you have to convert numbers back to notes.  It’s an utter pain!

So right now I am trying to make some sort of a GUI (graphical interface).  I’m working with Java, and I know just about nothing about Java’s GUI, or how to program 2D graphics for it.  Sun Microsystem’s website has a lot of resources about it, but no real solid tutorials that I could find; they’re resources are kind of all over the place and I’m having a lot of difficulty figuring out how to do what I want.  So I might go to the bookstore here soon and see if there are any good books on programming 2D graphics with Java.

My eventual ambition is to create something worth selling, so I don’t really have any plans to share the code or the specifics of exactly how the program works yet, though I admit that I definitely do not think it’s something so incredibly complex and amazing that it will change the world of music… still, I think I personally would really enjoy creating melodies with it… if I can make an easy-to-use GUI.  The logic behind how the program works is pretty much all in place though, though there are some areas that could use improvement.  But I really think the program needs to be using more the 10 or so melodies I’ve given it, so I’d really like to have a nice GUI that would make feeding it melodies much easier, faster, and less tedious.

I’ve uploaded some melodies it came up with at:

http://www.wizardwalk.com/melodies/

… some of them sound awful, some of them have pretty good ideas I think, and some sound too much like one of the melodies fed in (especially that Beethoven’s Ninth one).

So, that’s what I’ve been up to!