-d -odac ; -d -m0 -odac ; -d -m0 -W -o tt.wav sr = 44100 ; サンプリング周波数 kr = 4410 ; 制御信号周波数 ksmps = 10 ; それらの比 nchnls = 2 ; 出力チャネル数 ; instr 1 ; a1 oscil p4, p5, 1 ; 単純な発振器 ; out a1 ; 出力 ; endin gkvol init 0.0 ; Initialize the audio mixer. gamixL init 0 gamixR init 0 gilisten OSCinit 56700 gktouch1 init 0 gktouch2 init 0 instr 1 ; SIMPLE OSCIL WITH ENVELOPE ktouch1 init 0 ktouch2 init 0 kk OSClisten gilisten, "/touch", "ff", ktouch1, ktouch2 if (kk==1) then gktouch1 = ktouch1 gktouch2 = ktouch2 endif ; linen xamp, irise, idur, idec ;k1 linen p4, p7, p3, p8 ; p3=dur, p4=amp, p7=attack, p8=release ;k1 linen 1, 0.01, p3, p3 k1 linseg 0, 0.01, 1, p3*0.1,0.5, p3*0.2,0.2, p3*0.7,0 a1 oscil k1*p4, p5, 1 ; p5=freq, p6=waveshape a1 oscil k1*p4, p5*(1+gktouch1/200), 1 ; p5=freq, p6=waveshape kstereo = 1 aL0 = a1*( (p6)*kstereo+0.5*(1-kstereo) ) aR0 = a1*( (1-p6)*kstereo+0.5*(1-kstereo) ) ; outs aL0*1.25, aR0*1.25 outs aL0*1.25*gkvol, aR0*1.25*gkvol ; Add the source signal to the audio mixer. gamixL = gamixL + aL0 gamixR = gamixR + aR0 endin ; Instrument #99 (highest instr number executed last) instr 99 ; fade in gkvol linseg 0.0, 20,0.6, 90,0.6, 10,0.1 ; aoutL, aoutR freeverb ainL, ainR, kRoomSize, kHFDamp[, iSRate[, iSkip]] denorm gamixL denorm gamixR aL, aR freeverb gamixL, gamixR, 0.7, 0.1 ;outs aL*2.8, aR*2.8 ;outs aL*2.8*gkvol, aR*2.8*gkvol outs aL*2.8*gkvol*(1.0-gktouch2/750), aR*2.8*gkvol*(1.0-gktouch2/750) ;aL1 lowpass2 aL, 1200, 1 ;aR1 lowpass2 aR, 1200, 1 ;outs aL1 , aR1 gamixL = 0 gamixR = 0 endin f1 0 8192 10 1 ; 正弦波を表すテーブル ; i1 0 1 20000 1000 ; 1kHzの音を1秒間発生させる ; Make sure the filter remains active. i 99 0 320 e