-
Notifications
You must be signed in to change notification settings - Fork 1
/
tunin.csd
199 lines (170 loc) · 5.08 KB
/
tunin.csd
1
2
<MacOptions>Version: 1Render: FileAsk: NoSFDIR: Macintosh HD:Users:melissamoore:Desktop:csounscoo:Options: -b100 -A -otuninn.aif -s -m7 -R -Lstdin </MacOptions><MacGUI>ioView nobackground {65535, 65535, 65535}
ioListing {10, 10} {400, 500}</MacGUI><CsoundSynthesizer><CsInstruments>sr = 44100kr = 441ksmps = 100nchnls = 1gibase = 440 * 3 / (2 * 32)gip4=4000;::::::::::::::::::::::::::::::::::::::::::::::: Gen Tablesifn ftgen 1, 0, 8192, 10, 1 ;:::::::Sine:::::::ifn ftgen 2, 0, 8192, 19, .5, 1, 270, 1 ;:::::::Sigmoid::::ifn ftgen 3, 0, 8192, 10, 10, 8, 7, ;:::::::Sine:::::::ifn ftgen 4, 0, 8192, 10, 10, 8, 4ifn ftgen 5, 0, 8192, 10, 10, 7, 1, 2ifn ftgen 6, 0, 8192, 10, 10, 5, 2ifn ftgen 7, 0, 8192, 10, 10, 4ifn ftgen 8, 0, 8192, 20, 1ifn ftgen 9, 0, 512, 7, -1, 400, 0, 112, 1gitrumpet=.45gibass=.7giharm=.1gitrumpetprev=1gibassprev=1giharmprev=1 giphrase = 6+rnd(6);::::::::::::::::::::::::::::::::::::::::::::::::::::::::::instr 2 ;::::::::::::Trumpet:::::::::::::::::::::::::::::::;::::::::::::::::::::::::::::::::::::::::::::::::::::::::: kdyn linseg rnd(1.4)+.3, rnd(.1), rnd(1)+1, rnd(.5), rnd(1) ifir = 200*(rnd(.3)+.7)/gip4 isec = 300*(rnd(.3)+.7)/gip4 iatt1 = rnd(.2)+.2 iatt2 = rnd(.2)+.2 kcra linseg 0, p3/3, 0, iatt1, ifir, iatt1, 0, p3/3, 0, iatt2, isec, iatt2, 0 irange = gibase*16 inote = irange* p4 iprev = (p5 > 0 ? gitrumpetprev : inote) knot linseg iprev, p3*rnd(.333), inote, 1, inote knott = knot*(1/(kcra/(kdyn*12)+1)) ivalve = int(4*frac(inote*323)) kvibc linseg 3, p3, 1 kvibr oscil 1, kvibc, 1 iatt =5000*(rnd(.02)+p3/100)/gip4 kmainenv linseg 0.001, iatt, 1, p3-iatt-.1, 1, .1, 0.001 kenv = ((1000+.9* gip4)*kdyn+kvibr*100)*kmainenv knote = knott+kvibr*inote/400 kformcon linseg 0, .2, 1, 4, 1 kform = 690+ivalve*10+ gip4/40+kformcon*70 a1 fof kenv, knote, kform, 0, 600, .001,.002,.001, 200, 3, 2, p3 agrain grain 8000, inote, 30, 1000, inote/400, .08, 3, 8, 1 kcon linseg 900, .1, 1800, p3/2, 1500, p3/2, 900 a2 butterlp a1, kcon*kdyn+ gip4/40 a3 tone a2, 700 a4 gain a3+agrain*((inote+2000)/180000), kenv out (a4)*gitrumpet gitrumpetprev=inoteendin;::::::::::::::::::::::::::::::::::::::::::::::::::::::::::instr 3 ;::::::::::::Bass::::::::::::::::::::::::::::::::::;:::::::::::::::::::::::::::::::::::::::::::::::::::::::::: iatt = (rnd(40)+20)/1200 kenv1 linseg 0, iatt, 1, p3-.1-iatt, 1, .1, 0 kenv2 expseg gip4, 22, 1 kenv = kenv1*kenv2 irange = gibase*4 inote = irange* p4 iprev = (p5 > 0 ? gibassprev : inote)knote linseg iprev, rnd(.5), inote, 1, inote istr = int(2*frac(inote*323)) istrin = (inote < irange*3/2 ? 4 : 6) istring = istrin + istr acon oscil 4095, knote, 9 a1 tablei acon+4096, istring ar reson a1, knote*2, 50, 1 at tone ar, 700 a2 gain at, kenv aat pluck gip4, knote, gibase,9,1 out (aat+a2)*gibass gibassprev=inoteendin;::::::::::::::::::::::::::::::::::::::::::::::::::::::::::instr 4 ;::::::::::::Harmonium:::::::::::::::::::::::::::::;::::::::::::::::::::::::::::::::::::::::::::::::::::::::::p3 = 4 iatt = rnd(.4)+.4 kenv1 expseg 1, iatt, gip4, p3-.5, gip4*2, 1, 1 kconv linseg 1, p3/2, .5, p3/2, 1 kvib oscil .1, kconv*5, 1 kenv=kenv1*(kvib+1)*kconv irange = gibase*8 inote = irange* p4iprev = (p5 > 0 ? giharmprev : inote) knote1 linseg iprev, iatt*2, inote, p3, inote ire = int(5*frac(inote*323)) kbell oscil 1, 3+rnd(1), 1 kbell2 oscil 1, 3+rnd(3), 1 iree = 3000/inote ireed = iree+ire knote=knote1*(kbell/250+1) a1 buzz kenv+kbell*300, knote, ireed, 1 accent buzz kenv*p5+kbell2*300, knote*2, iree, 1 ar1 reson a1+accent, 300, 200, 1 ar2 reson a1+accent, 400, 300, 1 ar3 reson a1+accent, 200, 100, 1 kcon linseg 200, iatt, 400, p3, 300, 1, 300 at tone a1+accent, (kvib+1)*kcon a2 = ar1 + ar2 +ar3*at/100 a3 butterlp a2, 4000 a4 gain a3, kenv out a4*giharm*1.3 giharmprev = inoteendininstr 5 ktrig lfo 1, 2, 3 kloop loopseg rnd(4), ktrig, 0, 0, rnd(1.1), 1, rnd(1), .1, rnd(9), 0, rnd(9)+120, 0 ktrig2 lfo 1, 4, 3 kloop2 loopseg rnd(60), ktrig2, 0, 1, rnd(1), .1, rnd(9), 0, rnd(9)+120, 0 ktrig3 lfo 1, 8, 3 kloop3 loopseg rnd(60), ktrig3, 0, 1, rnd(1), .1, rnd(9), 0, rnd(9)+120, 0 a2 oscil kloop2*gibase*8, gibase*kloop3*12+gibase*12, int(rnd(8)+1) a3 oscil kloop*10000, gibase*kloop2*8+gibase*4+a2, int(rnd(8)+1) aguir guiro kloop3*12000*p5, .05 aseli sleighbells (1-p5)*12000*kloop2, .05 a4 rezzy a3, p4*p4*gibase*64+kloop3*gibase*64, rnd(100)*p5 out a4 +aguir+aseliendin</CsInstruments><CsScore>;CSOUND SCO BASED ON ;"THE DASTGAH CONCEPT ;IN PERSIAN MUSIC" ;BY HORMOZ FARHAT, ;CHAPTER 9: ;DASTGAH-E SEGAH.;;ALSO INSPIRED BY;IANNIS XENAKIS;"PERSEPOLIS"t 0 60#define MUYEBASIS(I#T)#i $I $T 2 [1] 0i $I + 2 [27/22] 0i $I + 2 [4/3] 0i $I + 2 [3/2] 0i $I + 2 [162/98] 0i $I + 2 [9/5] 0i $I + 2 [2] 0i $I + 2 [9/5] 0i $I + 2 [162/98] 0i $I + 2 [3/2] 0i $I + 2 [4/3] 0i $I + 2 [27/22] 0i $I + 2 [1] 0 #$MUYEBASIS(3#0)$MUYEBASIS(2#0)$MUYEBASIS(5#0)$MUYEBASIS(4#0)</CsScore></CsoundSynthesizer>