Complementary Beatty Sequences no. 6 - Casey Mongoven sr = 44100 kr = 44100 ksmps = 1 nchnls = 2 gisin ftgen 1,0,2048,10,1 gitri ftgen 2,0,2048,9,1,1,0,3,.111111,180,5,.04,0,7,.020408,180,9,.012346,0,11,.008264,180,13,.005917,0,15,.004444,180,17,.00346,0,19,.002770,180,21,.002268,0,23,.001890,180,25,.0016,0,27,.001372,180,29,.001189,0,31,.001041,180,33,.000918,0,35,.000816,180,37,.00073,0,39,.000657,180,41,.000595,0,43,.000541,180,45,.000494,0,47,.000453,180,49,.000416,0,51,.000384,180,53,.000356,0,55,.000331,180,57,.000308,0,59,.000287,180,61,.000269,0,63,.000252,180,65,.000237,0,67,.000223,180,69,.00021,0,71,.000198,180,73,.000188,0,75,.000178,180,77,.000169,0,79,.000160,180,81,.000152,0,83,.000145,180,85,.000138,0,87,.000132,180,89,.000126,0,91,.000121,180,93,.000116,0,95,.000111,180,97,.000106,0,99,.000102,180,101,.000098,0,103,.000094,180,105,.000091,0,107,.000087,180,109,.000084,0,111,.000081,180,113,.000078,0,115,.000076,180,117,.000073,0,119,.000071,180,121,.000068,0,123,.000066,180,125,.000064,0,127,.000062,180 gisqu ftgen 3,0,2048,10,1,0,.333333,0,.2,0,.142857,0,.111111,0,.090909,0,.076923,0,.066667,0,.058824,0,.052632,0,.047619,0,.043478,0,.04,0,.037037,0,.034483,0,.032258,0,.030303,0,.028571,0,.027027,0,.025641,0,.02439,0,.023256,0,.022222,0,.021277,0,.020408,0,.019608,0,.018868,0,.018182,0,.017544,0,.016949,0,.016393,0,.015873,0,.015385,0,.014925,0,.014493,0,.014085,0,.013699,0,.013333,0,.012987,0,.012658,0,.012346,0,.012048,0,.011765,0,.011494,0,.011236,0,.010989,0,.010753,0,.010526,0,.010309,0,.010101,0,.009901,0,.009709,0,.009524,0,.009346,0,.009174,0,.009009,0,.00885,0,.008696,0,.008547,0,.008403,0,.008264,0,.00813,0,.008,0,.007874 gisaw ftgen 4,0,2048,10,1,.5,.333333,.25,.2,.166667,.142857,.125,.111111,.1,.090909,.083333,.076923,.071429,.066667,.0625,.058824,.055556,.052632,.05,.047619,.045455,.043478,.041667,.04,.038462,.037037,.035714,.034483,.033333,.032258,.03125,.030303,.029412,.028571,.027778,.027027,.026316,.025641,.025,.02439,.02381,.023256,.022727,.022222,.021739,.021277,.020833,.020408,.02,.019608,.019231,.018868,.018519,.018182,.017857,.017544,.017241,.016949,.016667,.016393,.016129,.015873,.015625,.015385,.015152,.014925,.014706,.014493,.014286,.014085,.013889,.013699,.013514,.013333,.013158,.012987,.012821,.012658,.0125,.012346,.012195,.012048,.011905,.011765,.011628,.011494,.011364,.011236,.011111,.010989,.01087,.010753,.010638,.010526,.010417,.010309,.010204,.010101,.01,.009901,.009804,.009709,.009615,.009524,.009434,.009346,.009259,.009174,.009091,.009009,.008929,.00885,.008772,.008696,.008621,.008547,.008475,.008403,.008333,.008264,.008197,.00813,.008065,.008,.007937,.007874,.007813 instr 1 idur = p3 iamp = p4 icps = p5 iatt = p6 irel = p7 ipvall = p8 ipvalr = p9 if (p10 == 0) goto addtri if (p10 == 1) then kenv linen iamp, iatt, idur, irel awav1 poscil3 kenv, icps, 1 else awav1 = 0 endif addtri: if (p11 == 0) goto addsqu if (p11 == 1) then ilastp = (sr/2)/p5-((sr/2)%p5)/p5 gitbl ftgen 6,0,2048,30,2,1,ilastp kenv linen iamp, iatt, idur, irel awav2 poscil3 kenv, icps, 6 else awav2 = 0 endif addsqu: if (p12 == 0) goto addsaw if (p12 == 1) then ilastp = (sr/2)/p5-((sr/2)%p5)/p5 gitbl ftgen 7,0,2048,30,3,1,ilastp kenv linen iamp, iatt, idur, irel awav3 poscil3 kenv, icps, 7 else awav3 = 0 endif addsaw: if (p13 == 0) goto sum if (p13 == 1) then ilastp = (sr/2)/p5-((sr/2)%p5)/p5 gitbl ftgen 8,0,2048,30,4,1,ilastp kenv linen iamp, iatt, idur, irel awav4 poscil3 kenv, icps, 8 else awav4 = 0 endif sum: inumwav = (p10 + p11 + p12 + p13 + p14 + p15 + p16) acompsigl = (awav1 + awav2 + awav3 + awav4)/inumwav acompsigr = (awav1 + awav2 + awav3 + awav4)/inumwav il gauss 0.005 il = il+1 ir gauss 0.005 ir = ir+1 asigl = acompsigl*il*ipvall asigr = acompsigr*ir*ipvalr outs asigl, asigr endin #define x1 #29950# #define x2 #30070# #define x3 #30190# #define x4 #30315# #define x5 #30435# #define x6 #30550# #define x7 #30680# #define x8 #30810# #define x9 #30940# #define x10 #31070# #define x11 #31200# #define x12 #31209# #define x13 #31218# #define x14 #31327# #define x15 #31337# #define x16 #31245# #define x17 #31256# #define x18 #31267# #define x19 #31278# #define x20 #31289# #define x21 #31300# #define a #.0046# #define r #.0069# i1 0 0.0526 $x1 1813 $a $r 0 1 0 1 0 0 0 0 0 i1 0.0526 0.0526 $x2 1803.935228 $a $r 1 0 0 1 0 0 0 0 0 i1 0.1052 0.0526 $x3 1794.915778 $a $r 0 1 0 1 0 0 0 0 0 i1 0.1578 0.0526 $x4 1785.941425 $a $r 0 1 0 1 0 0 0 0 0 i1 0.2104 0.0526 $x5 1777.011942 $a $r 1 0 0 1 0 0 0 0 0 i1 0.263 0.0526 $x6 1768.127106 $a $r 0 1 0 1 0 0 0 0 0 i1 0.3156 0.0526 $x7 1759.286692 $a $r 1 0 0 1 0 0 0 0 0 i1 0.3682 0.0526 $x8 1750.49048 $a $r 0 1 0 1 0 0 0 0 0 i1 0.4208 0.0526 $x9 1741.738247 $a $r 0 1 0 1 0 0 0 0 0 i1 0.4734 0.0526 $x10 1733.029775 $a $r 1 0 0 1 0 0 0 0 0 i1 0.526 0.0526 $x11 1724.364844 $a $r 0 1 0 1 0 0 0 0 0 i1 0.5786 0.0526 $x12 1715.743236 $a $r 0 1 0 1 0 0 0 0 0 i1 0.6312 0.0526 $x13 1707.164735 $a $r 1 0 0 1 0 0 0 0 0 i1 0.6838 0.0526 $x14 1698.629126 $a $r 0 1 0 1 0 0 0 0 0 i1 0.7364 0.0526 $x15 1690.136194 $a $r 1 0 0 1 0 0 0 0 0 i1 0.789 0.0526 $x16 1681.685725 $a $r 0 1 0 1 0 0 0 0 0 i1 0.8416 0.0526 $x17 1673.277508 $a $r 0 1 0 1 0 0 0 0 0 i1 0.8942 0.0526 $x18 1664.911331 $a $r 1 0 0 1 0 0 0 0 0 i1 0.9468 0.0526 $x19 1656.586983 $a $r 0 1 0 1 0 0 0 0 0 i1 0.9994 0.0526 $x20 1648.304256 $a $r 1 0 0 1 0 0 0 0 0 i1 1.052 0.0526 $x21 1640.062942 $a $r 0 1 0 1 0 0 0 0 0