-d -odac --messageolevel=2
; -odac -d -+rtaudio=jack -b 100 -B 4096 --messageolevel=2
; -d -m0 -W -o tt.wav
sr = 44100 ; サンプリング周波数
kr = 4410 ; 制御信号周波数
ksmps = 10 ; それらの比
nchnls = 2 ; 出力チャネル数
; Initialize the audio mixer.
gamix init 0
gilisten00 OSCinit 56700
gilisten02 OSCinit 56702
instr 1 ; SIMPLE OSCIL WITH ENVELOPE
; linen xamp, irise, idur, idec
k1 linen 1, 1, p3, p3
a1 oscil k1*p4, p5, 1 ; p5=freq, p6=waveshape
; Add the source signal to the audio mixer.
gamix = gamix + a1
endin
; Instrument #99 (highest instr number executed last)
instr 99
kori1 init 0
kori2 init 0
kori3 init 0
kk OSClisten gilisten00, "/ori", "fff", kori1, kori2, kori3
if (kk == 0) goto done
kpan = (kori1-210)/180.0*$M_PI
done:
kk OSClisten gilisten02, "/ori", "fff", kori1, kori2, kori3
if (kk == 0) goto done02
kpan = (kori1-210)/180.0*$M_PI
done02:
kpanl0 = cos(kpan)
kpanr0 = sin(kpan)
kpanl port kpanl0, 0.02
kpanr port kpanr0, 0.02
; outs aout*kpanl, aout*kpanr
printks "kpanl=%f, ko1=%f, ko2=%f, ko3=%f\n",0.1, kpanl, kori1, kori2, kori3
; a99 distort1 gamix, 5.0, 0.5, 0, 0
a99 distort1 gamix, 5.0*(1-kori2/100), 0.5, 0, 0
denorm a99
; aoutL, aoutR freeverb ainL, ainR, kRoomSize, kHFDamp[, iSRate[, iSkip]]
; aL, aR freeverb a99, a99, 0.99, 0.98, sr, 0
aL, aR freeverb a99*kpanl, a99*kpanr, 0.99, 0.98, sr, 0
; outs (a99 + aL)*0.5, (a99 + aR)*0.5
outs aL*0.6+gamix*0.2 , aR*0.6+gamix*0.2
; outs (aL*0.6+gamix*0.2)*kpanl, (aR*0.6+gamix*0.2)*kpanr
; Empty the mixer for the next pass.
gamix = 0
endin
f1 0 8192 10 1 ; 正弦波を表すテーブル
; Make sure the filter remains active.
i 99 0 250
e