振動する弦の音を合成する
突発的ノイズに,フィードバックの大きいショートディレイを加えることによって,Karplus–Strong合成を実行する.これは振動する弦の音のシミュレーションである.
In[1]:=
![Click for copyable input](assets.ja/synthesize-the-sound-of-a-vibrating-string/In_23.png)
freq = 60;
feedback = 0.99;
AudioDelay[AudioGenerator["Pink", .01], 1/freq, feedback, 1,
PaddingSize -> 5,
Method -> {"LowpassCutoff" -> Quantity[8000, "Hertz"]}]
和音を爪弾くシミュレーション.
In[2]:=
![Click for copyable input](assets.ja/synthesize-the-sound-of-a-vibrating-string/In_24.png)
chord = {130.81, 164.81, 196, 261.62};
In[3]:=
![Click for copyable input](assets.ja/synthesize-the-sound-of-a-vibrating-string/In_25.png)
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