What is Karplus Strong Synthesis?
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”
- 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)
- This excitation is output and simultaneously fed back into a delay line L samples long.
- 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.
- The filtered output is simultaneously mixed into the output and fed back into the delay line.
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.
More details: Tuning the string
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.
Synthesizers that use Karplus Strong.
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.
Basic Karplus-Strong Synthesizer.
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.
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.
The Karplus-Strong delay Module is available from: https://github.com/getdunne/synthedit-modules/tree/master/MSVC/modules64
Switching between Pink and White noise gives a noticeably different end result, as do other sound sources with a wide harmonic spectrum.
There is also an alternative 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 really do 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.
Using the ED Digital Waveguide.
In this layout there are a few additions:
1) There’s an ADSR feeding the Pitch plug of the Oscillator so that if a tone is used rather than noise, the pitch can be swept introducing a “Chirp” option. This doesn’t affect the output pitch, just the harmonic structure.
2) Due to the Digital Waveguide’s Delay Plug having the options of Samples or kHz we need a Unit Converter (Volts) module with its mode set to Volts to kHz in it’s properties.
This is the Plug that controls the output pitch.
3) The Digital Waveguide can use negative or positive feedback, and has feedback damping both of which greatly adds to the control over timbre.
There’s no VCF included as the Feedback, Damping, and Chirp setting give quite a wide range, but there’s no reason why you shouldn’t add one if you want to add some resonance to the audio, or a filter sweep effect.
Note: It’s best to set the value of the Input DC filter plug to 100.
Gate Plug:
You could also connect the Gate plug to the Gate Plug on the Volts to CV2 module. The gate controls feedback blanking. When switched high (>0), feedback will grow from zero to its specified value in a very short time, just to avoid clicks. When switched low again (<=0), the feedback will decay to zero as quickly as specified by the FB Release pin. Using this feedback “blanking” mechanism allows for very realistic plucked string simulation, other than muting gracefully the delay line when used in mono mode every time a new note is pressed, to silence any “tail” of a previous note.
When this feature is not needed (no key controlled feedback blanking is required) the gate line can be left unconnected and set to high (it’s default)
Leave a Reply