2010

  !"#$%&'()*+,<kitahara@cssa.chs.nihon-u.ac.jp>

http://virgo.cssa.chs.nihon-u.ac.jp/~kitahara/
1./?
0123456789:;<=>?@ABC MOTIF XF6

http://www.yamahasynth.com/DEFG JUNO-STAGE

http://www.roland.co.jp/D4HI

J:6K5LMNOPQ67RST6U NVWX04YUR
Z[P\]4^_D`5abcdefg>

hijklmnU>o;jpU21qr[s4kM<t#qu_<mnT5|[x



4vw

G454|[}~D_<5|[_>T4
m6qr[N5|[_>T4
EF%j.U>Rhivw G45xy0z{

k45_>qr[0 41`
uFVfnU>
35;<=>3\4:;<

6TDde=>0f5_Dx=+
+ UU =PCM;<4235|[W5`4U>
5

k4+¡¢£¤¥J¢|W;<234K5LMqr[kf¦r§¨5_>qr[k4ª«¬23¦r§©

4

|¢
4#F³´µ=0`
5¶P5aj·¸fg>
N=¹º=>05¶»06>Rn­4Z[®=0`G¯45j1°±²n>4
f1`4EF%_>T4
14¼½]f¾D¿]=

5

5./?

#qujÀÁ®=®mnTÀÁjÂ4ÀÁ®=njÃÄ:ÅDÆmn>

ÇÈj®mnÉ±j5ÊË=>®TÌ1®TÍ´fÎ.Ï>

46`4jÒ.TDÓTD=>Ô´j`ÕµÖÏ]f×>ØÙ´N]T1R0U
y#qujÀÁ74Ú­U®=4µ0Û=tÐÑ

http://www.wakariyasui.sakura.ne.jp/2-2-0-0/2-2-1-1onnpa.html
6
http://www.ne.jp/asahi/tokyo/nkgw/gakusyu/hadou/tate-yoko-wave/wave1.html

54ÜfÛ]Ýy(t) = A sin(2 f t)

yÞßANÞn4 gmR
t54 gm1/f

f = Þ´Ü NàÜR
+54âm

NÞn4ámR

Þß»

Þß»








7f1`4_.]Ý/_nãU4µyt

æ4`ç46t 0 y 4èéÛ0_<=>æ41Ãåf|[jêëì>4f`1/48000°í0±îU_<U> N£0UR

nFreeMat._<t [°]01/48000
2/48000äää
10/48000äää
26/48000
27/48000
28/48000äää
54/48000
55/48000äää
81/48000
82/48000
93/48000äääy
0.00000.00570.1149äää
0.5446
äää
0.99790.99990.9991
äää
0.0314-0.0261äää-0.9989-0.9999-0.9979äääNm­åÏR8FreeMatï´

9FreeMat.`qr[myTU}~ðÏñ`ò4óôõöf
a = 20b = 10c=a+b10

11f1`÷á`54_.
FreeMatò4óôõöf
t = 0 : 1/48000 : 1;
f = 440;a = 0.1;
y = a * sin(2 * pi * f * t);/Ûømn]yöj`¡¢£4ù1ôúö0jfgU]=&û
t = 0 : 1/48000 : 1;t4ü1`1/48000ýf0µ­1]f0]=

f = 440;àÜ1440[Hz]0]=a = 0.1;
Þß1`5jþn>DD4Þß40.10]=y = a * sin(2 * pi * f * t);y4ü`y(t) = A sin(2 f t) f}~]=

12

fgT]Ý
FreeMatplot(t, y);0óôõöf]Ýìn.Ï6U
7

jµ=`j\ n 6.].T

13

4¼s Ûø]Ý
FreeMatò4óôõöf]Ý
plot(t(1:1000), y(1:1000));y4ô`1t4ô`1µ­1000µ­1000

4|[4 4|[4 14

fgTU]Ý
FreeMatò4óôõöf]Ý
wavplay(y, 48000);0U5j`1°±Gµ­>1f=

/6U0g1`G45¶j06.U>jìD]=]Ý
15

]f4kEF%]Ý]f1qr[myTU}~671Ò1Ò]Tj`!=>41 "64f`#W$%&g]Ý4`qr[myTUk' ðUT4
EF%0UU]=

(º4EF%
EF%(1)function maketonej).T­`
maketone.m0U
*+f$%t = 0 : 1/48000 : 1;
f = 440;a = 0.1;
y = a * sin(2 * pi * f * t);
16wavplay(y, 48000);EF%Ò`EF%4*+ maketoneóôõ,àÜPÞßUU-ñ
172\45x
2\45µ­6>.5_.]Ýmg/74EF%(º4ðg0`Ò]Ý
EF%(2)function maketonet = 0 : 1/48000 : 1;
f1 = 440;
f2 = 660;
a1 = 0.1;
a2 = 0.1;
y = a1 * sin(2 * pi * f1 * t) + ...
a2 * sin(2 * pi * f2 * t);
wavplay(y, 48000);àÜPÞßUU-`gnU6.5PgT6U.5_.
18

1234 àÜ0G§¦456
1V8[9º:äää

G
G#§§#
¦
#
##
#F
F#

àÜj1/2
130.8128138.5913
146.8324
155.5635
164.8138174.6141184.9972
195.9977
207.6523
220.0000
233.0819
246.9147[Hz]

ù74G
G#§§#¦
#
###F
F#àÜj
261.6256277.1826
293.6648
311.1270
329.6276
349.2282
369.9944
391.9954
415.3047
440.0000
466.1638
493.8833[Hz]

1V8[9æ:G
G#§§#¦
###523.2511
554.3653
587.3295
622.2540
659.2251698.4565äää
739.9888
783.9909
830.6094
880.0000
932.3275
987.7666
[Hz]

#F
F#
nV8[9æj> » àÜj2n
192\45j1\6>!?
;4àÜ440Hz`;880Hz]Ý
EF%(3)function maketonet = 0 : 1/48000 : 1;f1 = 440;
f2 = 880;
a1 = 0.1;
a2 = 0.1;
y = a1 * sin(2 * pi * f1 * t) + ...
a2 * sin(2 * pi * f2 * t);
wavplay(y, 48000);76D]Tµ?
f2jf14ôÝ7240gs `1\454>1
f2ac-`µ]Ý

20

3\451\6>!?
mg/745`1320Hz45d]Ý
EF%(4)function maketonet = 0 : 1/48000 : 1;
f1 = 440;
f2 = 880;
f3 = 1320;
a1 = 0.1;
a2 = 0.1;
a3 = 0.1;
y = a1 * sin(2 * pi * f1 * t) + ...
a2 * sin(2 * pi * f2 * t) + ...
a3 * sin(2 * pi * f3 * t);
wavplay(y, 48000);76D]Tµ? ô­1\45]Tµ?
21

55=>>6?

ì><O`àÜj4=Ü4<O3;y>0`1\45>
440Hz

BNB5R@880Hz@

âCN5R

1320Hz
A
3\4.

D;522

P.
EF%(3)4 f2 E\-`74Ú­UnT­

1.

2\45>6>µ`
GH

EF%(3)]T1 EF%(4)4ÞßNa1, a2, a3RUU

2.

->0N5aRj74-F=>µ`
GH23]0=Ü4àÜ4<O3;y>0`1\45>

nIn4<O4Þß->0`5aj->âUàÜ4<O4Þßj
N¨FK¨46R

gU0`JâU5âUàÜ4<O4ÞßjmU0`LU5
NW¨46RTs`ns fM4ù42345NOfg> f1
6U

P!Q6µ.TRS5¶·¸Nsösö5jmÏ6>67R



T9F¨



ó235N 54âmj6UR

24

1U4 |¢f.T7gEF%4ÒV
1. ç4EF%`mysynth.m0U*+f$%=>

function mysynthglobal sliders
fig = figuresliders = [ makeslider(20, 20, 's1')
makeslider(40, 20, 's2')
makeslider(60, 20, 's3')
makeslider(80, 20, 's4')
makeslider(100, 20, 's5') ]buttons = [ makebutton('Do', 20, 180, '262')
makebutton('Do#', 50, 140, '277')
makebutton('Re', 80, 180, '294')
makebutton('Re#', 110, 140, '311')
makebutton('Mi', 140, 180, '330')
makebutton('Fa', 200, 180, '349')
makebutton('Fa#', 230, 140, '370')
makebutton('So', 260, 180, '392')
makebutton('So#', 290, 140, '415')
makebutton('La', 320, 180, '440')
makebutton('La#', 350, 140, '466')
makebutton('Ti', 380, 180, '494') ]function h = makeslider(x, y, tag)h = uicontrol('Style', 'slider', 'Position', [x, y, 10, 100], ...
'Tag', tag)function h = makebutton(text, x, y, f)
h = uicontrol('Style', 'pushbutton', 'Position', [x, y, 50, 30], ...
25'String', text, 'Callback', ['maketone2(' f ')'])

2. ç4EF%`maketone2.m0U
*+f$%=>

function maketone2(f)global sliders
fs = 48000;
t = 0 : 1/fs : 1;
a1 = 0.1 * get(sliders(1), 'Value');
a2 = 0.1 * get(sliders(2), 'Value');
a3 = 0.1 * get(sliders(3), 'Value');
a4 = 0.1 * get(sliders(4), 'Value');
a5 = 0.1 * get(sliders(5), 'Value');y = a1 * sin(2 * pi * 1 * f * t) + ...
a2 * sin(2 * pi * 2 * f * t) + ...
a3 * sin(2 * pi * 3 * f * t) + ...
a4 * sin(2 * pi * 4 * f * t) + ...
a5 * sin(2 * pi * 5 * f * t);
wavplay(y, fs);

3. FreeMat4W{óôõ,0`mysynth0óôõ,

mysynth.m 0 maketone2.m 1`X4Web¨µ­³YEGfg]=26