Next  |  Prev  |  Up  |  Top  |  REALSIMPLE Top

Karplus-Strong Laboratory Exercises

Use the above shell script to generate a pd synthesizer, and drive it either from the Virtual Keyboard or from an external MIDI keyboard, as described in the Faust intro. Answer the following questions:

  1. Exploring mistuning: Since the delay line is not interpolated, the fundamental frequencies are quantized to frequencies given in Eq.$\,$(1), where $N$ is the (integer) delay-line length. This tuning error is very noticeable at low sampling rates (e.g., 8 kHz or even 22 kHz). However, it is harder to hear at the standard 48 kHz sampling rate that is standard in AC-97 CODEC chips.

    1. At what MIDI key-number do you start to hear the tuning error when the sampling rate is 44.1 kHz? (MIDI key-number 69 corresponds to A4 at 440 Hz, and key-number 60 is C4 (``middle C'') at $440\cdot 2^{60-69}/12 \approx 261.63$ Hz.) If possible, determine the first ``out of tune'' key-number when the sampling rate is 8 KHz.
    2. Repeat the previous problem using fdelay in place of delay, and explain why your results make sense.

  2. Measure the final signal value for three different notes after sound is no longer audible.
    1. Explain why the signal usually does not decay to zero.
    2. What final values are possible?
    3. What property of the excitation noise burst can guarantee that the signal will decay to zero?

Next  |  Prev  |  Up  |  Top  |  REALSIMPLE Top

Download faust_strings.pdf

``Making Virtual Electric Guitars and Associated Effects Using Faust'', by Julius O. Smith III,
REALSIMPLE Project — work supported in part by the Wallenberg Global Learning Network .
Released 2013-08-22 under the Creative Commons License (Attribution 2.5), by Julius O. Smith III
Center for Computer Research in Music and Acoustics (CCRMA),   Stanford University