# Physical plucked string modeling using the Karplus-Strong algorithm

**URL:** <https://community.wolfram.com/t/physical-plucked-string-modeling-using-the-karplus-strong-algorithm/24565>\
**Category:** Staff Picks\
**Tags:** audio-and-music, physics, graphics-and-visualization, modeling, staff-pick\
**Created:** [September 17, 2024, 5:34am UTC](https://community.wolfram.com/t/physical-plucked-string-modeling-using-the-karplus-strong-algorithm/24565 "2024-09-17T05:34:13Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![willchoikim](https://yyz1.discourse-cdn.com/wolfram/user_avatar/community.wolfram.com/willchoikim/32/15538_2.png) [@willchoikim](https://community.wolfram.com/u/willchoikim)\
**Post date:** [September 17, 2024, 5:34am UTC](https://community.wolfram.com/t/physical-plucked-string-modeling-using-the-karplus-strong-algorithm/24565/1 "2024-09-17T05:34:13Z")

</div>

![kssynth.gif](https://global.discourse-cdn.com/wolfram/original/2X/5/587f78b801752edd3fdc6cf10fce821c158cf91f.gif)

[Open in Wolfram Cloud ↗](https://www.wolframcloud.com/obj/2f2bb43a-95e9-4674-940b-ba2974bd9e92)

[DOWNLOAD-DESKTOP-NOTEBOOK.nb](https://community.wolfram.com/uploads/short-url/aVuWfgXwEVS3pLw6OIU4D85iy5q.nb) (17.6 MB)

---

<div class="post-metadata">

**Author:** ![wolframcommunity](https://yyz1.discourse-cdn.com/wolfram/user_avatar/community.wolfram.com/wolframcommunity/32/8335_2.png) [@wolframcommunity](https://community.wolfram.com/u/wolframcommunity)\
**Post date:** [September 17, 2024, 4:52pm UTC](https://community.wolfram.com/t/physical-plucked-string-modeling-using-the-karplus-strong-algorithm/24565/2 "2024-09-17T16:52:29Z")

</div>

![news-congrads-kkluyshnik-02-04-19.jpg](https://global.discourse-cdn.com/wolfram/original/3X/6/a/6a310c2d0904616faf4e6e148260c9f29ab9f4eb.jpeg) – you have earned _ **Featured Contributor Badge** _ ![2015-11-02_10-07-11.png](https://global.discourse-cdn.com/wolfram/original/3X/5/0/50e59c9ead62f729e7130d3ea1482555a75602b6.png)  
Your exceptional post has been selected for our editorial column _ **Staff Picks** _ [http://wolfr.am/StaffPicks](http://wolfr.am/StaffPicks) and [Your Profile](http://community.wolfram.com/web/willchoikim) is now distinguished by a _ **Featured Contributor Badge** _ and is displayed on the [Featured Contributor Board](https://community.wolfram.com/people). Thank you!

---

<div class="post-metadata">

**Author:** ![jschrier](https://yyz1.discourse-cdn.com/wolfram/user_avatar/community.wolfram.com/jschrier/32/2242_2.png) [@jschrier](https://community.wolfram.com/u/jschrier)\
**Post date:** [September 20, 2024, 3:10pm UTC](https://community.wolfram.com/t/physical-plucked-string-modeling-using-the-karplus-strong-algorithm/24565/3 "2024-09-20T15:10:00Z")

</div>

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

```auto
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"]}]

```
