Spread the love

Karplus–Strong string synthesis is a method of physical modelling synthesis that loops a short waveform through a filtered delay line to simulate the sound of a hammered or plucked string or some types of percussion.
With first impressions, this technique can be viewed as subtractive synthesis based on a feedback loop similar to that of a comb filter for z-transform analysis. However, it can also be viewed as the simplest class of wavetable-modification algorithms now known as digital waveguide synthesis, because the delay line acts to store one period of the signal.
Alexander Strong invented the algorithm, and Kevin Karplus did the first analysis of how it worked. Together they developed software and hardware implementations of the algorithm, including a custom VLSI chip. They named the algorithm “Digitar” synthesis, as a portmanteau for “digital guitar”

  1. A short excitation waveform (of length L samples) is generated. In the original algorithm, this was a burst of white noise, but it can also include any wideband audio signal, such as a rapid sine wave chirp, or a short burst of a sawtooth wave or square wave (anything that provides plenty of harmonics)
  2. This excitation is output and simultaneously fed back into a delay line L samples long.
  3. The output of the delay line is fed through a filter. The gain of the filter must be less than 1 at all frequencies, in order to keep the feedback loop stable. The filter can be a first-order lowpass filter (as pictured). In the original algorithm, the filter consisted of averaging two adjacent samples, a particularly simple filter that can be implemented without a multiplier, requiring only shift and add operations. The filter characteristics are critical for the resulting harmonic structure of the tone.
  4. The filtered output is simultaneously mixed into the output and fed back into the delay line.
Karplus-Strong synthesis block diagram

With a quick look, this method of synthesis seems very close to subtractive synthesis based on a feedback loop including a comb filter. But, it can also be considered as the simplest form of wavetable-modification algorithm referred to as “Digital Waveguide Synthesis”, because the delay line stores and processes one period of the signal.

Note: this is a technical maths bit.
The fundamental frequency (specifically, the lowest non-zero resonant frequency) of the resulting signal is the lowest frequency at which the unwrapped phase response of the delay and filter in cascade is −2Pi.
The required phase delay D for a given fundamental frequency F0 is therefore calculated according to D = Fs/F0 where Fs is the sampling frequency.
The length of any digital delay line is a whole-number multiple of the sampling period. In order to obtain a fractional delay often needed for fine tuning the string below JND (Just Noticeable Difference), interpolating filters are used with parameters selected to obtain an appropriate phase delay at the fundamental frequency. Either IIR or FIR filters may be used, but FIR have the advantage that transients are suppressed if the fractional delay is changed over time. The most elementary fractional delay is the linear interpolation between two samples (e.g., s(4.2) = 0.8s(4) + 0.2s(5)). If the phase delay varies with frequency, harmonics may be sharpened or flattened relative to the fundamental frequency. The original algorithm used equal weighting on two adjacent samples, as this can be achieved without multiplication hardware, allowing extremely cheap implementations.
Z-transform analysis can be used to get the pitches and decay times of the harmonics more precisely, as explained in the 1983 paper that introduced the algorithm.

While they may not adhere strictly to the true algorithm, many hardware components for modular systems have been commercially produced that invoke the basic principles of Karplus-Strong Synthesis: using an inverted, scaled control system for very small time values in a filtered delay line to create playable notes in the Western Tempered tuning system, controlled with volt per octave tracking or MIDI data.
The Inventors are not specifically credited, though the term “Karplus-Strong Synthesis” is referenced in some of the manuals.
Some examples of hardware Synthesizers in use:
Hardware components capable of Karplus-Strong style synthesis include: the Moog Clusterflux 108M, Mutable Instruments Elements and Rings, 4ms Company Dual Looping Delay, 2HP Pluck, Make Noise Mimeophon, Arturia MicroFreak and the Strymon Starlab.

The basic structure is simple, just a noise source fed via a VCA which used to generate a variable attack-decay noise impulse to feed into the KS Delay line. Short audio pulse times give the best results. Switching between Pink and White noise gives a noticeably different end result, as do other sound sources with a wide harmonic spectrum.
The feedback control on the delay module controls the decay time of the audio output through plucked string/hammered sounds through longer decay times right up to a sound that will depend of the length of the gate control pulse.
There is a Karplus Strong type module in the Elena Design module pack, that is the ED Digital Waveguide, which is more complex to use and set up, but is worth the effort for the extra options including both negative and positive feedback signals that it supports. One caveat is that you need to read the help and support files first. The Elena Design pack along with all the help files can be downloaded from the Elena Design repository website.

The Digital Waveguide help file.

This module is back-fed fractional delay line with the following advanced features making it particularly suitable for delay-based / Karplus-Strong synthesis.
Features:
a) Fractional delay support by all-pass interpolation ensuring smooth pitch resolution and flat spectrum response for every pitch
b) The pitch can be modulated or switched abruptly without clicks or other unwelcome artifacts.
c) The DW Supports negative feedback.
d) The Feedback is adjusted on a linearity-corrected scale.
e) Built in feedback auto-scaling, so all notes will have the same decay time
HF Damp filter (LPF) in the feedback line for realistic simulation of plucked strings
f) Automatic pitch adjustment in function of the Damp factor
g) Built in automatic input DC filter with variable cutoff for DC peak abatement
h) Removal of ground (noise) spectrum for a cleaner sound
j) Every parameter is properly scaled in relation to the sample rate, so the module always produces sounds identically.
k) Suitable for polyphonic usage

About back-fed delay.
Back-fed delay can be expressed by the following equation:
y[t] = x[t-d] + fb * y[t-d]
where x is the input signal, y is the output signal, d is the delay amount in samples and fb is the feedback factor. The result is similar to that of a feedback comb filter, with the difference that harmonic peaks with both positive and negative feedback factors are always added to the original signal (i.e. resonated). This symmetrical behaviour makes back-fed delay ideally suited for Karplus-Strong / delay-based sound synthesis than a comb filter.

Notes about DC Filtering.
When using a positive feedback, the delay line will unavoidably produce equally spaced spectral peaks at positions NF, where F is the resulting pitch frequency and N is an integer starting from zero: this implies that a DC peak will always be present. A suitable high-pass input filter is included in the module, whose cutoff frequency is always half of pitch frequency to minimize any possible effect on the timbre of the audio output.

The plugs.

Power: When the Input plug goes static (no input signal), the module will become idle once the delay line stops ringing. This may or may not happen however, depending on feedback settings and other hard to predict conditions. So in order to save CPU power, the module can be completely turned off when not in use by toggling this switch.
Clr:
Initializes the delay buffer and all filter variables to a clean state. Any decaying sounds are interrupted.
Input:
The audio input signal. Static updates are not supported, so as not to saturate the waveguide with DC (every static input value before going idle is zeroed)
Pitch:
Pitch in octaves per volt. The same scaling as the SE Oscillators. The kHz/V control scale is not supported.
FB:
This voltage controls the Feedback amount: -10V = -100%, 10V = 100%.
Please note that this value does not correspond linearly to the actual feedback factor from the formula above: a linearity correction is applied internally for easier adjustment.
About feedback.
Positive feedback: This results in a comb filter with all possible harmonics Note: the harmonic at zero is filtered out if DC Filter is enabled.
Negative feedback: This results in a comb filter with odd harmonics only and half the specified pitch (no DC peak is present and the DC filter is not active when feedback is negative).
Auto Scale FB:
Automatically scales feedback factor in relation to pitch, to ensure all notes will decay at the same rate. Please remember that when a non-zero Damp factor is specified, higher pitched notes will always tend to decay faster.
Remove GND:
Removes any residual input signal or noise (ground signal) from the output spectrum, so notches truly dip to zero, and to give a cleaner sound
Damp:
A-dimensional feedback HF Damp value (automatically adjusted in relation to the sample rate). 0V = no damping factor, 10V = 100% damping.
DC Filter:
Enables removal of the DC voltages when a positive feedback is specified.

The Digital Waveguide module

This is a very basic Karplus-Strong synthesizer. There’s no filter included in the output, and no VCA either, as the sound decays naturally.
The sound generation is purely from the white/pink noise source. The sound is controlled by the Attack Decay times of the noise pulse, also by the feedback/damping settings on the Digital Waveguide.
Filtering and a further VCA/ADSR can be added as required.
Interesting sounds can also be produced by using a VCO as the input for the DW module, and using the ADSR module to change the pitch of the oscillator to produce a “chirp” to feed into the DW.