Next  |  Prev  |  Top  |  REALSIMPLE Top

The Instrument

(15 pts) Writxe an STK class ElecGuitar.cpp which uses a single instance String to simulate a string vibration. Each ElecGuitar string should have the following features

  1. It excites its String with a white-noise burst which is filtered by a one-pole lowpass filter (the default pole location should be 0.5). The noise is available from an STK class called Noise and its burst should have a controllable duration up to at least one period in length (the default pluck time should be 50 samples). The lowpass filter should have dc gain equal to 1 (or slightly less) for all ``brightness'' settings. It should have a noteOn and noteOff methods to deal with the start and end of a note. See examples from other instruments available in STK.

  2. It should allow for pluck and magnetic pick-up positions to be specified in its corresponding String instance as a ratio between [0,1] of the string length from the bridge. Let the default pluck and pick-up positions be 1 and 3 inches from the bridge (respectively).

  3. It should allow for a feedback input to be added to the string excitation from external programs e.g. via setFeedback method.
You may use as an example, SimpString.cpp, given in gtrc directory from the jos-overlay. Note, however, that your String should do nothing except setting up the string (including pluck and pick-up positions). It has to be excited through ElecGuitar.


Next  |  Prev  |  Top  |  REALSIMPLE Top

Download electric_guitar.pdf

``REALSIMPLE STK Electric Guitar Lab'', by Julius O. Smith III and Nelson Lee,
REALSIMPLE Project — work supported by the Wallenberg Global Learning Network .
Released 2008-06-05 under the Creative Commons License (Attribution 2.5), by Julius O. Smith III and Nelson Lee
Center for Computer Research in Music and Acoustics (CCRMA),   Stanford University
CCRMA