2003/8/23 平野拓一(東京工業大学)
2003/8/23 Takuichi Hirano (Tokyo Institute of Technology)
In[1]:=
![SetDirectory["c:/hira2/public_html/hobby/edu/sonic_wave/envelope/fig_math_doc"]](HTMLFiles/index_1.gif)
Out[1]=

In[2]:=

In[3]:=
![WaveFormPiano = ReadSoundfile["GrandPiano.wav", PrintHeader -> True] ;](HTMLFiles/index_4.gif)







音を出して確認
In[4]:=
![ListPlay[WaveFormPiano, SampleRate -> 22050, PlayRange -> {-2^16, 2^16}]](HTMLFiles/index_12.gif)
![[Graphics:HTMLFiles/index_13.gif]](HTMLFiles/index_13.gif)
Out[4]=

In[5]:=
![ListPlot[WaveFormPiano,  ImageSize -> {160, 120},  PlotRange -> {-2^16, 2^16},  PlotJoin ... gt; None,  FrameLabel -> {"Time", "Amplitude", "", ""}]](HTMLFiles/index_15.gif)
![[Graphics:HTMLFiles/index_16.gif]](HTMLFiles/index_16.gif)
Out[5]=

[入力パラメータ]
smprate: wave ファイルのサンプリングレート
freq: 解析する音の周波数(うまく1周期を切り出すために指定)
n1: 切り出しを開始するリスト要素の開始番号
In[6]:=
![smprate = 22050 ; freq = (27.5 * 2^3) * (2^1/12)^3 ; t = 1/freq ; n1 = 20000 ; n = Floor[(t/1) ... rameLabel -> {"Time", "Amplitude", "", ""}] ; n1 = n ;](HTMLFiles/index_18.gif)
![[Graphics:HTMLFiles/index_19.gif]](HTMLFiles/index_19.gif)
In[22]:=
![<< Graphics`Graphics` ; FWaveFormPiano2 = Fourier[WaveFormPiano2] ; FWaveFormPiano2 = Ta ... "},  BarStyle -> {RGBColor[0, 1, 1]},  BarEdgeStyle -> {},  BarGroupSpacing -> 0] ;](HTMLFiles/index_20.gif)
![[Graphics:HTMLFiles/index_21.gif]](HTMLFiles/index_21.gif)
![[Graphics:HTMLFiles/index_22.gif]](HTMLFiles/index_22.gif)
In[29]:=
![freq = 440 * (2^1/12)^3 ; t = 1/freq * 1 ; dur = 1.0 ; n2 = Ceiling[dur/t] ; WaveFormPiano3 =  ...  {i, 1, n2}]] ; ListPlay[WaveFormPiano3, SampleRate -> 22050, PlayRange -> {-2^16, 2^16}] ;](HTMLFiles/index_23.gif)
![[Graphics:HTMLFiles/index_24.gif]](HTMLFiles/index_24.gif)
In[35]:=

[Reference]
Roland SC-88 VL, 取扱説明書, p.21
In[36]:=
![AttackTime = 0.01 * dur ; DecayTime = 0.9 * dur ; RelaseTime = 0.0 * dur ; AttackLevel = 1 ; S ... t; None,  FrameLabel -> {"Time", "Amplitude", "", ""}]](HTMLFiles/index_26.gif)
![[Graphics:HTMLFiles/index_27.gif]](HTMLFiles/index_27.gif)
![[Graphics:HTMLFiles/index_28.gif]](HTMLFiles/index_28.gif)
Out[49]=

In[50]:=

In[51]:=
![ListPlay[WaveForm4, SampleRate -> 22050, PlayRange -> {-2^16, 2^16}] ;](HTMLFiles/index_31.gif)
![[Graphics:HTMLFiles/index_32.gif]](HTMLFiles/index_32.gif)
In[52]:=
![ListPlot[WaveForm4,  ImageSize -> {160, 120},  PlotRange -> {-2^16, 2^16},  PlotJoined - ... gt; None,  FrameLabel -> {"Time", "Amplitude", "", ""}]](HTMLFiles/index_33.gif)
![[Graphics:HTMLFiles/index_34.gif]](HTMLFiles/index_34.gif)
Out[52]=

Converted by Mathematica (August 25, 2003)