Thursday 8 November 2012

Week 6 Lab 3

Lab 3

The lab this week was to create a wave and then mix different waves together to create a new wave. The waves were created using a fundamental and the harmonics of the fundamental.

Harmonic
Number
1
2
3
4
5
6
7
8
9
Amplitude relative to Fundamental
1
0
1/3
0
1/5
0
1/7
0
1/9
Amplitude dB
0

-9.54

-13.9

-16.9

-19.1
Frequency
400

1200

2000

2800

3600

The initial wave (fundamental) was created by setting the sample rate to 8000Hz, 8 bit, mono, the frequency to 400Hz and the duration to 0.02 seconds. This created the following wave :


The fact that I set the frequency to 400Hz, meaning 400 waves per second, and the duration to 0.02 seconds results in 8 cycles of the wave being drawn as 400Hz/0.02s = 8.

Next I worked my way through the chart only creating the odd harmonics as waves i.e. 1 (fundamental), 3, 5, 7 and 9. I created all of these waves individually always leaving the sample rate the same but changing the frequency and the amplitude for every harmonic. I worked out the frequency by multiplication. The 3rd harmonic of the fundamental has a frequency 3 times greater, similarly, the 5th harmonic has a frequency 5 times greater and so on. 

To work out the respective amplitudes of the harmonics I used a simple equation. For the 3rd harmonic I did 1/3, I then took the log of the answer, I then multiplied it by 20 to give me the amplitude.

For the 3rd harmonic of the fundamental the data I input was amplitude -9.54 and frequency 1200Hz, the wave created was:


Similar to the fundamental wave the number of cycles was calculated by dividing the frequency, 1200Hz, by the time which was 0.02 seconds, resulting in 24 cycles of the wave. As previously explained the 3rd harmonic of the fundamental has a frequency 3 times greater therefore the number of cycles of the wave within the same time period is also 3 times higher, 8 compared to 24.

I performed the same operation on the other fundamentals and then I cut and mix pasted them all into one wave. As I did so I noticed that a square wave shape started to take form as I pasted each wave in one at a time. The resulting wave after I pasted all waves on top of the fundamental was:


Part two of this lab was very similar to part one, however, this time after creating the fundamental tone I was to create the 2nd harmonic upto the 5th harmonic and merge them with the fundamental pure tone. The table of data was worked out the same as it was above and was as follows:

Harmonic
Number
1
2
3
4
5
Amplitude relative to Fundamental
1
1/2
1/3
1/4
1/5
Amplitude dB
0
-6.02
-9.54
-12.04
-13.9
Frequency
400
800
1200
1600
2000

The initial fundamental pure tone was created using the same parameters as I used above;8000Hz, 8 bit, mono, the frequency to 400Hz and the duration to 0.02 seconds. The wave created therefore was identical to the fundamental wave at the top of the page. However, because I am now adding in all the harmonic waves instead of just the odd numbers the resulting mixed wave is significantly different from that shown above.




The wave created is almost like mountains in a way. Also, as there are completely vertical inclines on the wave it makes it more like a digital wave as opposed to an analog wave. A digital wave only has 2 options, 1 or 0/ on or off, although it is not quite as simple a wave as that it is getting close to it.


No comments:

Post a Comment