=========================preview======================
(comp342)[2007](s)midterm~cs_tcxaa^_10202.pdf
Back to COMP342 Login to download
======================================================
Hong Kong University of Science and Technology
COMP342: Computer Music

Spring 2007
Midterm Examination

Student Name: key

Student ID:

Instructions:
1.
This is a closed-book, closed-notes examination.


2.
Answer all questions in the space provided.


3.
No partial marks will be given on subquestions.



Question
Score

1
/2

2
/8

3
/4

4
/8

5
/4

6
/6

7
/9

8
/4

9
/8

10
/4

11
/4

12
/15

13
/2

14
/10

15
/12

Total
/100





1) Acoustics [2 marks]
What is the relationship between harmonics and their fundamental frequency?

Answer: Harmonics are at integer multiples of the fundamental frequency.


2) Waveforms [8 marks]
What is heard if we use a sampling rate of 22050Hz to sample the following waveforms below?
If there is more than one possible answer, list them all. Give a brief explanation (in 1-2 sentences) for each.

a) A sinewave of 11025Hz (2 marks)

Answer: If all sample points fall on zero-crossings, no sound is heard. [1 mark]
Else there will be no aliasing, so a tone of 11025Hz is heard. [1 mark]

b) A sinewave of 18000Hz (2 marks)

Answer: A music tone of 22050 C 18000 = 4050Hz is heard since aliasing occurs.

c) A sinewave of 22050Hz (2 marks)

Answer: (Give marks for one answer with a reasonable explanation)
- Nothing can be heard, since a waveform of 0Hz is produced.
- If all sample points fall on zero-crossings, no sound is heard. (Else, if the sampler is programmed to produce a sine wave under any situation, then the simplest sine wave it can estimate is 11025Hz, hence a tone of 11025Hz is heard.)

d) A sinewave of 2Hz (2 marks)

Answer: Clicks of 2Hz are heard since waveforms below 20Hz do not sound like a tone.

3) Spectrum Analysis and PVan [4 marks]
a) Why is windowing necessary in time-varying Fourier analysis? (2 marks)



Answer:
[low-level answer:] To smooth samples at the window endpoints. It corrects for an inaccurate user-specified fundamental frequency, and avoids implied discontinuity.

Or:

[high-level answer:] To isolate each moment of the sound. The resulting spectra together form an amplitude envelope to capture the time-varying behavior.



b) Before we open a wave file with PVan, why do we have to estimate the fundamental frequency of the wave file? (2 marks)


Answer:
[low-level answer:] To do Fourier analysis, we first have to estimate its frequency in order to properly window the data.

Or:

[high-level answer:] Because fundamental frequency estimation is an open research problem and cannot be solved accurately automatically. 4) Additive Synthesis [8 marks]
Fix the errors in the code below so that it generates an additive synthesis tone with 5 harmonics. The amplitude of the 1st, 2nd, 3rd, 4th and 5th harmonics are 3400,