Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Karplus–Strong string synthesis
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
== Tuning the string == The [[fundamental frequency]] (specifically, the lowest nonzero resonant frequency) of the resulting signal is the lowest frequency at which the unwrapped phase response of the delay and filter in cascade is <math>-2\pi</math>. The required [[phase delay]] ''D'' for a given fundamental frequency ''F''<sub>0</sub> is therefore calculated according to ''D'' = ''F''<sub>''s''</sub>/''F''<sub>0</sub> where ''F''<sub>''s''</sub> 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 [[Digital delay line|fractional delay]] often needed for fine tuning the string below JND ([[Just-noticeable difference|Just Noticeable Difference]]), [[interpolation|interpolating filters]] are used with parameters selected to obtain an appropriate phase delay at the fundamental frequency. Either [[Infinite impulse response|IIR]] or [[Finite Impulse Response|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.8''s''(4) + 0.2''s''(5)). If the phase delay varies with frequency, [[harmonic]]s 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. A demonstration of the Karplus-Strong algorithm can be heard in the following [[Vorbis]] file. The algorithm used a loop gain of 0.98 with increasingly attenuating first order lowpass filters. The pitch of the note was A2, or 220 Hz. {{listen | filename = Karplus-strong-A2.ogg | title = Karplus-Strong #1 | description = ''F''<sub>1</sub> = 220Hz }} Holding the period (= length of the delay line) constant produces vibrations similar to those of a string or bell. Increasing the period sharply after the transient input produces drum-like sounds.
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)