10.8 Questions for the reader#
Exercise 57
Frames and time. A recording at \(f_s = 48{,}000\) Hz is processed with frame length \(N_F = 2048\) and hop length \(N_H = 512\).
What is the frame rate in frames per second?
What percentage overlap is this?
What timestamp, in milliseconds, does frame \(k = 20\) correspond to?
Reveal solution
\(93.75\) frames per second
\(75\%\) overlap
\(\approx 213\) ms
Exercise 58
Perfect reconstruction. You extract frames with a rectangular window and reassemble them with overlap-add. For each of \(N_H = N_F\), \(N_H = 2 N_F\), and \(N_H = N_F / 2\), describe what the reconstructed signal looks like compared to the original, and say which (if any) is perfect reconstruction.
Reveal solution
\(N_H = N_F\): perfect reconstruction. \(N_H = 2N_F\): gaps between frames, so samples are lost. \(N_H = N_F/2\): overlapping frames double the amplitude.
Exercise 59
Grains versus samples. Randomizing the order of a sound’s grains preserves its overall texture, but randomizing the order of its samples produces only noise. Explain why, in terms of what information a single grain carries that a single sample does not.
Exercise 60
Resolution trade-off. You want to analyze a bass line whose lowest note is \(55\) Hz, and you also want to pinpoint the exact moment each note begins. Explain the tension between these two goals in terms of the frame length \(N_F\), and suggest a frame length that is a reasonable compromise at \(f_s = 44{,}100\) Hz.
Reveal solution
A longer frame resolves the low \(55\) Hz pitch but blurs onset timing. A reasonable compromise captures at least one \(55\) Hz period (\(f_s/55 \approx 800\) samples) and is a power of two, so \(N_F = 1024\).
Exercise 61
Time stretch versus resampling. Both granular time stretching and resampling can make a recording play back at half speed.
How does each affect the pitch of the result, and why?
Which would you use to slow down a song for practice without making it sound lower?
Reveal solution
Resampling changes pitch and duration together. Granular time stretching changes duration while leaving pitch unchanged.
Use granular time stretching.
Exercise 62
Granular time stretching. An \(8\)-second recording is chopped into grains that are each \(50\) ms long, extracted at a uniform spacing of \(25\) ms (an extraction hop of \(25\) ms). The grains are then reassembled with an inter-onset interval of \(50\) ms per grain.
Roughly how many grains are extracted?
Approximately how long is the reassembled output, and is it faster or slower than the original?
Does this operation change the pitch of the sound, and why or why not?
Reveal solution
About \(320\) grains
The output is about \(16\) s, roughly twice as long (slower)
The pitch is unchanged, since the grains themselves are untouched
Exercise 63
Reading a spectrogram. Sketch (in words) what the spectrogram of a single, sustained trumpet note would look like: where would you see energy, and how would it be arranged on the time and frequency axes? How would it differ from the spectrogram of a snare drum hit?