Synthesize the Sound of a Vibrating String
Perform Karplus–Strong synthesis by adding a short delay with a high feedback value to a burst of noise. This will simulate the sound of a vibrating string.
In[1]:=
freq = 60;
feedback = 0.99;
AudioDelay[AudioGenerator["Pink", .01], 1/freq, feedback, 1,
PaddingSize -> 5,
Method -> {"LowpassCutoff" -> Quantity[8000, "Hertz"]}]
Simulate the strumming of a chord.
In[2]:=
chord = {130.81, 164.81, 196, 261.62};
In[3]:=
Table[AudioDelay[
AudioPad[AudioGenerator["Pink", .01], {RandomReal[.2], 0}],
1/chord[[i]], feedback, 1, PaddingSize -> 5,
Method -> {"LowpassCutoff" -> Quantity[8000, "Hertz"]}], {i,
Length[chord]}] // Mean