振弦声音同步
通过对爆裂噪音添加高反馈值的短时间延迟来进行 Karplus–Strong 合成. 这将实现振弦声音的仿真.
In[1]:=
freq = 60;
feedback = 0.99;
AudioDelay[AudioGenerator["Pink", .01], 1/freq, feedback, 1,
PaddingSize -> 5,
Method -> {"LowpassCutoff" -> Quantity[8000, "Hertz"]}]
模拟和弦的扫弦.
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