Monday, August 23, 2010

Musical Note Frequencies

I was thinking about how doubling the frequency of a note gives you a note one octave higher. Case in point: A 220Hz--> A440Hz, contrast this with the next octave A 440Hz --> A 880Hz and we see that the span (in Hz) of each successive octave is greater than the previous. The frequency of ascending notes has an exponential relationship that goes like 2^x. I was specifically thinking about this because the only musical note and corresponding frequency I knew was A440Hz and I wanted to know the frequency of any note I could think of. Knowing this single reference frequency and the fact stated in the first sentence of this post I found a formula that will tell the frequency of any note, I figured I would reference the formula to the 88 keys of the piano for convenience where n=1 is the lowest note and n=88 is the highest.
This graph of the above formula shows the exponential curve nicely and I've added the piano keyboard as the x-axis which corresponds to the domain of the function, integers 1 through 88. I have no immediate use for this information but I just feel better knowing that I now have an easy way to know the frequency of all the notes in western music. The formula actually works for n values less than 1 and above 88 but those probably won't get used too much.

One last thing I wanted to incorporate before I could rest was the phenomenon familiar to piano tuners called "stretch". It so happens that there is inharmonicity in pianos, especially in smaller scale and poorer made pianos but even to some extent in the finest pianos ever made. One result of this inharmonicity is that harmonics (overtones) will occur not perfectly at integer multiples of the fundamental frequency. This causes some notes to sound bad in the extreme ranges of the piano when the string is theoretically in tune to the frequencies in my little formula above. Stretching the notes sharp in the treble and flat in the bass is typically done to compensate. Additionally, I think we like to hear the high notes a little on top of the pitch anyway just to avoid the appearance of being flat. The amount of stretch depends on the piano and the mood of the piano tuner during the tuning. I have modified the formula to accommodate stretch. The .1 value can be increased or decreased for more or less stretch. All in all I think it's a decent model.

Tuesday, June 1, 2010

Many Changesfor Summer 2010

We have moved, it's about a 5 mile drive south west of our old location. The new house offers more space, a garage, a backyard area, a friendly neighborhood with schools and a great park nearby. We are glad to be leaving the old apartment, I've lived there longer than anywhere else second to the Rosewood house. I think everyone in the family is taking to the new house quite well.

I also started working as an intern at ON Semiconductor in the protection group which handles parts designed to protect devices mostly from electro static discharge; you don't want to kill your cell phone or laptop because you rubbed your feet on the carpet a little too much. Within the protection group I will be working with Zener diodes and TVS arrays. I am very happy about this opportunity and I believe it should set me up to be more employable come next summer when I will have graduated. This summer internship could extend into the fall semester, we will have to wait and see.

Now the bad news, we had a transmission failure in our van! I guess the '98-'01 model Odyssey doesn't have the best transmission. It will be out of the shop Wednesday and will be paid for with the help from some insurance money from our burglary incident which happened 4 weeks ago for those who hadn't heard.

All in all, things are going along pretty well I suppose. I'm sure pictures of summer activities with the kids will follow.

Monday, March 22, 2010

Digital Frequency, Sampling a Sinusoid

I am preparing for an exam in DSP (EEE 404 at ASU) and I've been confused about digital frequency. It seems like a simple enough concept but I've been getting it mixed up. So as I sort it out I decided to blog it for my benefit and because I can't seem to find many examples. If I can post a decent blog about it then I figure I'm at a point where I understand it so here it goes.
Initially I learned to use a lowercase omega for angular frequency and a lowercase f for frequency (Hz). Then in this class they use capital omega for analog angular frequency, capital F for analog frequency, lowercase omega for digital angular frequency and lowercase f for digital frequency. This little symbol change has tripped me up. I wrote out the basics to help me keep it all straight:Note that n in the above example is restricted to integer values. Now that I have all that down it should be the easiest part of the test, but let's think about the meaning of digital frequency: I believe it can be thought of as the fraction of the continuous signal's cycle that is represented by a single sample. I say fraction because if you follow Nyquist's Sampling Theorem for signal recovery (simpler explanation of Nyquist theorem here), your sampling frequency should be at least twice the frequency of the signal frequency and noting that digital frequency is the ratio of frequency to sampling frequency it is evident that digital frequency will be less than 0.5. It is possible to neglect the sampling theorem and doing so shines the light upon an important difference between discrete samples of sinusoids and their continuous counterparts: For a sampled signal with f greater than 0.5 there exists a signal with f less than 0.5 which is the same!
In the next example I have sampled a continuous signal at two different frequencies, the first with f greater than 0.5 and the second with f less than 0.5. The continuous signal is with light dashed lines and the discrete samples are bold impulses, they share the same plot (the horizontal axis thus represents both t and n). Notice that the first set of discrete points suggests a sinusoid of a lower frequency (namely 1/4th of the original frequency) and therein lies the danger in having your sampling frequency too small.I think I've got a pretty good handle on this, now I need to study all the other stuff that may be on this exam.

Thursday, January 21, 2010

a few items of interest

What a great deal. Century Gateway 12 really came through for me on this one. I'm not a big movie-goer, when I go I like it to be really good and not just mildly entertaining. This movie was really good.

in other news:
I have 2 songs I have been working on recording, they are in fact mostly finished. They have drum, bass, guitar and other instrumental and even backup vocal tracks done but they both lack the lead vocals. I hope I can finish them before school starts to get busy. There's not a lot riding on it I know but if I can finish these recordings off soon I think I would be able to wholly focus on school and be a good student.

People have gotten colds and coughs at our house, Shule went in a few days ago for some shots, I've been doing more dishes by hand lately because I'm dissatisfied with the work our machine has been producing. Our little girls have been growing and doing active little kid things that make it hard to keep the house in order, but we've been doing our best to keep up. I have been applying for internships and looking more seriously into post school options.

That's what's going on and I'm not really inspired to put it all into a flowing blog post with clever anecdotes, but for what it's worth, I just wanted to get it down anyway.