alternativa ks

Upload: ryan-jackson

Post on 03-Jun-2018

223 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/12/2019 Alternativa KS

    1/6

    Waveguide String Model

    friction, or energy loss, from the system. This loss is best described as an output phenom-

    enon--energy from the string is transferred to the air and to the guitar body.

    A guitar string can vibrate in a three dimensional space, since it is suspended in air

    between two endpoints, so there are generally more vibrations than represented by 4),

    which describes vibration in one dimension only. A string tone can be thought of as a com-

    bination of the two vibrational modes, one normal to the guitar body, called vertical, and

    one parallel to the guitar body, called horizontal [4]. The coupling of the two modes s non-

    linear and cannot be modeled completely, since it is dependent upon the guitar construc-

    tion. For our purposes, however, it is adequate to assume that the two modes are

    independent. Each mode s excited by a single guitar pluck, with some energy transferred

    to each mode.

    Each mode has different interactions with the bridge and the top plate of the guitar

    body. The guitar tone for pure vertical plucking directions decays quite sharply, whereas

    the tone for purely horizontal plucking decays quite slowly. The overall plucked string

    response can be modeled as the sum of these two decaying modes, ignoring nonlinear cou-

    pling. The relative amount of excitation transferred to horizontal and vertical modes varieswith the angle of the pluck.

    4. Waveguide String Model

    This section deveIops the digital string model solution to the wave equation and the

    refinements necessary to allow for non-integer periods. This model, implemented as a digi-

    tal filter, is used for both horizontal and vertical mode tring oscillations.

    4.1 Basic String Model

    A digital simulation of a vibrating string can be constructed using digital waveguide

    techniques, as in [I 1], yielding a general form for a string model, as shown n Figure 4.1. I.

    egieon 13 of 49

  • 8/12/2019 Alternativa KS

    2/6

    Waveguide tring Model

    The expression g/V groups all energy loss in the string into one expression. Energy lost

    generally goes through the bridge to the guitar body. The difference equation describing

    the system is

    y[n] g Vy[n-N] x[n] ts~

    which yields a z-transform representation:

    1H(z) N-N1--g Z

    x[n]~ Nsamplesdelay I yln-N]

    Figure 4.1.1 General tring Loopback ilter Model.

    This filter essentially copies the signal sample values from N samples ago and multi-

    plies by a decay factor of gN < 1. To generate a decaying oscillatory response, the delay line

    is initialized to all zeros, x[n] introduces the first period of the oscillating signal into the

    delay line, and the recursion equation produces the remainder of the response with gN act-

    ing as the decay rate per period).

    More general responses, including non-integer periods and frequency-dependent warp-

    ing, can be achieved by replacing gN with a feedback FIR filter h/In] having z-transform

    Hi(z). The overall feedback system is then governed by the difference equation

    y n) u In] t In] , I -]

    where u[n] is an input to the system and y[n] is the resulting output. This more general

    string model enables frequency-dependent losses with decay factors included in h/[n].

    14 of 49

  • 8/12/2019 Alternativa KS

    3/6

    Waveguide tring Model

    4.2 Non integer Periods

    A specific limitation of [ ] 1] is that only frequencies w~th integer periods can be repre-

    sented. For very low frequencies, this is not a terrible restriction. At higher harmonic fre-

    quencies, however, an integer period approximation causes increasing error in

    representable pitch, as shown in Figure 4.2.1.

    100o0

    Figure .2.1 Effects f Integer Only eriods

    Allowing only integer pitch periods is quite restrictive; however, non-integer periods can

    pose quite a problem [6]. A simple solution is to interpolate between the samples at the

    integer delays to approximate the signal value one non-integer period ago. One choice forHi(z) is a Lagrange nterpolation filter, with the constraint that the sum of the filter coeffi-

    cients be equal to the desired decay rate gN. Assume hat the non-integer period T = N + x~

    where 0

  • 8/12/2019 Alternativa KS

    4/6

    Waveguide tring Model

    M/2

    xi x) = I-1 x __.ij (~i-]jf--~ l,j~i

    and M is the number of coefficients an even number). Note that the index i = 0 corre-

    sponds to an integer delay of N. While Hi(z) is non-causal, it is only used at delay Nso that

    the overall feedback loop filter is causal. We have found that L=6 is sufficiently accurate for

    providing reasonable sound using a 44.1 kHz sampling rate and a usable bandwidth of 11

    kHz.

    0.5 1 1.5 2 2.5 3 3.5Frequency n r r sec

    Figure 4.2.2 Interpolation Loop Filter Frequency esponse

    In frequency domain, the interpolaUon loop filter looks like a periodic series of peaks,

    inverted notch filters, with a peak appearing at each harmonic, as shown in Figure 4.2.3.

    The Lagrange interpolation introduces a lowpass filtering effect onto the string model, as is

    clearly visible in Figure 4.2.2.

    It should be noted that the string model as shown enhances energy at harmonic fre-

    quencies relative to that at non-harmonic frequencies. This effect is evident from the fre-

    quency magnitude spectrum in Figure 4.2.3; signals at non-harmonic frequencies are

    attenuated.

    ~~ogen

    16 of 49

  • 8/12/2019 Alternativa KS

    5/6

    Waveguide tring Model

    This string model is ver~ similar to the Karplus-Strong model, as presented in [5], [8],

    and [12], where either white noise or an ideal string waveform is used as excitation to the

    model. The KS model removes energy at non-harmonic frequencies resulting in a set of

    harmonic tones. The LPF operation of the averaging filter helps to attenuate unwanted

    aperiodic wide-band energy in the synthesized signal. The resulting output has an initial

    burst of white noise that fades rapidly into a decaying tone. Although the random excita-

    tion produces interesting sounds, it is not well-suited to make real-sounding synthetic

    instruments because the signal energy is randomly distributed at each harmonic, rather

    than exhibiting the spectral structure enforced by physical constraints.

    Figure 4.2.3 Close-up of String Frequency Response

    4.3 Waveforms on the String Model

    The ideal string shape, as represented in 3), contains only harmonic frequencies. If the

    ideal string shape can be synthesized for one period and used as an excitation to the string

    model, the resulting output essentially will be copies of the first period with continuing

    exponential attenuation. [I 2]

    If the waveform input to the string model contains only harmonic frequencies, the only

    effect of the string model will be the attenuation of the input signal. For example, if a sinu-

    soidal waveform with frequency fo is fed into the string model, all that will be apparent is

    egieon 17 of 49

  • 8/12/2019 Alternativa KS

    6/6

    Overall System odel

    an exponential decay of the amplitude depending on the value of gN. The frequency of the

    signal will not change, and additional harmonic components will not appear.

    5. Overall System Model

    By combining the physical intuition and digital modeling techniques presented thus

    far, we developed a computationally efficient and physically-based model for the guitar.

    This model is an extension of that presented in [ 14]; here the model parameters from sam-

    pled guitar string data, and the steady-state response of the guitar is analyzed separately

    from the transient vertical response. The method in [14] makes several compromises in

    accurate sound blending and overall reverberation, both of which are critical to generating

    sounds characteristic of the guitar and to distinguish between different guitars. The

    method presented in this report takes advantage of an advanced IIR filter design algorithm

    to make a resonant filter that provides excellent mixing of the guitar string sounds and

    resonance based on the physical characteristics of each specific guitar body.

    The overall system model used is shown in Figure 5.0.1, with the excitations forming

    the input and the guitar sound as the output. HI(Z) is a Lagrange interpolation filter, and T

    is an integer period.

    Horizontal xcitation

    Vertical xcitation

    :Horizontal~ ~ |;[ String Model ___]

    ~i

    Guitar Body ~Model SynthesizedGuitarHa(z) Sound

    Figure 5.0.1 Overall Synthesis Model

    There are several important components to this model:

    Base interpolation filter HI(Z)

    Filter delay T the integer pitch period)

    egi e 18 of 49