Friday, November 29, 2013

Sorting Time Stuff

More often than not sorting algorithms seem to be viewed as the first major step to understanding programming after basic arithmetic. They seem to be to some extent the embodiment of what we as programmers do and while this is an extremely limited example of what a computer can and does do it’s in a way iconic. It teaches young and aspiring minds a few very key things to programming. First, speed is important. Second, efficiency is import. And most over looked I think, there is more than one way to solve a problem.

I think a lot of people thing that since computers are math based they must work like math too, and to a certain extent they do. There usually is only one right answer, and it takes a lot funky logic to get to it sometimes. Yet unlike in math, there is more than one way to apply logic to a problem. Sorting algorithms are an awesome example of this. First of all there about 10 standard ones granted some of them aren’t that great but still that’s a lot of different solutions to one problem. Here are three examples:
 Selection sort starts at the top picks the smallest item and puts it at the front then takes moves on to the next position, rinse and repeat. It’s kind of slow, O(n^2), but also pretty simple.

Quick sort does live up to its name with O(nlogn) (just don’t give it a list in reverse order or it’ll be as bad as selection sort). It picks a pivot, arranges the values in the list so that those smaller than it go on the left and those bigger go on the right then does the same to the sublist and it’s sublist and it’s sublist and its sub – you get the point – until everything’s nice and orderly.

Merge sort also uses sublist but in a different way. It divides the original into to as many sublist as it has to until there’s only one element left in each sublist. It then proceeds to merge the sublist all the while comparing and making sure each sublist is in sorted order. It actually works at about the same average speed as quick sort, again O(nlogn) but lacks an obvious kryptonite.

So ya, lots of ways to fix one problem each with varying uses and speed. Also big O() notation: useful thing. It’s kind of annoying when you have to prove it but very good at giving people solid ways to compare algorithms after all it’s kind of hard to argue with graphs and number.

Anyway, that’s about all I’ve got to say about this one, other than comp sci is way better than calc XP

not edited


So I just finished E6 and A2 and decided I might as well try and write something for this blog – slog – thing... which brings me to a topic I've been meaning to mention on here for a while now: Vocaloid.
Now, I think some of you already know what this is (I've seen Miku floating around here and there), some of you however are going to be sitting there and going "Huh?". For those of you who are here's a brief summary of the thing called Vocaloid and the general culture surrounding it as I see it (if you have other ideas please comment, I'd love a discussion).

Vocaloid is, in the simplest terms, a singing software. No, it's not auto-tune, though it does sound like it to a certain extent. This is a software what essentially allows you to program a the vocals of a song, lyrics, vibrato, dynamics, and all and have the computer sing it back to you.
The original Vocaloid program -created by Yamaha- allowed a person to record a bunch of very simple sounds and using that the computer would be able to sing any song given to it in the recorded voice. They then sold the program as a license to other companies. These new companies, like Crypton Future Media and Internet Co., took the Vocaloid software and created what most now refer to as Vocaloids. They took various voice actors and singer and recorded them creating a vocal library which was then distributed as it's own product.

At this point I should mention that most Vocaloid have Japanese voice banks, meaning they were created with the intention of singing in Japanese. This isn't all that surprising considering Yamaha is a Japanese company despite its success worldwide. There were a few attempts are creating English speaking Vocaloids but they didn't really take to the market all that well and have mostly been pushed into the closet at the moment. There has also been a recent attempt to create a Korean speaking Vocaloid and we'll see how that goes.

Anyway, all the program-y things aside. There is now this software on the market which any song writer/composer can buy and ask it to sing his/her songs but what happens with these songs you ask? Well they go on the internet of course. The most wide spread portal for Vocaloid music is a Japanese video sharing website called Niconico (kind of like YouTube but not really). And perhaps the most amazing thing is what happens after.

The amount of attention this armature music sung my robots gets is completely unprecedented. You name me a Vocaloid song and there’s a 99% chance someone’s done a cover of it. Not only that but there’s probably a piano version, a rock version, a band versions, a chorus version, a videos and a dance in every combination under the sun for any particular song. The amount of creativity and innovation that goes on around these songs is unbelievable. And guess what, no one makes money off it. This is perhaps one of the best examples of art for art’s sake I’ve seen alive this century. Recently there have been some particularly popular song writers and some rare singers who have released albums of their covers for sale but even then they’re still available for download from Niconico for free. Some people would call Vocaloid music cold and robotic, I think it’s one of the most human thing I’ve ever encountered.

not edited

Some clarification just in case, I call any peice of music whose original singer was a Vocaloid, Vocaloid music. I sort of consider that music as a genre as opposed to a singing group or something like that.

Also some songs to YouTube if you're interested: Just Be Friends, Soraru's WAVE and the chorus version of Senbozakura.