12.4 Questions for the reader

12.4 Questions for the reader#

Exercise 72

Modes of a string. A violin string vibrates along a length of \(L = 0.33\) meters, and waves travel along it at \(v = 290.4\) m/s.

  1. What are the wavelengths of its first three modes?

  2. What are their frequencies?

  3. Pressing the string against the fingerboard shortens its vibrating length to \(\frac{3}{4}\) of the original. What is the new fundamental frequency?

Reveal solution
  1. \(0.66\) m, \(0.33\) m, and \(0.22\) m

  2. \(440\) Hz, \(880\) Hz, and \(1320\) Hz

  3. \(\approx 586.7\) Hz

Exercise 73

Modes of a tube. Sound travels through air at \(v = 343\) m/s. A tube is \(L = 0.5\) meters long.

  1. If the tube is open at both ends, what are the frequencies of its first three modes?

  2. If the tube is closed at one end, what are the frequencies of its first three modes?

Reveal solution
  1. \(343\) Hz, \(686\) Hz, and \(1029\) Hz

  2. \(171.5\) Hz, \(514.5\) Hz, and \(857.5\) Hz

Exercise 74

Delay from travel time. A guitar string vibrates along a length of \(L = 0.65\) meters, and waves travel along it at \(v = 143\) m/s. We simulate it at \(f_s = 48{,}000\) Hz.

  1. How many samples does it take a wave to travel the length of the string once?

  2. To tune a feedback delay line to this string, we set \(M\) to the number of samples in a round trip, rounded to the nearest whole number. What is \(M\), and what fundamental frequency does the feedback delay line produce?

  3. What is the fundamental frequency of the real string?

Reveal solution
  1. \(\approx 218.18\) samples

  2. \(M = 436\), which produces \(\approx 110.09\) Hz

  3. \(110\) Hz

Exercise 75

Tuning resolution. At \(f_s = 44{,}100\) Hz, what delay \(M\) tunes \(y[n] = x[n] + y[n - M]\) as closely as possible to each of the following frequencies, and what frequency does it actually produce? By how many steps is each out of tune?

  1. A4, at \(440\) Hz

  2. A7, at \(3520\) Hz

Reveal solution
  1. \(M = 100\), which produces \(441\) Hz, \(\approx 0.04\) steps off

  2. \(M = 13\), which produces \(\approx 3392.3\) Hz, \(\approx -0.64\) steps off

Exercise 76

Impulse response of a comb filter. Consider the comb filter \(y[n] = x[n] + 0.5 \cdot y[n - 3]\), at \(f_s = 44{,}100\) Hz.

  1. Write down the first ten samples of its impulse response.

  2. How far apart are the teeth of its comb, in Hz?

Reveal solution
  1. \(h = [1, 0, 0, 0.5, 0, 0, 0.25, 0, 0, 0.125]\)

  2. \(14{,}700\) Hz

Exercise 77

Decay time. A damped feedback delay line \(y[n] = x[n] + g \cdot y[n - M]\) at \(f_s = 44{,}100\) Hz is tuned to \(441\) Hz.

  1. What is \(M\)?

  2. What gain \(g\) makes its impulse response decay by \(60\) dB in \(2\) seconds?

  3. Keeping that same gain \(g\), we retune the delay line an octave lower, to \(220.5\) Hz. How long does its impulse response now take to decay by \(60\) dB?

Reveal solution
  1. \(M = 100\)

  2. \(g \approx 0.9922\)

  3. \(4\) seconds

Exercise 78

Karplus-Strong. Consider Karplus and Strong’s original algorithm, \(y[n] = x[n] + \tfrac{1}{2}\big(y[n - M] + y[n - M - 1]\big)\), at \(f_s = 44{,}100\) Hz.

  1. What delay \(M\) tunes it as closely as possible to \(110\) Hz? How many samples of white noise does its excitation contain?

  2. Without a gain \(g\), its notes decay only because of the low-pass filter in its loop. Does a note at \(220\) Hz decay faster or slower than a note at \(110\) Hz?

Reveal solution
  1. \(M = 401\), so the excitation contains \(401\) samples of white noise

  2. Faster

Exercise 79

Lumping losses. A digital waveguide string has a round trip of \(M = 200\) samples, and every sample of delay multiplies the wave by a loss of \(g = 0.9999\).

  1. If we lump all of these losses into a single gain per round trip, what is that gain?

  2. How many multiplications per sample of output do the distributed losses need? How many do the lumped losses need?

Reveal solution
  1. \(g^{200} \approx 0.9802\)

  2. \(200\) for the distributed losses, and \(1\) for the lumped losses

Exercise 80

Ordering convolutions. Directly convolving two signals of lengths \(K\) and \(N\) takes \(K \cdot N\) multiplications, and produces a signal of length \(K + N - 1\). You need to compute \(h_1 * h_2 * h_3\), where \(h_1\), \(h_2\), and \(h_3\) have lengths \(1\), \(3\), and \(2\). Since convolution is commutative and associative, you may convolve them in any order. Which two should you convolve first to minimize the total number of multiplications, and what is that total?

Reveal solution

Convolve \(h_1\) and \(h_3\) first, for a total of \(8\) multiplications.