Envelope

2003/8/23 平野拓一(東京工業大学)
2003/8/23 Takuichi Hirano (Tokyo Institute of Technology)

1周期の波形を作る

[入力パラメータ]
smprate: wave ファイルのサンプリングレート
freq: 音の周波数

In[1]:=

smprate = 22050 ; freq = (27.5 * 2^3) * (2^1/12)^3 ; t = 1/freq ; n1 = Floor[(t/1) * smprate]  ... t; None,  FrameLabel -> {"Time", "Amplitude", "", ""}]

[Graphics:HTMLFiles/index_2.gif]

Out[7]=

-Graphics -

1周期をいくつも並べて周期波形を作り、音を聴いてみる

In[8]:=

freq = 440 * (2^1/12)^3 ; t = 1/freq * 1 ; dur = 1.0 ; n2 = Ceiling[dur/t] ; WaveFormSin3 = Fl ... 2, {i, 1, n2}]] ; ListPlay[WaveFormSin3, SampleRate -> 22050, PlayRange -> {-2^16, 2^16}] ;

[Graphics:HTMLFiles/index_5.gif]

波形を選ぶ

In[14]:=

WaveForm3 = WaveFormSin3 ;

エンベロープを作る

[Reference]
Roland SC-88 VL, 取扱説明書, p.21

In[15]:=

AttackTime = 0.2 * dur ; DecayTime = 0.2 * dur ; RelaseTime = 0.2 * dur ; AttackLevel = 1 ; Su ... t; None,  FrameLabel -> {"Time", "Amplitude", "", ""}]

[Graphics:HTMLFiles/index_8.gif]

[Graphics:HTMLFiles/index_9.gif]

Out[28]=

-Graphics -

エンベロープをかける

In[29]:=

WaveForm4 = EnvelopeForm3 * WaveForm3 ;

In[31]:=

ListPlay[WaveForm4, SampleRate -> 22050, PlayRange -> {-2^16, 2^16}] ;

[Graphics:HTMLFiles/index_13.gif]

In[32]:=

ListPlot[WaveForm4,  ImageSize -> {160, 120},  PlotRange -> {-2^16, 2^16},  PlotJoined - ... bel -> {"Relative time", "Relative amplitude", "", ""}]

[Graphics:HTMLFiles/index_15.gif]

Out[32]=

-Graphics -


Converted by Mathematica  (August 25, 2003)