Thursday, 28 November 2013

Same format as last time, I'm going to be talking through the lab as I do it. This lab wasn't overly difficult but it did teach me you can do some interesting things with functions and waves regarding sound. It kind of makes me wonder if you could write an algorithm for making music. 

Lab 3 Audio Signal Processing – Generating Signals with GoldWave.
Use your blog to keep notes, sketches, interesting Q and A etc.


Tones, Harmonics, Spectra and Spectrograms
  1. Run GoldWave. Ensure the system sound volume is low before you put your headphones on.
Lessons were learned from last time! Duly noted! 
  1. Use GoldWave Help at any time.
  1. Set the vertical scale (Y-axis) format to Normalized values.
I totally didn't have to check the last lab to do this. That's progress! :) 
  1. Work out the duration (time) you will need in order to display 8 cycles of a 400Hz sine wave. Note down this duration. Now use File > New... to create a new mono sound window of this duration with a sampling rate of 44100Hz.


Tada! The duration I used was 0.2s. 
  1. Use Tool > Expression Evaluator to generate a sinusoid (single pure tone) wave as follows. Select Waves from the Presets then Sine, f = Hz from the Waves submenu. The expression sin(2*pi*f*t) should appear in the Expression edit box. At the bottom of the dialogue box enter 400 for the frequency in the f = edit box then click OK. Check that you now have eight full cycles of a sine wave displayed. Sketch this waveform. Save the pure tone as an *.wav file. Play and listen to the tone (play it in a loop so that you have time to hear it).



Here we are. Sounds pretty flat at the moment. Definitely a sine wave though, if maths has taught me anything. 

  1. Now add to this Fundamental tone the harmonics up to and including the 9th in the proportions shown below. You can add a new harmonic by adding an expression to the existing expression. For example, to generate the fundamental tone plus the third harmonic at one third intensity you would use the expression: sin(2*pi*f*t)+sin(2*pi*3*f*t)/3. Display and sketch the waveform, together with the expression that you used to generate it, each time you add another harmonic.
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





  1. What shape is the waveform gradually approaching?
Looks like a sine wave or some kind of parabola thing to me still. 
  1. Use Effect > Filter > Spectrum Filter to view the frequency content (Magnitude Spectrum) of the waveform. Compare the peaks in this display with the fundamental and the harmonics you have added to it.

  2. Save the final waveform as a *.wav file. Listen to the waveform and compare it with the sound of the original pure tone sinusoid.
  3. Now start afresh and add to the Fundamental pure tone the harmonics up to and including the 5th in the proportions shown below. Display and sketch the waveform each time you add another harmonic.
Harmonic
Number
1
2
3
4
5
Amplitude relative to Fundamental
1
1/2
1/3
1/4
1/5
#1

#2

#3

#4

#5

#6


  1. What shape is the waveform gradually approaching?
A tan wave. 
  1. View the frequency content (Magnitude Spectrum) of the waveform. Identify the peaks in this display with the fundamental and the harmonics you have added to it.

  1. Save the final waveform as a *.wav file. Listen to the waveform and compare it with the sound of the pure tone, and the previous waveform.
It sounds a lot more altered than the other clips. It's really quite noticeably different. 

No comments:

Post a Comment