Physical plucked string modeling using the Karplus-Strong algorithm

kssynth.gif

DOWNLOAD-DESKTOP-NOTEBOOK.nb (17.6 MB)

5 Likes

news-congrads-kkluyshnik-02-04-19.jpg – you have earned Featured Contributor Badge 2015-11-02_10-07-11.png
Your exceptional post has been selected for our editorial column Staff Picks http://wolfr.am/StaffPicks and Your Profile is now distinguished by a Featured Contributor Badge and is displayed on the Featured Contributor Board. Thank you!

This is a very nice explication, but it is also perhaps worth noting that the built-in AudioDelay function can be used to implement Karplus-Strong synthesis (this is one of the “Neat Examples”). For example:

freq = 60;
feedback = 0.99;


AudioDelay[
    AudioGenerator["Pink", .01], 1/freq, feedback, 
    PaddingSize -> 5] (* padding runs the audio longer than the brief initial impulse *)

(* another version with a low-pass cutoff filter *)    
AudioDelay[
    AudioGenerator["Pink", .01], 1/freq, feedback, 
    PaddingSize -> 5, Method -> {"LowpassCutoff" -> Quantity[8000, "Hertz"]}]
2 Likes