MSP - 2025 HW 1 9am
MSP - 2025 HW 1 9am
March 2025
Question 1
A real-time continuous signal xc (t) is band-limited to frequencies below 5 kHz, meaning
This signal is sampled at a rate of 10,000 samples per second to produce a discrete-time
sequence:
x[n] = xc (nT ), with T = 10−4 .
1. Which continuous-time frequency does the index k = 150 in X[k] correspond to?
2. Which continuous-time frequency does the index k = 800 in X[k] correspond to?
1
Question 2
Show that the Short-Time Fourier Transform (STFT), defined as
∞
X
X[n, λ) = x[n + m]w[m]e−jλm
m=−∞
2
Question 3
Given the signal: h πn i2
x[n] = sin u[n]
2
where the STFT is computed using the window:
1, 0 ≤ n ≤ 13
w[n] =
0, otherwise
Define:
2πk
X[n, k] = X n, , 0 ≤ k ≤ 6.
7
1. Determine X[0, k] for 0 ≤ k ≤ 6.
Question 4
Previously, we defined the time-dependent Fourier transform of the signal x[m] such that,
for fixed n, it is the DTFT of the sequence x[n + m]w[m], where w[m] is a window function.
Now, define the time-dependent autocorrelation function as:
Z π
1
c[n, m] = |X[n, λ)|2 ejλm dλ
2π −π
i.e., for fixed n, c[n, m] is the aperiodic autocorrelation of the sequence x[n + r]w[r].
b) Show that c[n, m] is an even function of m for fixed n, and derive the equivalent
expression:
X∞
c[n, m] = x[r]x[r − m]hm [n − r]
r=−∞
where
hm [r] = w[−r]w[−(m + r)].
3
Question 5 (From past exam)
We sample the note A2 (a pitch frequency of 110 Hz with 3 overtones) at a rate of 550
samples per second, and then perform a length-N DFT (with a square window).
(A.) If N = 5, which frequency bins have values that are non-zero? (comment: bin #1
is second after bin #0.)
(B.) If N = 15, which frequency bins have values that are non-zero?
(C.) If N = 16, which frequency bins have values that are non-zero?
(D.) If N = 32 = 16 signal samples + 16 zero-padding samples, is the result identical to
the N=16 case?
(E.) If N = 30 = 15 signal samples + 15 zero-padding samples, is the result identical to
the N=30 case?
4
Pure Data Assignment: Melodic Sequencer
Two synthesis methods were discussed in the recitation: additive and subtractive. The
subtractive synthesizer was shown in use with a sequencer. In this assignment, you’ll design
a melodic sequencer using additive synthesis.
• The sequencer could send bangs to multiple synths, each tuned to a specific pitch.
Instructions:
If you’d like a suggested sequence to start with, try the following A-minor arpeggio
(frequencies in Hz):
5
The First Python Assignment: STFT Trade-Off Explo-
ration
In this assignment, we will explore the frequency-time resolution trade-off inherent in
the Short-Time Fourier Transform (STFT).
Each student will receive a unique signal provided as a CSV file. This signal is composed
of five elementary parts:
• Two impulses
Objective: Identify the frequencies of the sinusoidal components and the time-locations
of the impulses using the STFT.
The signals are sampled at 1000 Hz.
Instructions:
– An array of frequencies
– An array of time values
– A matrix representing the spectrogram
• You may also use scipy.signal.find peaks to help identify frequency or time fea-
tures. Be mindful of how you choose threshold values when filtering peaks.
Discussion:
• Which window type and size produced the most useful results for your signal?
6
Deliverables: