Wednesday, December 17, 2008

venetian persia

So I got this idea. Someone else probably had it too, whatever. I was wondering how songs like gwarek 2 and bouncing ball achieve such an unmistakable 3D soundscape. And I still don't know, but I got some ideas thinking about it and the stuff we've been doing in physics.

So basically my idea is to write a program that has a visual intereface where the "listener" is defaulted to the center of a box and points that represent sounds can be placed around the listener in any given location. (at the moment I am just thinking two dimensional, looking down from above as if you were seeing the top of everything. It would be cool to put it into the full 3 dimensions though.) Further, I want to set the program so that the sound points can move past/around/through the listener at either a constant velocity or a constant acceleration.

As you likely know, there is a phenomena called the doppler effect which is when objects coming towards you fast (or you approaching the object fast) have a relatively higher sounding pitch and object moving away fast (or once again, you) having a lower sounding pitch. An easy example is the sound you hear when race cars drive by you really fast. The doppler effect can be interpreted rather easily using mathematics. The equation that I know of at the moment is:


F(listener) = F(source) * [V + V(listener)]/[V + V(source)]
Where...
F(listener): The frequency heard by the listener
F(source): The frequency originating from the source
V: The velocity of the soundwaves traveling through a given medium (usually 344m/s I think)
V(listener): The velocity of the listener
V(sournce): The velocity of the source

I am not certain, but I have a suspicion that the "Doppler effect" that takes place in the real world would not be adequately described by using a single number as the velocity. Velocity is what is known as a vector, something that has a magnitude (in this case speed) and a direction. Since our existence takes place in three dimensions for whatever reason, in most cases one must use three components to describe the position of something. Basically, in order for me to tell you exactly where something is, I have to talk about it with regards to forwards/backwards, "left"/"right", and up/down. Since my original idea is only concerned with two dimensions, I believe one would have to use a two component vector. Another thing to note is that sounds are very rarely a single frequency, but rather usually a group of frequencies. Calculating the shift in every frequency that composes a sound would take forever to do, and so the beauty of computers shines through.

Another thing to take into account is the intensity (loudness) of a sound as it moves through space. For this we have another nifty equation:


I
= 1/(r^2)
Where...
I : The sound intensity heard at some point.
r:The distance from the sound source to the listener at that point.

Unfortunately, that equation only applies to sounds (or any wave, I believe) that propagate equally in all directions. In the world, this doesn't always occur. And also it doesn't work for indoor sounds since they can reflect off of surfaces. I do wonder if it would make a decent enough approximation or if I should just dive a little deeper into the physics.

What I don't know anything about is reverberations/echoes/reflections. Surely those would also be necessary to create a program that is capable of modeling sounds in space that sound at least half decent. And the biggest problem is that I can't program. I figure enough people learn, maybe I could find some tutorials on visual basic or java or something...

Anyways, heres some shit I've made messing around on reason. It has nothing to do with all the stuff I was talking about above.
Powered by beta.joggle.com

Thursday, December 11, 2008

Last class was yesterday, its about the one year anniversary of this blog (wooooh...), and its time to celebrate. As per usual, alcohol will be a part of this celebration. But instead of drinking it, I'm gonna study it!

So what about alcohol could possibly be worth studying? All the different beers, wines, and liquors? Different cultural opinions towards alcohol? Famous alcoholics? Nah, fuck that shit! The most fascinating shit is its chemistry, inside and outside the body.

While the pharmacology is interesting (some NMDA-antagonism a la ketamine and pcp, enhancement of GABAergic transmission a la benzodiazepines and those mostly forgotten barbiturates, dopamine reuptake inhibition, and on and on. Gross oversimplification, I know.) thats not what I want to ramble to myself about. Instead we are gonna look at the metabolism and bioreactivity, if you (I) will, and really examine what is going on with that drink that so many people love yet don't understand.
On the left you will notice a biomolecule, NAD+, in typical o-chem schematics, albeit lacking all of the proper stereochemical information. As you can see it's kind of big and space-consuming, a real hassle to show multiple times. But why would I want to do that you ask. Because this chemical is an enzyme cofactor that places a crucial role in the first metabolic step of your body getting rid of that stuff we call alcohol. Oh No you cry, that molecule is much too large to be shown multiple times in an investigation of the mechanism behind this quintessential chemical voodoo. No need to fear, theres no need to, the reaction (more or less) takes places only on the top part, the nicotinamide.

As one can see, a hydrogen (with the pair of electrons) from the carbon atom next to the oxygen of ethanol "jumps ship" and lands itself on top of NAD+. The electrons in the ring trickle down and get grabbed by that positive nitrogen, neutralizing his charge. In order for ethanol to make up for the loss of its hydrogen, the oxygen tells its hydrogen to get lost and takes those electrons and shares them with the carbon as a gesture of good will. The net result is that ethanol becomes acetaldehyde and NAD+ becomes NADH.

So what?!?!! you say, convinced that something so immediately unintuitive has to be absolutely boring. Here's the (more) exciting part, acetaldehyde is why alcohol is (so) bad for you! Even better, here's why it's bad:
In this particular examples, an amine (nitrogen group) attached to (anyones) DNA attacks acetaldehyde and initiates a reaction that it will one day terribly regret. I'm not gonna go through all those steps, but basically in the end you wind up with water (cool), a proton (okay), and alkylated DNA (BAD BAD BAD!). It is my understanding that most carcinogen have their cancer causing powers all because they have the right chemical reactivity to alkylate DNA. Heard of benzene? Alkylates your DNA. Heard of mustard gas? Alkylates your DNA. Methyl magic? Alkylates everything in sight...

To be clear here, I do not know that this specific alkylation reaction between acetaldehyde and DNA occurs, it is (partially educated) speculation on my part. But alcohol has been linked to cancer, and the material safety data sheet for acetaldehyde lists it as a carcinogen. Regardless, this reaction does occur with all different sorts of amines throughout your body, and is probably one of the reason people get hangovers.

Ok, so somebody drank some ethanol, it turned into acetaldehyde, reacted with a bunch of amines and fucked shit up. Now what? Well some of the acetaldehyde that's floating around in the body does undergo further metabolism. However, things get less toxic this time as we go from acetaldehyde to acetic acid. What is acetic acid you cry! One smell and you would instantly know, it is the acid that makes vinegar vinegar. Vinegar is a about 5% acetic acid in water solution. Sometimes if wine is left exposed to air for too long while it is fermenting microorganisms in the wine do the same reactions as our body and begin to turn the ethanol in acetic acid, hence rice wine vinegar etc. Another interesting tidbit is that a significant portion of certain Asian populations have low levels of this second enzyme, "aldehyde dehydrogenase". The result is that their bodies are more prone to building up high level of that nasty acetaldehyde, and thus all the stereotypes about Asians and alcohol.

So now the question is, why do all these reactions occur as they do. The answer is of course highly complex, but some insight can be gained by looking at pretty pictures of molecular orbitals.
A) The highest occupied molecular orbital (HOMO) for ethanol. Notice that the largest lobes of the orbital surround the hydrogens on the carbon next to the oxygen, this is where the hydrogen came from when it abandoned ethanol to join NAD+, leaving a toxic stream of acetaldehyde in its wake.
B) Here we have the highest occupied molecular orbital for acetaldehyde. It's here for comparison purposes only.
C)Now we have the lowest unoccupied molecular orbital (LUMO) for acetaldehyde. It looks strangely close to the HOMO for ethanol. Once again, notice where the largest lobes are.
D) Here we have the electrostatic potential map of acetaldehyde. The red areas are the most negative (electron rich) and the blue positive (electron poor.) The color in between the two (e.g. between the oxygen and carbon) represents areas that are not occupied by electrons. Notice here that the most positive portion of acetaldehyde is exactly where the electrons from the nitrogen atom (attached to the DNA) attacked acetaldehyde in the alkylation reaction outlined above. There are a few strands of logic amidst all this chaos after all!

And now finally I want to examine some of the high energy anti-bonding orbitals of acetaldehyde. These aren't relevant to anything (that I know about at least) but I think they're neat. I've accentuated their character as I saw fit.

A) This one is one of the highest anti-bonding orbitals. Makes me think of a giant cosmic peanut blasting through a membrane of some sort.
B) This guy is clearly upset due to the methyl group flying through his head.
C) Kinda looks like a bunch of bananas stacked up with an inverted pineapple top.
D) I can't be the only one who thought this orbital looked deeply wise. Very peaceful. And to think, all of these different personalities are contained in every single molecule of acetaldehyde. After a night on the town you might be looking at meeting 1,000,000,000,000,000,000,000,000 of these guys. (Yes, thats actually based on calculations. No, I wouldn't bet money on it being 100% accurate.)

And thats everything. Good shit, right?

Sunday, December 7, 2008

piss in the ocean

As a person who, in some sense, exists I must develop some view of the world. Views means interpretations, beliefs, perceptions, etc. Since there is no obvious collection of "divine rules" to live by, each individual must find what they believe to be the most suitable way to deal with their existence. And also by the same lack of clear divine guidance, there are very few things which can be said to be fact, and therefore assumed. And so from here I like to proceed with the premise that there is no absolute reason for me to believe any particular idea or thing unless I, for some self-chosen reason, want to believe this idea or thing. Then the obvious question must be asked, for what reason(s) would I want to believe (in) something? Of course it seems possible that there are multiple reasons, some of which could be unknown to myself, but it also seems that I have developed some view of the reasons why I believe the things I do.

In particular, in my interpretation of my existence, it makes sense to believe in things that are (in one sense) objectively true. In this case objective means not dependent on the person observing such a truth; as in any person performing such an observation would see the same thing as any other person doing the same. But why do I feel it so important to rely on some measure of empirical, objective "truth"? I feel that, regardless of whatever the nature of this "truth" is, it allows for some degree of (reliable) prediction and understanding. Logically speaking, the truth of something can never be proven beyond any doubt, but that doesn't mean that the truth of all ideas or concepts are equal. Obviously, many ideas and concepts can be proven false. Additionally, continued attempts to show some proposed truth as being wrong should be made. In my experience, the systematic testing of ideas is the best tool available to those who are interested in finding the underlying themes of existence. It is my opinion that once understood, these principles allow for a great advantage in those know them. This advantage being a greater awareness of the world in which us humans live, and a greater understanding of the events that occur in the past, present, and future. An then by extension, a greater understanding of oneself, and of others, and the nature of the universe and existence.

I am critical of all view points, including what most would call my "rationalist" world view. Let me be clear, rationalism is not a presumption of mine. As far as I can tell, I make only two "leaps" so to speak:
1) there is no absolute reason to believe anything and
2) I choose to put my belief in ideas about existence that give me the greatest reassurance of my ability to correlate the ideas I have about the world to the things that empirically occur in it.
I make a point to say this because I commonly here arguments from those who differ in opinion from me that essentially say "... yeah thats true by your way of thinking, but you can't evaluate (insert the belief or idea being argued here) in those terms. What I'm saying is beyond that way of thinking about things... if you continue to rationalize (insert belief or idea) then you're are never going to understand it". I feel that, essentially, this is an argument of "faith" versus "proof". If a person doesn't agree with me that there is no absolute reason to believe in any one thing in particular, then there's no point in further discussion. But if they do agree with me, then the question becomes, why would I believe your proposed idea or belief? As I explained in my 2) proposal, I have a criteria for what I deem a belief appropriate for my desires. Part of these requirements is evidence.

It's easy to point a finger at someone like me and mutter some common slander used for people who want proof, but really, Why should I believe you? Why should I believe you over some other person making the same argument about a different thing? Why should I believe anything anyone tells me? If you are the type of person who wants a set of beliefs that could only be regarded as truths by the most delusional of minds, then I guess you don't need a good reason to believe something. I, however, want beliefs that have the greatest probability of carrying some empirical truth that could be observed by myself, or any other typical human. So in the end, sorry but telling me I have to just adopt a new world view because it will lead to a much greater life doesn't mean shit to me without evidence. There's too many completely human people out there with too many things to gain to be able to take anyone "on their word". Life is relatively short, and in my opinion acting with no real plan is a good way to seclude oneself from the futures that take planning. And regardless of one's actions, the future will come.

and I'll end with a few quotes since I'm not a famous writer....

The future belongs to neither fools or sages, but to those who are aware of the possibilities and prepare for it today.
-paraphrased from memory, and I don't remember who said it either.

"Reality is that which, when you stop believing in it, doesn't go away."
-Philip K. Dick

"I am not bound to swear allegiance
to the word of any master.
Where the storm carries me,
I put into port and make myself at home."
-Horace Epistulae