
DOWNLOAD-DESKTOP-NOTEBOOK.nb (17.6 MB)
– you have earned Featured Contributor Badge ![]()
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"]}]