; ; ; ============================================== sr = 44100 kr = 4410 ksmps = 10 nchnls = 2 gaReverbL init 0 ; global reverb send for left channel gaReverbR init 0 ; global reverb send for right channel gaRvb2 init 0 ; global reverb send for second, stranger reverb ;;;; ;;;; loop a file ;;;; instr 1 iAmp = p4 ; amplitude iCps = p5 ; cps to play iFunc = p6 ; function table iBase = p7 ; base freq of sound source iMode = p8 ; looping mode iLoopS = p9 ; loop start iLoopE = p10 ; loop end iSend = p11 ; send % for reverb iCenter = p12; center frequency for band-pass filter iWidth = p13 ; bandwidth for band-pass filter iFadeIn = p14 / 100 ; % of p3 for fade in iFadeOut = p15 / 100 ; % of p3 for fade out iUnfaded = (100-p14-p15)/100 ; percent of p3 at full volume iPanScale = 64 ; 0=hard left, iPanScale=hard right iPan = p16 ; pan factor btw 0 and iPanScale iGain = p17 ; gain boost to compensate for low amp in WAV files iDry = p18 *iGain ; portion (0-1) of signal to output dry ; fade in over first iFadeIn%, fade out over last iFadeOut% aLine linseg 0, p3*iFadeIn, 1, p3*iUnfaded, 1, p3*iFadeOut, 0 ; loop file according to parameters aSig loscil iAmp, iCps, iFunc, iBase, iMode, iLoopS, iLoopE ; iCenter == 0 means do not do a band-pass filter if iCenter == 0 goto pastFilter aSig butterbp aSig, iCenter, iWidth pastFilter: ; determing panning factor iPanL = iPanScale - iPan iPanR = iPan iPanPctL = iPanL / iPanScale iPanPctR = iPanR / iPanScale ; output signal based on aLine (fading), iPanPct[LR] (panning), ; and iGain (overall gain boost) outs aSig * aLine * iPanPctL * iGain, aSig * aLine * iPanPctR * iGain ; send all information to reverb, except gain boost gaReverbL = aSig * aLine * iSend * iPanPctL gaReverbR = aSig * aLine * iSend * iPanPctR endin ;;; loop a file, version 2 instr 2 iAmp = p4 ; amplitude iCps = p5 ; cps to play iFunc = p6 ; function table iBase = p7 ; base freq of sound source iMode = p8 ; looping mode iLoopS = p9 ; loop start iLoopE = p10 ; loop end iSend = p11 ; send % for reverb iCenter = p12; center frequency for band-pass filter iWidth = p13 ; bandwidth for band-pass filter iFadeIn = p14 / 100 ; % of p3 for fade in iFadeOut = p15 / 100 ; % of p3 for fade out iUnfaded = (100-p14-p15)/100 ; percent of p3 at full volume iPanScale = 64 ; 0=hard left, iPanScale=hard right iPan = p16 ; pan factor btw 0 and iPanScale iGain = p17 ; gain boost to compensate for low amp in WAV files iDry = p18 *iGain ; portion (0-1) of signal to output dry ; fade in over first iFadeIn%, fade out over last iFadeOut% aLine linseg 0, p3*iFadeIn, 1, p3*iUnfaded, 1, p3*iFadeOut, 0 ; loop file according to parameters aSig loscil iAmp, iCps, iFunc, iBase, iMode, iLoopS, iLoopE ; iCenter == 0 means do not do a band-pass filter if iCenter == 0 goto pastFilter2 aSig butterbp aSig, iCenter, iWidth pastFilter2: ; determing panning factor iPanL = iPanScale - iPan iPanR = iPan iPanPctL = iPanL / iPanScale iPanPctR = iPanR / iPanScale ; output signal based on aLine (fading), iPanPct[LR] (panning), ; and iGain (overall gain boost) outs aSig * aLine * iPanPctL * iGain, aSig * aLine * iPanPctR * iGain ; send all information to reverb, except gain boost gaRvb2 = aSig * aLine * iSend endin ;;;; ;;;; global reverb ;;;; modeled after reverb in looptest.orc ;;;; instr 3 iTime = p4 ; reverb time iRoll = p5 ; high-freq rolloff iOutGain = p6 ; output gain ; update global reverb signals aSigL nreverb gaReverbL, iTime, iRoll aSigR nreverb gaReverbR, iTime, iRoll ; put reverb, scaled by gain outs aSigL*iOutGain, aSigR*iOutGain ; reset reverb signal gaReverbL = 0 gaReverbR = 0 endin instr 4 ;amplitude modulation example km expseg 1, p3, p5 amod oscil p4, km*3, 6 audio oscil p4+amod, p5, 6 aenv linseg 0, p3*.1, 1, p3*.8, 1, p3*.1, 0 outs audio*aenv*.8, audio *aenv gaReverbL = audio*aenv*.5 gaReverbR = audio*aenv*.5 endin instr 5 ;ring modulation example km expseg 1, p3, p5 audio1 oscil 1, km*2, 6 audio2 oscil p4, p5, 6 aenv linseg 0, p3*.01, 1, p3*.9, 1, p3*.09, 0 outs audio1*audio2*aenv, audio1*audio2 *aenv*.8 gaReverbL = audio1*audio2*aenv*.5 gaReverbR = audio1*audio2*aenv*.5 endin instr 6 ilen = p3 iamp = p4 ifrq = cpspch(p5) ifrq1 = 1.0000 * ifrq ifrq2 = 1.1541 * ifrq ifrq3 = 1.6041 * ifrq ifrq4 = 1.5208 * ifrq ifrq5 = 1.4166 * ifrq ifrq6 = 2.7916 * ifrq ifrq7 = 3.3833 * ifrq iamp1 = 1.0000 * iamp iamp2 = 0.8333 * iamp iamp3 = 0.6667 * iamp iamp4 = 1.0000 * iamp iamp5 = 0.3333 * iamp iamp6 = 0.3333 * iamp iamp7 = 0.3333 * iamp aenv1 oscili iamp1, 1/ilen, 4 aenv2 oscili iamp2, 1/ilen, 4 aenv3 oscili iamp3, 1/ilen, 4 aenv4 oscili iamp4, 1/ilen, 4 aenv5 oscili iamp5, 1/ilen, 4 aenv6 oscili iamp6, 1/ilen, 4 aenv7 oscili iamp7, 1/ilen, 4 asig1 oscili aenv1, ifrq1, 3 asig2 oscili aenv2, ifrq2, 3 asig3 oscili aenv3, ifrq3, 3 asig4 oscili aenv4, ifrq4, 3 asig5 oscili aenv5, ifrq5, 3 asig6 oscili aenv6, ifrq6, 3 asig7 oscili aenv7, ifrq7, 3 kenv linseg 0, p3*.01, 1, p3*.97, 1, p3*.02, 0 asigall = asig1 + asig2 + asig3 + asig4 + asig5 + asig6 + asig7 outs asigall*.6*kenv, asigall*.6*kenv gaReverbL = asigall*.4 *kenv gaReverbR = asigall*.4 *kenv endin instr 7 idur = p3 iamp = p4 ifenv = 51 ; bell settings: ifdyn = 52 ; amp and index envelopes are exponential ifq1 = cpspch(p5)*5 ; decreasing, N1:N2 is 5:7, imax=10 if1 = 6 ; duration = 15 sec ifq2 = cpspch(p5)*7 if2 = 6 imax = p6 kpan = p7 aenv oscili iamp, 1/idur, ifenv ; envelope adyn oscili ifq2*imax, 1/idur, ifdyn ; dynamic amod oscili adyn, ifq2, if2 ; modulator a1 oscili aenv, ifq1+amod, if1 ; carrier kpanl = sqrt(kpan) kpanr = sqrt(1-kpan) outs a1*.7*kpanl,a1*.7*kpanr areverbenv linseg 0, idur*.3, 1, idur*.7, 1 gaReverbL = a1 * .7 * kpanr * areverbenv gaReverbR = a1 * .7 * kpanl * areverbenv endin instr 8 iorig = .05 irev = 1.-iorig igain = 1.0 ilpgain = 1.5 icgain = .1 ialpgain = 0.1 ispeed1 = p4 ispeed2 = p5 ispeed3 = p6 ispeed4 = p7 icf1 = p8 icf2 = p9 icf3 = p10 icf4 = p11 ifac = 2 ibw1 = icf1/ifac ibw2 = icf2/ifac ibw3 = icf3/ifac ibw4 = icf4/ifac ; CYCLIC AMPLITUDE ENVELOPES aenv1 oscil igain, ispeed1, 201 aenv2 oscil igain, ispeed2, 202 aenv3 oscil igain, ispeed3, 203 aenv4 oscil igain, ispeed4, 204 ; BREAK INTO BANDS ares1 reson gaRvb2, icf1, ibw1, 1 ares2 reson gaRvb2, icf2, ibw2, 1 ares3 reson gaRvb2, icf3, ibw3, 1 ares4 reson gaRvb2, icf4, ibw4, 1 ; SUM THE ENVELOPED BANDS asum = (ares1*aenv1)+(ares2*aenv2)+(ares3*aenv3)+(ares4*aenv4) ; LOWPASS AND COMB SEQUENCE alp tone asum, 1000 adright delay alp, .178 adleft delay alp, .215 asumr = asum+(adright*ilpgain) asuml = asum+(adleft*ilpgain) acr1 comb asumr, 2, .063 acr2 comb acr1+asumr,. 5, .026 acl1 comb asuml, 2, .059 acl2 comb acl1+asuml, .5, .031 acsumr = asumr+(acr2*icgain) acsuml = asuml+(acl2*icgain) ; ALLPASS COMB SEQUENCE alpo alpass asum, 3, 085 alpol comb alpo, 2.8, .526 alpor comb alpo, 2.8, .746 alol tone alpol, 500 alor tone alpor, 500 alold delay alol, .095 alord delay alor, .11 ; SUM REVERBERATION COMPONENTS arevl = (alpol*ialpgain)+acsuml+alold arevr = (alpor*ialpgain)+acsumr+alord aorig = gaRvb2*iorig ; MIX BACK ORIGINAL SIGNAL outs (arevl*irev)+aorig,(arevr*irev)+aorig gaRvb2 = 0 endin ; ============================================== f1 0 0 1 "crackles.wav" 0 4 0 f102 0 0 1 "motn.wav" 0 4 0 f103 0 0 1 "oblivion-3.wav" 0 4 0 f104 0 0 1 "oblivion-1.wav" 0 4 0 f105 0 0 1 "oblivion-2.wav" 0 4 0 f106 0 0 1 "patience.wav" 0 4 0 f7 0 0 1 "swirl.wav" 0 4 0 f3 0 512 9 1 1 0 ; basic waveform; used by gong f4 0 513 5 128 512 1 ; envelopes; used by gong f6 0 16384 10 1 ; used by ampl_mod, ring_mod and bell f51 0 513 5 1 513 .0001 ; used by bell f52 0 513 5 1 513 .001 ; used by bell ; used by second reverb f201 0 513 7 0 112 1 400 0 f202 0 513 7 0 212 1 300 0 f203 0 513 7 0 312 1 200 0 f204 0 513 7 0 412 1 100 0 ; used by flanger f301 0 512 20 1 t 0 37 54 37 63 41 178 41 210 37 ;;;; ;;;; reverb, continues for entire piece ;inst st dur time rolloff gain i3 0 273 9 .5 1 ;;;; ;;;; background rumble ; st dur ampl cps fn bas mod lpS lpE snd icf ibw in out pan gain dry i1 0 72 33333 1 1 7 2 0 50943 .8 333 30 10 25 32 6 1 i1 4 3 33333 1 1 7 2 0 50943 .8 333 63 7 25 34 5 .9 i1 5 4 33333 1 1 7 2 0 50943 .8 444 27 11 7 29 5 .9 i1 9 5 33333 1 1 7 2 0 50943 .8 555 27 13 11 37 5 .8 i1 14 9 33333 1 1 7 2 0 50943 .8 999 27 17 13 25 5 .8 i1 23 14 33333 1 1 7 2 0 50943 .8 666 23 19 17 43 5 .7 i1 37 23 33333 1 1 7 2 0 50943 .8 222 72 23 19 19 5 .6 i1 60 47 33333 1 1 7 2 0 50943 .8 666 27 29 34 49 5 .5 i1 190 63 33333 1 1 7 2 0 50943 .8 333 30 10 5 32 6 1 ;;;; swirl-4 i1 0 17 13000 1 7 3 2 0 67200 .9 666 88 31 23 27 6 1 ;;;;; pieces of oblivion.wav i1 13 22 3333 1 103 1 1 0 158119 0 0 0 20 25 32 6 1 ;;;; guitar, with phasing of loops i1 16.485 9 2700 1 102 1 1 0 295422 .1 0 0 10 5 32 6 1 ;;;; guitar, with phasing of loops i1 20.485 9 2700 1 102 1 1 0 295422 .2 0 0 1 20 37 6 1 ;;;;; pieces of oblivion.wav i1 21 34 3000 1 104 1 1 0 391169 0 0 0 13 8 39 6 1 ;;;; guitar, with phasing of loops i1 21.485 8 2700 1 102 1 1 0 295422 .2 0 0 15 15 27 6 1 ;;;; guitar, with phasing of loops i1 23.485 13 2000 1 102 3 1 0 295422 .13 0 0 9 8 44 6 1 ;;;; guitar, with phasing of loops i1 28.485 8 2700 1 102 2 1 0 295422 .08 0 0 18 7 20 6 1 ;;;;; pieces of oblivion.wav i1 34 55 2000 1 105 1 1 0 402930 0 0 0 21 34 32 6 1 ;;;; swirl-4 i1 36 53 12000 1 7 3 2 0 67200 .9 880 36 15 10 35 6 1 ;;;;; spoken line i1 43.157 27 2500 1 106 2 1 0 74495 .3 0 0 34 55 32 6 1 ;;;;; spoken line i1 52.157 9 1000 1 106 1 1 0 74495 .8 0 0 70 20 32 6 1 ; looping crackles.wav ; st dur ampl cps fn bas mod lpS lpE send icf ibw in out pan gain dry i1 54 15 33333 1 1 3 2 0 50943 1 333 30 3 9 26 6 .4 i1 57 5 24000 1 1 2 1 0 50943 .9 666 37 15 25 38 4 .5 i1 60 5 20000 1 1 2 1 0 50943 .9 1332 81 25 15 30 4 .3 ; st dur amp freq i4 60 5 5000 331 i5 63 2 6000 433 ; bell, with microtonal echoes from the gong ; st dur iamp ifq1 imax kpan i7 65 12 3000 5.09 2 .5 ; st dur iamp freq i6 65 6 6000 7.09 i6 66.2 6 5000 7.085 i6 67.3 6 4000 7.087 i6 68.6 6 2000 7.081 ; looping crackles.wav; slow fade in, abrupt fade out ; st dur ampl cps fn bas mod lpS lpE send icf ibw in out pan gain dry i1 70 3 33333 1 1 4 1 0 50943 0 333 66 99.99 .01 38 9 1 ; harmonized bell, with microtonal echo from the gong ; st dur iamp ifq1 imax kpan i7 73 6 3500 5.10 2 .3 i7 73 6 3500 5.07 2 .5 ; st dur iamp freq i6 75 6 5000 7.065 ; looping crackles.wav; slow fade in, abrupt fade out ; st dur ampl cps fn bas mod lpS lpE send icf ibw in out pan gain dry i1 75 2 33333 1 1 4 1 0 50943 0 333 66 99.99 .01 38 9 1 i1 75 2 15000 1 1 4 1 0 50943 .3 512 36 99.99 .01 38 6 1 ; harmonized bells, with, microtonal echoes from the gong ; st dur iamp ifq1 imax kpan i7 77 8 5500 5.10 2 .3 i7 77 8 5500 5.07 2 .5 ; st dur iamp freq i6 78.2 6 5000 7.065 i6 79.3 6 6000 7.067 i6 80.6 6 7000 7.061 ; sine wave sweeps turning into gong ; st dur amp freq i5 77 2 6000 333 i4 80 5 5000 666 ; st dur iamp freq i6 85 3 2500 7.08 i6 87 3 3000 7.08 i6 89 9 3500 7.08 ; looping swirl.wav with bell melody, followed by microtonal echos on gong ; st dur ampl cps fn bas mod lpS lpE send icf ibw in out pan boost dry i1 98 53 12000 1 7 3 2 0 67200 .9 880 36 15 10 35 18 1 i1 98 53 11000 1 7 3 2 0 67200 .9 600 72 10 19 23 18 1 i1 109 53 10000 1 7 3 2 0 67200 .9 900 128 10 30 53 18 1 ; st dur iamp ifq1 imax kpan i7 98 7 3500 5.06 2 .3 i7 98.66 7 3300 5.11 2 .2 i7 99 7 3600 5.10 2 .4 i7 100 7 3300 5.12 2 .4 i7 100.66 7 2250 6.01 2 .4 i7 101 7 2000 5.09 2 .4 i7 102 7 2000 5.03 2 .4 ;;;; guitar, with phasing of loops ; st dur amp cps fn bas mod lpS pE send icf ibw in out pan gain dry i1 98.485 9 2700 1 102 1 1 0 295422 .5 0 0 15 25 32 3 .3 i1 102.485 9 2700 1 102 3 1 0 295422 .4 0 0 11 20 37 4 .3 i1 103.485 8 2700 1 102 2 1 0 295422 .3 0 0 15 15 27 4 .2 i1 105.485 13 2000 1 102 1 1 0 295422 .13 0 0 28 72 44 3 .2 i1 110.485 8 2700 1 102 2 1 0 295422 .44 0 0 18 9 20 3 .3 ; st dur iamp freq i6 103.2 4 5000 7.025 i6 104.3 4 4000 7.027 i6 105.6 7 3000 7.021 ; microtonal gong sequence, echoed by same sequence in bells ; st dur iamp freq i6 112.2 6 5000 7.065 i6 112.3 6 6000 7.067 i6 112.6 6 7000 7.061 ; st dur iamp ifq1 imax kpan i7 116.2 7 3250 5.065 2 .4 i7 116.3 7 3000 5.067 2 .4 i7 116.6 7 3000 5.061 2 .4 ; followed by sine sweep and crackles.wav ; st dur amp freq i5 116.6 12 6000 413 ; st dur ampl cps fn bas mod lpS lpE send icf ibw in out pan boost dry ; crackles.wav i1 126 15 33333 1 1 3 2 .7 50943 1 333 30 15 28 26 6 .2 ; microtonal gong sequence, echoed by bells in reverse sequence ; st dur iamp freq i6 142.2 6 5000 7.055 i6 142.3 6 6000 7.061 i6 142.6 6 7000 7.067 i6 143.3 6 7000 7.063 ; st dur iamp ifq1 imax kpan i7 147.2 7 3250 5.063 2 .4 i7 147.3 7 3000 5.067 2 .2 i7 147.6 7 3000 5.061 2 .3 i7 147.3 7 3250 5.055 2 .6 ; bell with gong overlaid on crackles wave, morphing into ring modulator ; st dur iamp ifq1 imax kpan i7 151.1 3 3250 5.055 2 .6 ; st dur iamp freq i6 151.1 7 7000 7.055 ; st dur ampl cps fn bas mod lpS lpE send icf ibw in out pan boost dry i1 151 25 33333 1 1 3 2 .9 50943 1 333 30 9 18 36 4 .2 ; st dur amp freq i5 153.6 24 4000 389 i5 165.6 12 2000 738 ; swirl.wav ; st dur ampl cps fn bas mod lpS lpE send icf ibw in out pan boost dry i1 150 13 13000 1 7 3 2 0 67200 .9 999 23 15 20 60 15 1 i1 151 16 13000 1 7 3 1 0 67200 .9 900 27 10 25 25 15 1 ; two random microtonal sequences from gong, then bell ; st dur iamp freq i6 162.2 6 5000 7.021 i6 162.3 6 6000 7.034 i6 162.6 6 7000 7.055 ; st dur iamp ifq1 imax kpan i7 167.2 7 3250 5.089 2 .4 i7 167.3 7 3000 5.034 2 .5 i7 167.6 7 3000 5.055 2 .6 ; various textures from crackles.wav and swirl.wav ; st dur ampl cps fn bas mod lpS lpE send icf ibw in out pan boost dry i1 178 15 33333 1 1 3 2 0 50943 1 333 30 3 9 26 6 .4 i1 183 15 24000 1 1 2 1 0 50943 .9 666 37 15 25 38 4 .5 i1 188 15 22000 1 1 2 1 0 50943 .9 1332 81 25 15 30 4 .4 i1 188 16 13000 1 7 3 1 0 67200 .9 900 27 10 25 25 15 1 i1 178 34 3000 1 103 3 1 0 158119 0 0 0 21 34 25 6 1 ; harmonized gong ; st dur iamp freq i6 197.2 9 5000 7.021 i6 197.2 9 5000 7.055 ;;;;; pieces of oblivion.wav i1 211 34 3000 1 103 3 1 0 158119 0 0 0 21 34 25 6 1 ;;;;; pieces of oblivion.wav i1 237 23 2000 1 104 2 1 0 391169 0 0 0 13 18 32 6 1 ;;;;; pieces of oblivion.wav i1 249 11 1000 1 105 1 1 0 402930 0 0 0 21 21 39 6 1 ;;;; swirl-4 i1 252 13 16000 1 7 3 2 0 67200 .9 999 23 15 20 60 6 1 ;;;; swirl-4 i1 253 16 16000 1 7 3 1 0 67200 .9 900 27 10 25 25 6 1 ; INS ST DUR SPED1 SPED2 SPED3 SPED4 CF1 CF2 CF3 CF4 i8 250 12 12 11 10 9 8700 2900 5300 1500 ;;;;; spoken line ; st dur amp cps fn bas mod lpS lpE send icf ibw in out pan bst dry i2 252.51 5 6383 1 106 1 0 0 195279 .9 660 60 5 5 18 4 .5 i2 254.51 5 6303 1 106 1 0 0 195279 1 880 60 5 5 42 4 .4 e