@zhongwei1234
2017-12-13T16:16:16.000000Z
字数 1364
阅读 68
==
钟伟 2015301020164
一. 问题
乐器拨动琴弦后,琴弦振动,产生驻波,有基频有高次谐频,一起构成了乐器独有的音质。其中音调是所谓的基频[1]。
例如吉他
琴弦在初始时由人的手拎起,成一个三角形[2]

1.方程
波动方程为我们熟知
参考课本有 数值计算式
当我们知道了第n步以及第n-1步的情况,便可以通过上式得到第n+1步的结果。其中的边界条件为
2.求解
A.如果初始是个峰
代码
import matplotlib.pyplot as pltimport mathplt.figure(figsize=(15,15))plot_cx=[]plot_cy=[]for i in range(total_M+1):plot_cx.append(i*constant_dx)plot_cy.append(Cy[0][i])plt.subplot(12, 1, 1)plt.title("problem 6.12(Gaussian profile)")plt.xlim(0,1)plt.ylim(-1,1)plt.plot(plot_cx,plot_cy,color='black',label="0")for nt in range(11):plot_cx=Noneplot_cy=Noneplot_cx=[]plot_cy=[]for i in range(total_M+1):plot_cx.append(i*constant_dx)plot_cy.append(Cy[(nt+1)*8][i])plt.subplot(12, 1, nt+2)plt.xlim(0,1)plt.ylim(-1,1)plt.plot(plot_cx,plot_cy,color='black',label=str(nt))plt.show()plot_ct=[]plot_cyt=[]Ctx=0.5Nposition=int(Ctx/constant_dx)for i in range(total_N+1):plot_ct.append(i*constant_dt)plot_cyt.append(Cy[i][Nposition])plt.figure(figsize=(15,15))plt.title("problem 6.12(Gaussian profile)")plt.plot(plot_ct,plot_cyt,color='black')plt.xlabel("Time(s)")plt.ylabel("y(m)")plt.show()
再做一个频率分析
B改成吉他初始的三角形
具体及频谱

A类代表演奏过程中的一些情况,因为形成有弧度的包。B类代表表演初始的一次清脆的拨弦。
音色的区别在于谐频成分。对比可以明显看到
感谢董京学长 上官学姐的参考
--