Tuesday, January 26, 2010

A bit of technical stuff

     Digital Signals Processing was boring today, but I did have an interesting idea. I am going to write  piece of MATLAB code designed to decompose an audio signal into component sinusoids by approximation. I understand that a Fourier Transform would be easier, but I'm not sure how to implement that with digital data.

     I'll start with an exact input sinusoid. The function will first read the max amplitude and then create a low-res 3-d table of various sinusoids by sweeping amplitude, frequency and phase across a predefined range, probably somewhere in the human speech range, then calculate an error function for each generated sinusoid as compared to the input, and lastly select the function for which error is a minimum.

     Once an approximation is settled on, the function will "jiggle" the signal in three dimensions, again selecting for the lowest error function, in increasingly small scale, hopefully arriving at an approximation that is indistinguishable from the input signal.

     Matching a single sinusoid will likely be easy. The next step will be to input a sum of two sinusoids and direct the function to try the same thing, but approximating two signals. The initial step will be very computationally intensive, as a thorough sampling would involve calculating an error function for every possible combination of two sinusoids in the three-dimensional predefined range, which may itself be rather large. The jiggling will be difficult for the same reason; it will occur in six dimensions instead of three. The alternative is to sequentially jiggle first one and then the other signal. I wonder what effects this would have on accuracy.

     Ultimately, I hope to be able to pare the code down to something computationally feasible and have it approximate signals that are the sum of many sinusoids. Theoretically, I should then be able to input a voice recording, decompose it, and resynthesize it. The final product will probably be little more than a "Your voice as a robot" widget that consumes enough power to light the city of Chicago for two days, but hey. Why not?

Sunday, January 24, 2010

Flowers

     I recently watched the made-for-TV movie version of Flowers for Algernon. It does not deserve to be spoken about. Instead, I will discuss the inspiration it gave me for a sort of spin-off.

     In this alternative scenario, instead of getting intelligent, leveling off, and becoming less intelligent again, the protagonist's intelligence never stops increasing. Past genius, past humanity, into a seeming insanity. At first he becomes disillusioned with society, much like in Flowers for Algernon, as people become predictable, like thin paper dolls. He stops bothering to interact with them because he knows what they'll do and say well ahead of time. His intelligence becomes a prescience that extends further and further into the future, and he understands causality in a way that is beyond us. He begins to take actions with no discernible significance to us to alter the course of the future. Eventually he begins to consider philosophical issues, goes through an existential crisis, and then either commits suicide or attains some sort of nirvana which leads him, hopefully in a fashion not too contrived, to revert to his previous personality as a mentally handicapped person.

     Apologies to Dave, with whom I have discussed this concept and who helped to develop it.

Tuesday, January 5, 2010

     Alright, I'm satisfied. Maybe someone with a bit of computer savvy can get my email out of this and trace it to my name from there, but it's not screamingly obvious, and that's good enough. So, ranting time.

     Ate out with my ex Marie last night. Been separated eight months now. She bitched about her boyfriend almost the entire time. It's getting old. I don't know why I still talk to her; all she ever talks about is her and her new boyfriend and how shitty or wonderful their relationship is. It's because I don't have anyone to talk to. For that matter, that's why I went to dinner with her last night; I had a gift certificate for a meal for two, and I didn't have anyone else to take. I can't tell if the situation is as sad as it sounds or not.

     Let's have a little background here, just to get you acquainted.

     I was born and raised in northwestern Georgia with my parents and one older sister. I was a child prodigy. Around the time I skipped second grade, I started losing friends and gaining enemies. For middle school I hated everyone in general and girls in particular. I had a real hang-up about sexuality, and as you can tell, maybe I still do. As an atheist and a liberal I don't technically see anything wrong with it, but it still disturbs me on a gut level. It may be a reaction left over from aforementioned life period. Come high school I began to get over it. I was in the Boy Scouts, and having a leadership position and some guys who were nice to me more often than they were assholes helped. I chilled out and opened up, especially during my senior year. This is relatively speaking, of course. Hooked up with Marie just in time for senior prom.

     The relationship was tenuous from the beginning. I was convinced to pick her over another girl because she scored well on an online IQ test. Intelligence is important to me, you see. I thought at the time, "I've got a prom date, which is good, and for anything else we'll see where it goes." Well, it went. We got along well enough, even if her conservative Christian family took a little working on. I tried to break up with her before I went off to college, but she convinced me to stay. We argued a lot. We'd talk online, but then she'd want to talk on the phone, so I'd leave my room full of partying freshmen to go sit in the cold stairwell and try not to echo too much. I'd tell her I didn't want to get married and she'd ask where our relationship is going. We had plenty of good times, I think. I'm not sure anymore. I've reconsidered it all so many times I can't remember clearly anymore. Cutting to the chase, she left me for her manager last May, which is how she became The Ex.

     I'm intelligent.

     It's a declaration that deserves its own paragraph. My old counselor would go batshit over this, but the fact remains: I can't think of any statement more integral to my personality, or which describes so much of me so quickly. I've always prided myself o my intelligence. In middle school I began and today I continue to favor logic over emotion. I don't do it deliberately now like I did then, but I got into the habit of being dull.

     Number two is a more debated spot. There are a few contenders, chief among them arrogance and stability, and various synonyms thereof. But the arrogance comes with the intelligence. There were always so many people ready to put me down; I had to learn how to keep myself up. The end result is this: I've only met one person whom I honestly consider to be more intelligent than me. It's my freshman roommate Jin, the commie bastard, and I'm glad to be shed of him, even if the damage he did to my perspective can't be repaired. He was a cool guy.

     Stability, though. Long-term and short-term. I get the disappointing feeling that I've hardly changed in all these years. Maybe this is common, maybe it's a perception bias. In the short-term, my emotional reactions are often notably muted. Things that make people laugh, I don't laugh at. I don't get angry, sad, or happy as easily as other people. Especially happy. It may just be depression. It may be time for me to go on meds. I get along alright without them, though, and I'm iffy about drugs. The idea of altering my mood chemically is disturbing. I am the way I am for a variety of reasons, many of which I can no longer recall; they are valid reasons nonetheless.

     What a truly pathetic string of characters. It's the lonely bachelor's song, the same one being sung through half the ethernet ports in this city. There is some probability that someone will notice, and even a probability that someone will care, but ultimately it makes no difference. I don't know who I'm writing for anymore; for myself, or for you. Shit's gotten too deep. Bailing.

Unsurprising

     The level of sexual inundation I see around me has momentarily escalated my constant irritation to the high mountains of pissed off. It seems like every advertisement that flashes across my window is a pair of breasts and a smile, and I'm lucky if I get the smile. I understand that this is what we're programmed to do, biologically speaking, but we're "programmed" to do a lot of shit that we've largely cut out by now. Haven't we?

     Saw an add for something or other on Grooveshark the other day. Was some MMO with grandiose claims of millions of players and "be the master of the realm." The image was just a close-up of some computer-simulated woman's breasts. What's really disappointing about this situation is that advertisers would not be doing it unless studies had shown it to be effective. That's what really pisses me off about it; I know it works. It never fails to catch my eye. I spent years working through my middle-school sexual repression and now sidebar ads are going to undo all my hard work.

     I'm up too late again. I slept too late today. I don't have much to get up for. I'm not going to sleep very well once I go to bed anyways.

     I hope there are some anonymity settings on this thing. Might have to scrap it if not.