Advertisement
Guest User

Untitled

a guest
May 29th, 2015
266
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 95.85 KB | None | 0 0
  1. setTimeout(function(){// this is my 666th session using this live code thing I made
  2. // I have previously run sessions as long as three days
  3. // the most live code updates performed during one session is 455
  4. // for this special occassion I am going to cheat
  5. require('cheatcode')
  6. synth.connect(master.destination)
  7. // that is not the only cheat
  8. // really, that isn't a cheat at all
  9. // cuz i wrote all the cheatcode
  10. // what i am about to do is cheat
  11. bpm = 74 / 2
  12. //timer=sync(bpm, master.sampleRate)
  13. basefq = 54 * 2
  14. //t1.emit('stop')
  15. //t2.emit('stop')
  16. //gong.emit('stop')
  17. t1 = timer.beat(1/2, [1,,1,], function(_t, b){
  18. var bpm = 74
  19. var attack = [[0,0], [0,1], [0,0], [0,1], [1,.667]]
  20. var release = [[0,.667], [-3,0], [1, 0]]
  21. var y = b % 2 == 1 ? 2 : 1/2
  22. var durations = [60 / bpm / 128, bpm / 60 * 1/16]//, bpm / 60 * y ]
  23. var opts = {}
  24. opts.c = Math.sqrt(2);
  25. opts.m = Math.PI// Math.sqrt(Math.PI) / Math.sqrt(2);
  26. opts.f = 1200//notes[b % 6].fq()// (bf)// * Math.pow(2, 3/12))
  27. opts.wave = 'sine'
  28. var stringer = clang(opts)
  29. var zmod = {}
  30. zmod.curves = [attack, release];
  31. zmod.durations = durations;
  32. var mod = nvelope(zmod.curves, zmod.durations);
  33. var synth = function(y){
  34. return function(t){
  35. stringer.m = opts.m + (.051 * (Math.abs(oz.sine(t, y/2))))//amod(opts.m, .05, t, 1/16)
  36. //stringer.f = opts.f + (1 + oz.sine(t, y))
  37. var x = (stringer.ring(t, amod(0, 12, t, 12), amod(Math.sqrt(12), 1.25, t, 1/4)))
  38. return x
  39. }
  40. }
  41. generator.set(_t, synth(1/21), zmod)
  42. generator.set(_t + bpm / 60 / 2, synth(1/70), zmod)
  43. generator.set(_t + bpm / 60 / 4, synth(1/64), zmod)
  44. generator.set(_t + bpm / 60 / 8, synth(1/33), zmod)
  45. })
  46.  
  47.  
  48. gongbeat = beatmath(8, [1,2,3,4,5])
  49.  
  50. gong = timer.beat(1/2, [[,1,,,,,]], function boop(_t, b, xxx, swing){
  51.  
  52. var beat = b % 8
  53. var m = b % 128
  54. if(gongbeat(b)){
  55. var opts = {}
  56. opts.c = 1;
  57. opts.m = Math.PI / 3;
  58. opts.f = 54//
  59. opts.wave = 'square'
  60. var stringer = clang(opts)
  61. var fux = jdelay(480, .51, .2)
  62. var attack = [[0,0],[0,1], [1,1]]
  63. var release = [[1,1],[.24,1],[.25,0], [1,0]]
  64. var curves = [attack, release]
  65. var durs = [.020, .3670]
  66. var mods = {curves: curves, durations: durs}
  67. var lope = nvelope(curves, durs)
  68. var kx = Math.abs(Math.floor(amod(6, 1, _t, 1/3)))
  69. var fq = b % 8 % 5 === 0 ? (basefq * Math.sqrt(2)/2) * (kx / 5) : basefq
  70.  
  71. fleek = fq
  72. var synth = function(t,s,i){
  73. var wave = ''
  74. return (oz.sine(t,fq) * lope(t - _t)
  75. )
  76. return (stringer.ring(t, amod(0, Math.PI / 6, t, 16), Math.sqrt(2)/1.667))
  77. }
  78. var gen = generator.set(_t, synth, mods)
  79. }
  80. })
  81.  
  82.  
  83. t2 = timer.beat(1/8, [,1,,1,], function(_t, b){
  84. var attack = [[0,0], [0,1], [0,0], [0,1], [1,.667]]
  85. var release = [[0,.667], [-3,0], [1, 0]]
  86. var y = b % 2 == 1 ? 2 : 1/2
  87. var durations = [60 / bpm / 56, bpm / 60 * 1/8]//, bpm / 60 * y ]
  88. var opts = {}
  89. opts.c = Math.sqrt(2);
  90. opts.m = 2+b%4/Math.PI// Math.sqrt(Math.PI) / Math.sqrt(2);
  91. opts.f = 442/16/2//notes[b % 6].fq()// (bf)// * Math.pow(2, 3/12))
  92. opts.wave = 'sine'
  93. var stringer = clang(opts)
  94. var zmod = {}
  95. zmod.curves = [attack, release];
  96. zmod.durations = durations;
  97. var mod = nvelope(zmod.curves, zmod.durations);
  98. var synth = function(y){
  99. return function(t){
  100. t += 1000
  101. stringer.m = opts.m + (.5 + ( .05 * oz.saw(t, y)))//amod(opts.m, .05, t, 1/16)
  102. stringer.f = opts.f + (.5 + oz.sine(t, y/4))
  103. var x = (stringer.ring(t, ( 2.15 + oz.saw(t, 4)), amod(Math.sqrt(12), 1.15, t, 4)))
  104. return x
  105. }
  106. }
  107. generator.set(_t, synth(0), zmod)
  108. generator.set(_t + .13, synth(3/2/2), zmod)
  109. generator.set(_t + .26, synth(3/2/2/2), zmod)
  110. generator.set(_t + .39, synth(3/2/2/2/2), zmod)
  111. })
  112. },0)
  113. setTimeout(function(){// this is my 666th session using this live code thing I made
  114. // I have previously run sessions as long as three days
  115. // the most live code updates performed during one session is 455
  116. // for this special occassion I am going to cheat
  117. //require('cheatcode')
  118. //synth.connect(master.destination)
  119. // that is not the only cheat
  120. // really, that isn't a cheat at all
  121. // cuz i wrote all the cheatcode
  122. // what i am about to do is cheat
  123. bpm = 74 / 2
  124. //timer=sync(bpm, master.sampleRate)
  125. basefq = 54 * 2
  126. t1.emit('stop')
  127. t2.emit('stop')
  128. gong.emit('stop')
  129. t1 = timer.beat(1/2, [1,,1,], function(_t, b){
  130. var bpm = 74
  131. var attack = [[0,0], [0,1], [0,0], [0,1], [1,.667]]
  132. var release = [[0,.667], [-3,0], [1, 0]]
  133. var y = b % 2 == 1 ? 2 : 1/2
  134. var durations = [60 / bpm / 128, bpm / 60 * 1/16]//, bpm / 60 * y ]
  135. var opts = {}
  136. opts.c = Math.sqrt(2);
  137. opts.m = Math.PI// Math.sqrt(Math.PI) / Math.sqrt(2);
  138. opts.f = 1200//notes[b % 6].fq()// (bf)// * Math.pow(2, 3/12))
  139. opts.wave = 'sine'
  140. var stringer = clang(opts)
  141. var zmod = {}
  142. zmod.curves = [attack, release];
  143. zmod.durations = durations;
  144. var mod = nvelope(zmod.curves, zmod.durations);
  145. var synth = function(y){
  146. return function(t){
  147. stringer.m = opts.m + (.051 * (Math.abs(oz.sine(t, y/2))))//amod(opts.m, .05, t, 1/16)
  148. //stringer.f = opts.f + (1 + oz.sine(t, y))
  149. var x = (stringer.ring(t, amod(0, 12, t, 12), amod(Math.sqrt(12), 1.25, t, 1/4)))
  150. return x
  151. }
  152. }
  153. generator.set(_t, synth(1/21), zmod)
  154. generator.set(_t + bpm / 60 / 2, synth(1/70), zmod)
  155. generator.set(_t + bpm / 60 / 4, synth(1/64), zmod)
  156. generator.set(_t + bpm / 60 / 8, synth(1/33), zmod)
  157. })
  158.  
  159.  
  160. gongbeat = beatmath(8, [1,2,3,4,5])
  161.  
  162. gong = timer.beat(1/2, [[,1,,,,,]], function (_t, b, xxx, swing){
  163.  
  164. var beat = b % 8
  165. var m = b % 128
  166. if(gongbeat(b)){
  167. var opts = {}
  168. opts.c = 1;
  169. opts.m = Math.PI / 3;
  170. opts.f = 54//
  171. opts.wave = 'square'
  172. var stringer = clang(opts)
  173. var fux = jdelay(480, .51, .2)
  174. var attack = [[0,0],[0,1], [1,1]]
  175. var release = [[1,1],[.24,1],[.25,0], [1,0]]
  176. var curves = [attack, release]
  177. var durs = [.020, .3670]
  178. var mods = {curves: curves, durations: durs}
  179. var lope = nvelope(curves, durs)
  180. var kx = Math.abs(Math.floor(amod(6, 1, _t, 1/3)))
  181. var fq = b % 8 % 5 === 0 ? (basefq * Math.sqrt(2)/2) * (kx / 5) : basefq
  182.  
  183. var synth = function(t,s,i){
  184. var wave = ''
  185. return (oz.sine(t,fq) * lope(t - _t)
  186. )
  187. return (stringer.ring(t, amod(0, Math.PI / 6, t, 16), Math.sqrt(2)/1.667))
  188. }
  189. var gen = generator.set(_t, synth, mods)
  190. }
  191. })
  192.  
  193.  
  194. t2 = timer.beat(1/4, [,1,,1,], function(_t, b){
  195. var attack = [[0,0], [0,1], [0,0], [0,1], [1,.667]]
  196. var release = [[0,.667], [-3,0], [1, 0]]
  197. var y = b % 2 == 1 ? 2 : 1/2
  198. var durations = [60 / bpm / 56, bpm / 60 * 1/8]//, bpm / 60 * y ]
  199. var opts = {}
  200. opts.c = Math.sqrt(2);
  201. opts.m = 2+b%4/Math.PI// Math.sqrt(Math.PI) / Math.sqrt(2);
  202. opts.f = 442/16/2//notes[b % 6].fq()// (bf)// * Math.pow(2, 3/12))
  203. opts.wave = 'sine'
  204. var stringer = clang(opts)
  205. var zmod = {}
  206. zmod.curves = [attack, release];
  207. zmod.durations = durations;
  208. var mod = nvelope(zmod.curves, zmod.durations);
  209. var synth = function(y){
  210. return function(t){
  211. t += 1000
  212. stringer.m = opts.m + (.5 + ( .05 * oz.saw(t, y)))//amod(opts.m, .05, t, 1/16)
  213. stringer.f = opts.f + (.5 + oz.sine(t, y/4))
  214. var x = (stringer.ring(t, ( 2.15 + oz.saw(t, 4)), amod(Math.sqrt(12), 1.15, t, 4)))
  215. return x
  216. }
  217. }
  218. generator.set(_t, synth(0), zmod)
  219. generator.set(_t + .13, synth(3/2/2), zmod)
  220. generator.set(_t + .26, synth(3/2/2/2), zmod)
  221. generator.set(_t + .39, synth(3/2/2/2/2), zmod)
  222. })
  223. },48180)
  224. setTimeout(function(){// this is my 666th session using this live code thing I made
  225. // I have previously run sessions as long as three days
  226. // the most live code updates performed during one session is 455
  227. // for this special occassion I am going to cheat
  228. //require('cheatcode')
  229. //synth.connect(master.destination)
  230. // that is not the only cheat
  231. // really, that isn't a cheat at all
  232. // cuz i wrote all the cheatcode
  233. // what i am about to do is cheat
  234. bpm = 74 / 2
  235. //timer=sync(bpm, master.sampleRate)
  236. basefq = 54 * 2
  237. t1.emit('stop')
  238. t2.emit('stop')
  239. gong.emit('stop')
  240. t1 = timer.beat(1/4, [1,,1,], function(_t, b){
  241. var bpm = 74
  242. var attack = [[0,0], [0,1], [0,0], [0,1], [1,.667]]
  243. var release = [[0,.667], [-3,0], [1, 0]]
  244. var y = b % 2 == 1 ? 2 : 1/2
  245. var durations = [60 / bpm / 128, bpm / 60 * 1/16]//, bpm / 60 * y ]
  246. var opts = {}
  247. opts.c = Math.sqrt(2);
  248. opts.m = Math.PI// Math.sqrt(Math.PI) / Math.sqrt(2);
  249. opts.f = 1200//notes[b % 6].fq()// (bf)// * Math.pow(2, 3/12))
  250. opts.wave = 'sine'
  251. var stringer = clang(opts)
  252. var zmod = {}
  253. zmod.curves = [attack, release];
  254. zmod.durations = durations;
  255. var mod = nvelope(zmod.curves, zmod.durations);
  256. var synth = function(y){
  257. return function(t){
  258. stringer.m = opts.m + (.051 * (Math.abs(oz.sine(t, y/2))))//amod(opts.m, .05, t, 1/16)
  259. //stringer.f = opts.f + (1 + oz.sine(t, y))
  260. var x = (stringer.ring(t, amod(0, 12, t, 12), amod(Math.sqrt(12), 1.25, t, 1/4)))
  261. return x
  262. }
  263. }
  264. generator.set(_t, synth(1/21), zmod)
  265. generator.set(_t + bpm / 60 / 2, synth(1/70), zmod)
  266. generator.set(_t + bpm / 60 / 4, synth(1/64), zmod)
  267. generator.set(_t + bpm / 60 / 8, synth(1/33), zmod)
  268. })
  269.  
  270.  
  271. gongbeat = beatmath(8, [1,2,3,4,5])
  272.  
  273. gong = timer.beat(1/2, [[,1,,,,,]], function (_t, b, xxx, swing){
  274.  
  275. var beat = b % 8
  276. var m = b % 128
  277. if(gongbeat(b)){
  278. var opts = {}
  279. opts.c = 1;
  280. opts.m = Math.PI / 3;
  281. opts.f = 54//
  282. opts.wave = 'square'
  283. var stringer = clang(opts)
  284. var fux = jdelay(480, .51, .2)
  285. var attack = [[0,0],[0,1], [1,1]]
  286. var release = [[1,1],[.24,1],[.25,0], [1,0]]
  287. var curves = [attack, release]
  288. var durs = [.020, .3670]
  289. var mods = {curves: curves, durations: durs}
  290. var lope = nvelope(curves, durs)
  291. var kx = Math.abs(Math.floor(amod(6, 1, _t, 1/3)))
  292. var fq = b % 8 % 5 === 0 ? (basefq * Math.sqrt(2)/2) * (kx / 5) : basefq
  293.  
  294. var synth = function(t,s,i){
  295. var wave = ''
  296. return (oz.sine(t,fq) * lope(t - _t)
  297. )
  298. return (stringer.ring(t, amod(0, Math.PI / 6, t, 16), Math.sqrt(2)/1.667))
  299. }
  300. var gen = generator.set(_t, synth, mods)
  301. }
  302. })
  303.  
  304.  
  305. t2 = timer.beat(1/4, [,1,,1,], function(_t, b){
  306. var attack = [[0,0], [0,1], [0,0], [0,1], [1,.667]]
  307. var release = [[0,.667], [-3,0], [1, 0]]
  308. var y = b % 2 == 1 ? 2 : 1/2
  309. var durations = [60 / bpm / 56, bpm / 60 * 1/8]//, bpm / 60 * y ]
  310. var opts = {}
  311. opts.c = Math.sqrt(2);
  312. opts.m = 2+b%4/Math.PI// Math.sqrt(Math.PI) / Math.sqrt(2);
  313. opts.f = 442/16/2//notes[b % 6].fq()// (bf)// * Math.pow(2, 3/12))
  314. opts.wave = 'sine'
  315. var stringer = clang(opts)
  316. var zmod = {}
  317. zmod.curves = [attack, release];
  318. zmod.durations = durations;
  319. var mod = nvelope(zmod.curves, zmod.durations);
  320. var synth = function(y){
  321. return function(t){
  322. t += 1000
  323. stringer.m = opts.m + (.5 + ( .05 * oz.saw(t, y)))//amod(opts.m, .05, t, 1/16)
  324. stringer.f = opts.f + (.5 + oz.sine(t, y/4))
  325. var x = (stringer.ring(t, ( 2.15 + oz.saw(t, 4)), amod(Math.sqrt(12), 1.15, t, 4)))
  326. return x
  327. }
  328. }
  329. generator.set(_t, synth(0), zmod)
  330. generator.set(_t + .13, synth(3/2/2), zmod)
  331. generator.set(_t + .26, synth(3/2/2/2), zmod)
  332. generator.set(_t + .39, synth(3/2/2/2/2), zmod)
  333. })
  334. },56618)
  335. setTimeout(function(){// this is my 666th session using this live code thing I made
  336. // I have previously run sessions as long as three days
  337. // the most live code updates performed during one session is 455
  338. // for this special occassion I am going to cheat
  339. //require('cheatcode')
  340. //synth.connect(master.destination)
  341. // that is not the only cheat
  342. // really, that isn't a cheat at all
  343. // cuz i wrote all the cheatcode
  344. // what i am about to do is cheat
  345. bpm = 74 / 2
  346. //timer=sync(bpm, master.sampleRate)
  347. basefq = 54 * 2
  348. t1.emit('stop')
  349. t2.emit('stop')
  350. gong.emit('stop')
  351. t1 = timer.beat(1/8, [1,,1,], function(_t, b){
  352. var bpm = 74
  353. var attack = [[0,0], [0,1], [0,0], [0,1], [1,.667]]
  354. var release = [[0,.667], [-3,0], [1, 0]]
  355. var y = b % 2 == 1 ? 2 : 1/2
  356. var durations = [60 / bpm / 128, bpm / 60 * 1/16]//, bpm / 60 * y ]
  357. var opts = {}
  358. opts.c = Math.sqrt(2);
  359. opts.m = Math.PI// Math.sqrt(Math.PI) / Math.sqrt(2);
  360. opts.f = 1200//notes[b % 6].fq()// (bf)// * Math.pow(2, 3/12))
  361. opts.wave = 'sine'
  362. var stringer = clang(opts)
  363. var zmod = {}
  364. zmod.curves = [attack, release];
  365. zmod.durations = durations;
  366. var mod = nvelope(zmod.curves, zmod.durations);
  367. var synth = function(y){
  368. return function(t){
  369. stringer.m = opts.m + (.051 * (Math.abs(oz.sine(t, y/2))))//amod(opts.m, .05, t, 1/16)
  370. //stringer.f = opts.f + (1 + oz.sine(t, y))
  371. var x = (stringer.ring(t, amod(0, 12, t, 12), amod(Math.sqrt(12), 1.25, t, 1/4)))
  372. return x
  373. }
  374. }
  375. generator.set(_t, synth(1/21), zmod)
  376. generator.set(_t + bpm / 60 / 2, synth(1/70), zmod)
  377. generator.set(_t + bpm / 60 / 4, synth(1/64), zmod)
  378. generator.set(_t + bpm / 60 / 8, synth(1/33), zmod)
  379. })
  380.  
  381.  
  382. gongbeat = beatmath(8, [1,2,3,4,5])
  383.  
  384. gong = timer.beat(1/2, [[,1,,,,,]], function (_t, b, xxx, swing){
  385.  
  386. var beat = b % 8
  387. var m = b % 128
  388. if(gongbeat(b)){
  389. var opts = {}
  390. opts.c = 1;
  391. opts.m = Math.PI / 3;
  392. opts.f = 54//
  393. opts.wave = 'square'
  394. var stringer = clang(opts)
  395. var fux = jdelay(480, .51, .2)
  396. var attack = [[0,0],[0,1], [1,1]]
  397. var release = [[1,1],[.24,1],[.25,0], [1,0]]
  398. var curves = [attack, release]
  399. var durs = [.020, .3670]
  400. var mods = {curves: curves, durations: durs}
  401. var lope = nvelope(curves, durs)
  402. var kx = Math.abs(Math.floor(amod(6, 1, _t, 1/3)))
  403. var fq = b % 8 % 5 === 0 ? (basefq * Math.sqrt(2)/2) * (kx / 5) : basefq
  404.  
  405. var synth = function(t,s,i){
  406. var wave = ''
  407. return (oz.sine(t,fq) * lope(t - _t)
  408. )
  409. return (stringer.ring(t, amod(0, Math.PI / 6, t, 16), Math.sqrt(2)/1.667))
  410. }
  411. var gen = generator.set(_t, synth, mods)
  412. }
  413. })
  414.  
  415.  
  416. t2 = timer.beat(1/4, [,1,,1,], function(_t, b){
  417. var attack = [[0,0], [0,1], [0,0], [0,1], [1,.667]]
  418. var release = [[0,.667], [-3,0], [1, 0]]
  419. var y = b % 2 == 1 ? 2 : 1/2
  420. var durations = [60 / bpm / 56, bpm / 60 * 1/8]//, bpm / 60 * y ]
  421. var opts = {}
  422. opts.c = Math.sqrt(2);
  423. opts.m = 2+b%4/Math.PI// Math.sqrt(Math.PI) / Math.sqrt(2);
  424. opts.f = 442/16/2//notes[b % 6].fq()// (bf)// * Math.pow(2, 3/12))
  425. opts.wave = 'sine'
  426. var stringer = clang(opts)
  427. var zmod = {}
  428. zmod.curves = [attack, release];
  429. zmod.durations = durations;
  430. var mod = nvelope(zmod.curves, zmod.durations);
  431. var synth = function(y){
  432. return function(t){
  433. t += 1000
  434. stringer.m = opts.m + (.5 + ( .05 * oz.saw(t, y)))//amod(opts.m, .05, t, 1/16)
  435. stringer.f = opts.f + (.5 + oz.sine(t, y/4))
  436. var x = (stringer.ring(t, ( 2.15 + oz.saw(t, 4)), amod(Math.sqrt(12), 1.15, t, 4)))
  437. return x
  438. }
  439. }
  440. generator.set(_t, synth(0), zmod)
  441. generator.set(_t + .13, synth(3/2/2), zmod)
  442. generator.set(_t + .26, synth(3/2/2/2), zmod)
  443. generator.set(_t + .39, synth(3/2/2/2/2), zmod)
  444. })
  445. },58454)
  446. setTimeout(function(){// this is my 666th session using this live code thing I made
  447. // I have previously run sessions as long as three days
  448. // the most live code updates performed during one session is 455
  449. // for this special occassion I am going to cheat
  450. //require('cheatcode')
  451. //synth.connect(master.destination)
  452. // that is not the only cheat
  453. // really, that isn't a cheat at all
  454. // cuz i wrote all the cheatcode
  455. // what i am about to do is cheat
  456. bpm = 74 / 2
  457. //timer=sync(bpm, master.sampleRate)
  458. basefq = 54 * 2
  459. t1.emit('stop')
  460. t2.emit('stop')
  461. gong.emit('stop')
  462. t1 = timer.beat(1/2, [1,,1,], function(_t, b){
  463. var bpm = 74
  464. var attack = [[0,0], [0,1], [0,0], [0,1], [1,.667]]
  465. var release = [[0,.667], [-3,0], [1, 0]]
  466. var y = b % 2 == 1 ? 2 : 1/2
  467. var durations = [60 / bpm / 128, bpm / 60 * 1/16]//, bpm / 60 * y ]
  468. var opts = {}
  469. opts.c = Math.sqrt(2);
  470. opts.m = Math.PI// Math.sqrt(Math.PI) / Math.sqrt(2);
  471. opts.f = 1200//notes[b % 6].fq()// (bf)// * Math.pow(2, 3/12))
  472. opts.wave = 'sine'
  473. var stringer = clang(opts)
  474. var zmod = {}
  475. zmod.curves = [attack, release];
  476. zmod.durations = durations;
  477. var mod = nvelope(zmod.curves, zmod.durations);
  478. var synth = function(y){
  479. return function(t){
  480. stringer.m = opts.m + (.051 * (Math.abs(oz.sine(t, y/2))))//amod(opts.m, .05, t, 1/16)
  481. //stringer.f = opts.f + (1 + oz.sine(t, y))
  482. var x = (stringer.ring(t, amod(0, 12, t, 12), amod(Math.sqrt(12), 1.25, t, 1/4)))
  483. return x
  484. }
  485. }
  486. generator.set(_t, synth(1/21), zmod)
  487. generator.set(_t + bpm / 60 / 2, synth(1/70), zmod)
  488. generator.set(_t + bpm / 60 / 4, synth(1/64), zmod)
  489. generator.set(_t + bpm / 60 / 8, synth(1/33), zmod)
  490. })
  491.  
  492.  
  493. gongbeat = beatmath(8, [1,2,3,4,5])
  494.  
  495. gong = timer.beat(1/2, [[,1,,,,,]], function (_t, b, xxx, swing){
  496.  
  497. var beat = b % 8
  498. var m = b % 128
  499. if(gongbeat(b)){
  500. var opts = {}
  501. opts.c = 1;
  502. opts.m = Math.PI / 3;
  503. opts.f = 54//
  504. opts.wave = 'square'
  505. var stringer = clang(opts)
  506. var fux = jdelay(480, .51, .2)
  507. var attack = [[0,0],[0,1], [1,1]]
  508. var release = [[1,1],[.24,1],[.25,0], [1,0]]
  509. var curves = [attack, release]
  510. var durs = [.020, .3670]
  511. var mods = {curves: curves, durations: durs}
  512. var lope = nvelope(curves, durs)
  513. var kx = Math.abs(Math.floor(amod(6, 1, _t, 1/3)))
  514. var fq = b % 8 % 5 === 0 ? (basefq * Math.sqrt(2)/2) * (kx / 5) : basefq
  515.  
  516. var synth = function(t,s,i){
  517. var wave = ''
  518. return (oz.sine(t,fq) * lope(t - _t)
  519. )
  520. return (stringer.ring(t, amod(0, Math.PI / 6, t, 16), Math.sqrt(2)/1.667))
  521. }
  522. var gen = generator.set(_t, synth, mods)
  523. }
  524. })
  525.  
  526.  
  527. t2 = timer.beat(1/4, [,1,,1,], function(_t, b){
  528. var attack = [[0,0], [0,1], [0,0], [0,1], [1,.667]]
  529. var release = [[0,.667], [-3,0], [1, 0]]
  530. var y = b % 2 == 1 ? 2 : 1/2
  531. var durations = [60 / bpm / 56, bpm / 60 * 1/8]//, bpm / 60 * y ]
  532. var opts = {}
  533. opts.c = Math.sqrt(2);
  534. opts.m = 2+b%4/Math.PI// Math.sqrt(Math.PI) / Math.sqrt(2);
  535. opts.f = 442/16/2//notes[b % 6].fq()// (bf)// * Math.pow(2, 3/12))
  536. opts.wave = 'sine'
  537. var stringer = clang(opts)
  538. var zmod = {}
  539. zmod.curves = [attack, release];
  540. zmod.durations = durations;
  541. var mod = nvelope(zmod.curves, zmod.durations);
  542. var synth = function(y){
  543. return function(t){
  544. t += 1000
  545. stringer.m = opts.m + (.5 + ( .05 * oz.saw(t, y)))//amod(opts.m, .05, t, 1/16)
  546. stringer.f = opts.f + (.5 + oz.sine(t, y/4))
  547. var x = (stringer.ring(t, ( 2.15 + oz.saw(t, 4)), amod(Math.sqrt(12), 1.15, t, 4)))
  548. return x
  549. }
  550. }
  551. generator.set(_t, synth(0), zmod)
  552. generator.set(_t + .13, synth(3/2/2), zmod)
  553. generator.set(_t + .26, synth(3/2/2/2), zmod)
  554. generator.set(_t + .39, synth(3/2/2/2/2), zmod)
  555. })
  556. },66632)
  557. setTimeout(function(){// this is my 666th session using this live code thing I made
  558. // I have previously run sessions as long as three days
  559. // the most live code updates performed during one session is 455
  560. // for this special occassion I am going to cheat
  561. //require('cheatcode')
  562. //synth.connect(master.destination)
  563. // that is not the only cheat
  564. // really, that isn't a cheat at all
  565. // cuz i wrote all the cheatcode
  566. // what i am about to do is cheat
  567. bpm = 74 / 2
  568. //timer=sync(bpm, master.sampleRate)
  569. basefq = 54 * 2
  570. t1.emit('stop')
  571. t2.emit('stop')
  572. gong.emit('stop')
  573. t1 = timer.beat(1/2, [1,,1,], function(_t, b){
  574. var bpm = 74
  575. var attack = [[0,0], [0,1], [0,0], [0,1], [1,.667]]
  576. var release = [[0,.667], [-3,0], [1, 0]]
  577. var y = b % 2 == 1 ? 2 : 1/2
  578. var durations = [60 / bpm / 128, bpm / 60 * 1/16]//, bpm / 60 * y ]
  579. var opts = {}
  580. opts.c = Math.sqrt(2);
  581. opts.m = Math.PI// Math.sqrt(Math.PI) / Math.sqrt(2);
  582. opts.f = 1200//notes[b % 6].fq()// (bf)// * Math.pow(2, 3/12))
  583. opts.wave = 'triangle'
  584. var stringer = clang(opts)
  585. var zmod = {}
  586. zmod.curves = [attack, release];
  587. zmod.durations = durations;
  588. var mod = nvelope(zmod.curves, zmod.durations);
  589. var synth = function(y){
  590. return function(t){
  591. stringer.m = opts.m + (.051 * (Math.abs(oz.sine(t, y/2))))//amod(opts.m, .05, t, 1/16)
  592. //stringer.f = opts.f + (1 + oz.sine(t, y))
  593. var x = (stringer.ring(t, amod(0, 12, t, 12), amod(Math.sqrt(12), 1.25, t, 1/4)))
  594. return x
  595. }
  596. }
  597. generator.set(_t, synth(1/21), zmod)
  598. generator.set(_t + bpm / 60 / 2, synth(1/70), zmod)
  599. generator.set(_t + bpm / 60 / 4, synth(1/64), zmod)
  600. generator.set(_t + bpm / 60 / 8, synth(1/33), zmod)
  601. })
  602.  
  603.  
  604. gongbeat = beatmath(8, [1,2,3,4,5])
  605.  
  606. gong = timer.beat(1/2, [[,1,,,,,]], function (_t, b, xxx, swing){
  607.  
  608. var beat = b % 8
  609. var m = b % 128
  610. if(gongbeat(b)){
  611. var opts = {}
  612. opts.c = 1;
  613. opts.m = Math.PI / 3;
  614. opts.f = 54//
  615. opts.wave = 'square'
  616. var stringer = clang(opts)
  617. var fux = jdelay(480, .51, .2)
  618. var attack = [[0,0],[0,1], [1,1]]
  619. var release = [[1,1],[.24,1],[.25,0], [1,0]]
  620. var curves = [attack, release]
  621. var durs = [.020, .3670]
  622. var mods = {curves: curves, durations: durs}
  623. var lope = nvelope(curves, durs)
  624. var kx = Math.abs(Math.floor(amod(6, 1, _t, 1/3)))
  625. var fq = b % 8 % 5 === 0 ? (basefq * Math.sqrt(2)/2) * (kx / 5) : basefq
  626.  
  627. var synth = function(t,s,i){
  628. var wave = ''
  629. return (oz.sine(t,fq) * lope(t - _t)
  630. )
  631. return (stringer.ring(t, amod(0, Math.PI / 6, t, 16), Math.sqrt(2)/1.667))
  632. }
  633. var gen = generator.set(_t, synth, mods)
  634. }
  635. })
  636.  
  637.  
  638. t2 = timer.beat(1/4, [,1,,1,], function(_t, b){
  639. var attack = [[0,0], [0,1], [0,0], [0,1], [1,.667]]
  640. var release = [[0,.667], [-3,0], [1, 0]]
  641. var y = b % 2 == 1 ? 2 : 1/2
  642. var durations = [60 / bpm / 56, bpm / 60 * 1/8]//, bpm / 60 * y ]
  643. var opts = {}
  644. opts.c = Math.sqrt(2);
  645. opts.m = 2+b%4/Math.PI// Math.sqrt(Math.PI) / Math.sqrt(2);
  646. opts.f = 442/16/2//notes[b % 6].fq()// (bf)// * Math.pow(2, 3/12))
  647. opts.wave = 'sine'
  648. var stringer = clang(opts)
  649. var zmod = {}
  650. zmod.curves = [attack, release];
  651. zmod.durations = durations;
  652. var mod = nvelope(zmod.curves, zmod.durations);
  653. var synth = function(y){
  654. return function(t){
  655. t += 1000
  656. stringer.m = opts.m + (.5 + ( .05 * oz.saw(t, y)))//amod(opts.m, .05, t, 1/16)
  657. stringer.f = opts.f + (.5 + oz.sine(t, y/4))
  658. var x = (stringer.ring(t, ( 2.15 + oz.saw(t, 4)), amod(Math.sqrt(12), 1.15, t, 4)))
  659. return x
  660. }
  661. }
  662. generator.set(_t, synth(0), zmod)
  663. generator.set(_t + .13, synth(3/2/2), zmod)
  664. generator.set(_t + .26, synth(3/2/2/2), zmod)
  665. generator.set(_t + .39, synth(3/2/2/2/2), zmod)
  666. })
  667. },138609)
  668. setTimeout(function(){// this is my 666th session using this live code thing I made
  669. // I have previously run sessions as long as three days
  670. // the most live code updates performed during one session is 455
  671. // for this special occassion I am going to cheat
  672. //require('cheatcode')
  673. //synth.connect(master.destination)
  674. // that is not the only cheat
  675. // really, that isn't a cheat at all
  676. // cuz i wrote all the cheatcode
  677. // what i am about to do is cheat
  678. bpm = 74 / 2
  679. //timer=sync(bpm, master.sampleRate)
  680. basefq = 54 * 2
  681. t1.emit('stop')
  682. t2.emit('stop')
  683. gong.emit('stop')
  684. t1 = timer.beat(1/2, [1,,1,], function(_t, b){
  685. var bpm = 74
  686. var attack = [[0,0], [0,1], [0,0], [0,1], [1,.667]]
  687. var release = [[0,.667], [-3,0], [1, 0]]
  688. var y = b % 2 == 1 ? 2 : 1/2
  689. var durations = [60 / bpm / 128, bpm / 60 * 1/16]//, bpm / 60 * y ]
  690. var opts = {}
  691. opts.c = Math.sqrt(2);
  692. opts.m = Math.PI// Math.sqrt(Math.PI) / Math.sqrt(2);
  693. opts.f = 1200//notes[b % 6].fq()// (bf)// * Math.pow(2, 3/12))
  694. opts.wave = 'saw_i'
  695. var stringer = clang(opts)
  696. var zmod = {}
  697. zmod.curves = [attack, release];
  698. zmod.durations = durations;
  699. var mod = nvelope(zmod.curves, zmod.durations);
  700. var synth = function(y){
  701. return function(t){
  702. stringer.m = opts.m + (.051 * (Math.abs(oz.sine(t, y/2))))//amod(opts.m, .05, t, 1/16)
  703. //stringer.f = opts.f + (1 + oz.sine(t, y))
  704. var x = (stringer.ring(t, amod(0, 12, t, 12), amod(Math.sqrt(12), 1.25, t, 1/4)))
  705. return x
  706. }
  707. }
  708. generator.set(_t, synth(1/21), zmod)
  709. generator.set(_t + bpm / 60 / 2, synth(1/70), zmod)
  710. generator.set(_t + bpm / 60 / 4, synth(1/64), zmod)
  711. generator.set(_t + bpm / 60 / 8, synth(1/33), zmod)
  712. })
  713.  
  714.  
  715. gongbeat = beatmath(8, [1,2,3,4,5])
  716.  
  717. gong = timer.beat(1/2, [[,1,,,,,],[,1,,,,,],[,1,,,,,],[,1,,,,,],[,,,,,1,]], function (_t, b, xxx, swing){
  718.  
  719. var beat = b % 8
  720. var m = b % 128
  721. if(gongbeat(b)){
  722. var opts = {}
  723. opts.c = 1;
  724. opts.m = Math.PI / 3;
  725. opts.f = 54//
  726. opts.wave = 'square'
  727. var stringer = clang(opts)
  728. var fux = jdelay(480, .51, .2)
  729. var attack = [[0,0],[0,1], [1,1]]
  730. var release = [[1,1],[.24,1],[.25,0], [1,0]]
  731. var curves = [attack, release]
  732. var durs = [.020, .3670]
  733. var mods = {curves: curves, durations: durs}
  734. var lope = nvelope(curves, durs)
  735. var kx = Math.abs(Math.floor(amod(6, 1, _t, 1/3)))
  736. var fq = b % 8 % 5 === 0 ? (basefq * Math.sqrt(2)/2) * (kx / 5) : basefq
  737.  
  738. var synth = function(t,s,i){
  739. var wave = ''
  740. return (oz.sine(t,fq) * lope(t - _t)
  741. )
  742. return (stringer.ring(t, amod(0, Math.PI / 6, t, 16), Math.sqrt(2)/1.667))
  743. }
  744. var gen = generator.set(_t, synth, mods)
  745. }
  746. })
  747.  
  748.  
  749. t2 = timer.beat(1/4, [,1,,1,], function(_t, b){
  750. var attack = [[0,0], [0,1], [0,0], [0,1], [1,.667]]
  751. var release = [[0,.667], [-3,0], [1, 0]]
  752. var y = b % 2 == 1 ? 2 : 1/2
  753. var durations = [60 / bpm / 56, bpm / 60 * 1/8]//, bpm / 60 * y ]
  754. var opts = {}
  755. opts.c = Math.sqrt(2);
  756. opts.m = 2+b%4/Math.PI// Math.sqrt(Math.PI) / Math.sqrt(2);
  757. opts.f = 442/16/2//notes[b % 6].fq()// (bf)// * Math.pow(2, 3/12))
  758. opts.wave = 'sine'
  759. var stringer = clang(opts)
  760. var zmod = {}
  761. zmod.curves = [attack, release];
  762. zmod.durations = durations;
  763. var mod = nvelope(zmod.curves, zmod.durations);
  764. var synth = function(y){
  765. return function(t){
  766. t += 1000
  767. stringer.m = opts.m + (.5 + ( .05 * oz.saw(t, y)))//amod(opts.m, .05, t, 1/16)
  768. stringer.f = opts.f + (.5 + oz.sine(t, y/4))
  769. var x = (stringer.ring(t, ( 2.15 + oz.saw(t, 4)), amod(Math.sqrt(12), 1.15, t, 4)))
  770. return x
  771. }
  772. }
  773. generator.set(_t, synth(0), zmod)
  774. generator.set(_t + .13, synth(3/2/2), zmod)
  775. generator.set(_t + .26, synth(3/2/2/2), zmod)
  776. generator.set(_t + .39, synth(3/2/2/2/2), zmod)
  777. })
  778. },210966)
  779. setTimeout(function(){// this is my 666th session using this live code thing I made
  780. // I have previously run sessions as long as three days
  781. // the most live code updates performed during one session is 455
  782. // for this special occassion I am going to cheat
  783. //require('cheatcode')
  784. //synth.connect(master.destination)
  785. // that is not the only cheat
  786. // really, that isn't a cheat at all
  787. // cuz i wrote all the cheatcode
  788. // what i am about to do is cheat
  789. bpm = 74 / 2
  790. //timer=sync(bpm, master.sampleRate)
  791. basefq = 54 * 2
  792. t1.emit('stop')
  793. t2.emit('stop')
  794. gong.emit('stop')
  795. t1 = timer.beat(1/2, [1,,1,], function(_t, b){
  796. var bpm = 74
  797. var attack = [[0,0], [0,1], [0,0], [0,1], [1,.667]]
  798. var release = [[0,.667], [-3,0], [1, 0]]
  799. var y = b % 2 == 1 ? 2 : 1/2
  800. var durations = [60 / bpm / 128, bpm / 60 * 1/16]//, bpm / 60 * y ]
  801. var opts = {}
  802. opts.c = Math.sqrt(2);
  803. opts.m = Math.PI// Math.sqrt(Math.PI) / Math.sqrt(2);
  804. opts.f = 1200//notes[b % 6].fq()// (bf)// * Math.pow(2, 3/12))
  805. opts.wave = 'saw_i'
  806. var stringer = clang(opts)
  807. var zmod = {}
  808. zmod.curves = [attack, release];
  809. zmod.durations = durations;
  810. var mod = nvelope(zmod.curves, zmod.durations);
  811. var synth = function(y){
  812. return function(t){
  813. stringer.m = opts.m + (.251 * (Math.abs(oz.sine(t, y/2))))//amod(opts.m, .05, t, 1/16)
  814. //stringer.f = opts.f + (1 + oz.sine(t, y))
  815. var x = (stringer.ring(t, amod(0, 12, t, 12), amod(Math.sqrt(12), 1.25, t, 1/4)))
  816. return x
  817. }
  818. }
  819. generator.set(_t, synth(1/21), zmod)
  820. generator.set(_t + bpm / 60 / 2, synth(1/70), zmod)
  821. generator.set(_t + bpm / 60 / 4, synth(1/64), zmod)
  822. generator.set(_t + bpm / 60 / 8, synth(1/33), zmod)
  823. })
  824.  
  825.  
  826. gongbeat = beatmath(8, [1,2,3,4,5])
  827.  
  828. gong = timer.beat(1/2, [[,1,,,,,],[,1,,,,,],[,1,,,,,],[,1,,,,,],[,,,,,1,]], function (_t, b, xxx, swing){
  829.  
  830. var beat = b % 8
  831. var m = b % 128
  832. if(gongbeat(b)){
  833. var opts = {}
  834. opts.c = 1;
  835. opts.m = Math.PI / 3;
  836. opts.f = 54//
  837. opts.wave = 'square'
  838. var stringer = clang(opts)
  839. var fux = jdelay(480, .51, .2)
  840. var attack = [[0,0],[0,1], [1,1]]
  841. var release = [[1,1],[.24,1],[.25,0], [1,0]]
  842. var curves = [attack, release]
  843. var durs = [.020, .3670]
  844. var mods = {curves: curves, durations: durs}
  845. var lope = nvelope(curves, durs)
  846. var kx = Math.abs(Math.floor(amod(6, 1, _t, 1/3)))
  847. var fq = b % 8 % 5 === 0 ? (basefq * Math.sqrt(2)/2) * (kx / 5) : basefq
  848.  
  849. var synth = function(t,s,i){
  850. var wave = ''
  851. return (oz.sine(t,fq) * lope(t - _t)
  852. )
  853. return (stringer.ring(t, amod(0, Math.PI / 6, t, 16), Math.sqrt(2)/1.667))
  854. }
  855. var gen = generator.set(_t, synth, mods)
  856. }
  857. })
  858.  
  859.  
  860. t2 = timer.beat(1/4, [,1,,1,], function(_t, b){
  861. var attack = [[0,0], [0,1], [0,0], [0,1], [1,.667]]
  862. var release = [[0,.667], [-3,0], [1, 0]]
  863. var y = b % 2 == 1 ? 2 : 1/2
  864. var durations = [60 / bpm / 56, bpm / 60 * 1/8]//, bpm / 60 * y ]
  865. var opts = {}
  866. opts.c = Math.sqrt(2);
  867. opts.m = 2+b%4/Math.PI// Math.sqrt(Math.PI) / Math.sqrt(2);
  868. opts.f = 442/16/2//notes[b % 6].fq()// (bf)// * Math.pow(2, 3/12))
  869. opts.wave = 'sine'
  870. var stringer = clang(opts)
  871. var zmod = {}
  872. zmod.curves = [attack, release];
  873. zmod.durations = durations;
  874. var mod = nvelope(zmod.curves, zmod.durations);
  875. var synth = function(y){
  876. return function(t){
  877. t += 1000
  878. stringer.m = opts.m + (.5 + ( .05 * oz.saw(t, y)))//amod(opts.m, .05, t, 1/16)
  879. stringer.f = opts.f + (.5 + oz.sine(t, y/4))
  880. var x = (stringer.ring(t, ( 2.15 + oz.saw(t, 4)), amod(Math.sqrt(12), 1.15, t, 4)))
  881. return x
  882. }
  883. }
  884. generator.set(_t, synth(0), zmod)
  885. generator.set(_t + .13, synth(3/2/2), zmod)
  886. generator.set(_t + .26, synth(3/2/2/2), zmod)
  887. generator.set(_t + .39, synth(3/2/2/2/2), zmod)
  888. })
  889. },227533)
  890. setTimeout(function(){// this is my 666th session using this live code thing I made
  891. // I have previously run sessions as long as three days
  892. // the most live code updates performed during one session is 455
  893. // for this special occassion I am going to cheat
  894. //require('cheatcode')
  895. //synth.connect(master.destination)
  896. // that is not the only cheat
  897. // really, that isn't a cheat at all
  898. // cuz i wrote all the cheatcode
  899. // what i am about to do is cheat
  900. bpm = 74 / 2
  901. //timer=sync(bpm, master.sampleRate)
  902. basefq = 54 * 2
  903. t1.emit('stop')
  904. t2.emit('stop')
  905. gong.emit('stop')
  906. t1 = timer.beat(1/2, [1,,1,], function(_t, b){
  907. var bpm = 74
  908. var attack = [[0,0], [0,1], [0,0], [0,1], [1,.667]]
  909. var release = [[0,.667], [-3,0], [1, 0]]
  910. var y = b % 2 == 1 ? 2 : 1/2
  911. var durations = [60 / bpm / 128, bpm / 60 * 1/16]//, bpm / 60 * y ]
  912. var opts = {}
  913. opts.c = Math.sqrt(2);
  914. opts.m = Math.PI// Math.sqrt(Math.PI) / Math.sqrt(2);
  915. opts.f = 1200//notes[b % 6].fq()// (bf)// * Math.pow(2, 3/12))
  916. opts.wave = 'saw_i'
  917. var stringer = clang(opts)
  918. var zmod = {}
  919. zmod.curves = [attack, release];
  920. zmod.durations = durations;
  921. var mod = nvelope(zmod.curves, zmod.durations);
  922. var synth = function(y){
  923. return function(t){
  924. stringer.m = opts.m + (.0051 * (Math.abs(oz.sine(t, y/2))))//amod(opts.m, .05, t, 1/16)
  925. stringer.f = opts.f + (1 + oz.sine(t, y))
  926. var x = (stringer.ring(t, amod(0, 12, t, 12), amod(Math.sqrt(12), 1.25, t, 1/4)))
  927. return x
  928. }
  929. }
  930. generator.set(_t, synth(1/21), zmod)
  931. generator.set(_t + bpm / 60 / 2, synth(1/70), zmod)
  932. generator.set(_t + bpm / 60 / 4, synth(1/64), zmod)
  933. generator.set(_t + bpm / 60 / 8, synth(1/33), zmod)
  934. })
  935.  
  936.  
  937. gongbeat = beatmath(8, [1,2,3,4,5])
  938.  
  939. gong = timer.beat(1/2, [[,1,,,,,],[,1,,,,,],[,1,,,,,],[,1,,,,,],[,,,,,1,]], function (_t, b, xxx, swing){
  940.  
  941. var beat = b % 8
  942. var m = b % 128
  943. if(gongbeat(b)){
  944. var opts = {}
  945. opts.c = 1;
  946. opts.m = Math.PI / 3;
  947. opts.f = 54//
  948. opts.wave = 'square'
  949. var stringer = clang(opts)
  950. var fux = jdelay(480, .51, .2)
  951. var attack = [[0,0],[0,1], [1,1]]
  952. var release = [[1,1],[.24,1],[.25,0], [1,0]]
  953. var curves = [attack, release]
  954. var durs = [.020, .3670]
  955. var mods = {curves: curves, durations: durs}
  956. var lope = nvelope(curves, durs)
  957. var kx = Math.abs(Math.floor(amod(6, 1, _t, 1/3)))
  958. var fq = b % 8 % 5 === 0 ? (basefq * Math.sqrt(2)/2) * (kx / 5) : basefq
  959.  
  960. var synth = function(t,s,i){
  961. var wave = ''
  962. return (oz.sine(t,fq) * lope(t - _t)
  963. )
  964. return (stringer.ring(t, amod(0, Math.PI / 6, t, 16), Math.sqrt(2)/1.667))
  965. }
  966. var gen = generator.set(_t, synth, mods)
  967. }
  968. })
  969.  
  970.  
  971. t2 = timer.beat(1/4, [,1,,1,], function(_t, b){
  972. var attack = [[0,0], [0,1], [0,0], [0,1], [1,.667]]
  973. var release = [[0,.667], [-3,0], [1, 0]]
  974. var y = b % 2 == 1 ? 2 : 1/2
  975. var durations = [60 / bpm / 56, bpm / 60 * 1/8]//, bpm / 60 * y ]
  976. var opts = {}
  977. opts.c = Math.sqrt(2);
  978. opts.m = 2+b%4/Math.PI// Math.sqrt(Math.PI) / Math.sqrt(2);
  979. opts.f = 442/16/2//notes[b % 6].fq()// (bf)// * Math.pow(2, 3/12))
  980. opts.wave = 'sine'
  981. var stringer = clang(opts)
  982. var zmod = {}
  983. zmod.curves = [attack, release];
  984. zmod.durations = durations;
  985. var mod = nvelope(zmod.curves, zmod.durations);
  986. var synth = function(y){
  987. return function(t){
  988. t += 1000
  989. stringer.m = opts.m + (.5 + ( .05 * oz.saw(t, y)))//amod(opts.m, .05, t, 1/16)
  990. stringer.f = opts.f + (.5 + oz.sine(t, y/4))
  991. var x = (stringer.ring(t, ( 2.15 + oz.saw(t, 4)), amod(Math.sqrt(12), 1.15, t, 4)))
  992. return x
  993. }
  994. }
  995. generator.set(_t, synth(0), zmod)
  996. generator.set(_t + .13, synth(3/2/2), zmod)
  997. generator.set(_t + .26, synth(3/2/2/2), zmod)
  998. generator.set(_t + .39, synth(3/2/2/2/2), zmod)
  999. })
  1000. },231205)
  1001. setTimeout(function(){// this is my 666th session using this live code thing I made
  1002. // I have previously run sessions as long as three days
  1003. // the most live code updates performed during one session is 455
  1004. // for this special occassion I am going to cheat
  1005. //require('cheatcode')
  1006. //synth.connect(master.destination)
  1007. // that is not the only cheat
  1008. // really, that isn't a cheat at all
  1009. // cuz i wrote all the cheatcode
  1010. // what i am about to do is cheat
  1011. bpm = 74 / 2
  1012. //timer=sync(bpm, master.sampleRate)
  1013. basefq = 54 * 2
  1014. t1.emit('stop')
  1015. t2.emit('stop')
  1016. gong.emit('stop')
  1017. t1 = timer.beat(1/2, [1,,1,], function(_t, b){
  1018. var bpm = 74
  1019. var attack = [[0,0], [0,1], [0,0], [0,1], [1,.667]]
  1020. var release = [[0,.667], [-3,0], [1, 0]]
  1021. var y = b % 2 == 1 ? 2 : 1/2
  1022. var durations = [60 / bpm / 128, bpm / 60 * 1/16]//, bpm / 60 * y ]
  1023. var opts = {}
  1024. opts.c = Math.sqrt(2);
  1025. opts.m = Math.PI// Math.sqrt(Math.PI) / Math.sqrt(2);
  1026. opts.f = 1200//notes[b % 6].fq()// (bf)// * Math.pow(2, 3/12))
  1027. opts.wave = 'saw_i'
  1028. var stringer = clang(opts)
  1029. var zmod = {}
  1030. zmod.curves = [attack, release];
  1031. zmod.durations = durations;
  1032. var mod = nvelope(zmod.curves, zmod.durations);
  1033. var synth = function(y){
  1034. return function(t){
  1035. stringer.m = opts.m + (.051 * (Math.abs(oz.sine(t, y/2))))//amod(opts.m, .05, t, 1/16)
  1036. stringer.f = opts.f + (1 + oz.sine(t, y))
  1037. var x = (stringer.ring(t, amod(0, 12, t, 12), amod(Math.sqrt(12), 1.25, t, 1/4)))
  1038. return x
  1039. }
  1040. }
  1041. generator.set(_t, synth(1/21), zmod)
  1042. generator.set(_t + bpm / 60 / 2, synth(1/70), zmod)
  1043. generator.set(_t + bpm / 60 / 4, synth(1/64), zmod)
  1044. generator.set(_t + bpm / 60 / 8, synth(1/33), zmod)
  1045. })
  1046.  
  1047.  
  1048. gongbeat = beatmath(8, [1,2,3,4,5])
  1049.  
  1050. gong = timer.beat(1/2, [[,1,,,,,],[,1,,,,,],[,1,,,,,],[,1,,,,,],[,,,,,1,]], function (_t, b, xxx, swing){
  1051.  
  1052. var beat = b % 8
  1053. var m = b % 128
  1054. if(gongbeat(b)){
  1055. var opts = {}
  1056. opts.c = 1;
  1057. opts.m = Math.PI / 3;
  1058. opts.f = 54//
  1059. opts.wave = 'square'
  1060. var stringer = clang(opts)
  1061. var fux = jdelay(480, .51, .2)
  1062. var attack = [[0,0],[0,1], [1,1]]
  1063. var release = [[1,1],[.24,1],[.25,0], [1,0]]
  1064. var curves = [attack, release]
  1065. var durs = [.020, .3670]
  1066. var mods = {curves: curves, durations: durs}
  1067. var lope = nvelope(curves, durs)
  1068. var kx = Math.abs(Math.floor(amod(6, 1, _t, 1/3)))
  1069. var fq = b % 8 % 5 === 0 ? (basefq * Math.sqrt(2)/2) * (kx / 5) : basefq
  1070.  
  1071. var synth = function(t,s,i){
  1072. var wave = ''
  1073. return (oz.sine(t,fq) * lope(t - _t)
  1074. )
  1075. return (stringer.ring(t, amod(0, Math.PI / 6, t, 16), Math.sqrt(2)/1.667))
  1076. }
  1077. var gen = generator.set(_t, synth, mods)
  1078. }
  1079. })
  1080.  
  1081.  
  1082. t2 = timer.beat(1/4, [,1,,1,], function(_t, b){
  1083. var attack = [[0,0], [0,1], [0,0], [0,1], [1,.667]]
  1084. var release = [[0,.667], [-3,0], [1, 0]]
  1085. var y = b % 2 == 1 ? 2 : 1/2
  1086. var durations = [60 / bpm / 56, bpm / 60 * 1/8]//, bpm / 60 * y ]
  1087. var opts = {}
  1088. opts.c = Math.sqrt(2);
  1089. opts.m = 2+b%4/Math.PI// Math.sqrt(Math.PI) / Math.sqrt(2);
  1090. opts.f = 442/16/2//notes[b % 6].fq()// (bf)// * Math.pow(2, 3/12))
  1091. opts.wave = 'sine'
  1092. var stringer = clang(opts)
  1093. var zmod = {}
  1094. zmod.curves = [attack, release];
  1095. zmod.durations = durations;
  1096. var mod = nvelope(zmod.curves, zmod.durations);
  1097. var synth = function(y){
  1098. return function(t){
  1099. t += 1000
  1100. stringer.m = opts.m + (.5 + ( .05 * oz.saw(t, y)))//amod(opts.m, .05, t, 1/16)
  1101. stringer.f = opts.f + (.5 + oz.sine(t, y/4))
  1102. var x = (stringer.ring(t, ( 2.15 + oz.saw(t, 4)), amod(Math.sqrt(12), 1.15, t, 4)))
  1103. return x
  1104. }
  1105. }
  1106. generator.set(_t, synth(0), zmod)
  1107. generator.set(_t + .13, synth(3/2/2), zmod)
  1108. generator.set(_t + .26, synth(3/2/2/2), zmod)
  1109. generator.set(_t + .39, synth(3/2/2/2/2), zmod)
  1110. })
  1111. },234510)
  1112. setTimeout(function(){// this is my 666th session using this live code thing I made
  1113. // I have previously run sessions as long as three days
  1114. // the most live code updates performed during one session is 455
  1115. // for this special occassion I am going to cheat
  1116. //require('cheatcode')
  1117. //synth.connect(master.destination)
  1118. // that is not the only cheat
  1119. // really, that isn't a cheat at all
  1120. // cuz i wrote all the cheatcode
  1121. // what i am about to do is cheat
  1122. bpm = 74 / 2
  1123. //timer=sync(bpm, master.sampleRate)
  1124. basefq = 54 * 2
  1125. t1.emit('stop')
  1126. t2.emit('stop')
  1127. gong.emit('stop')
  1128. t1 = timer.beat(1/2, [1,,1,], function(_t, b){
  1129. var bpm = 74
  1130. var attack = [[0,0], [0,1], [0,0], [0,1], [1,.667]]
  1131. var release = [[0,.667], [-3,0], [1, 0]]
  1132. var y = b % 2 == 1 ? 2 : 1/2
  1133. var durations = [60 / bpm / 128, bpm / 60 * 1/16]//, bpm / 60 * y ]
  1134. var opts = {}
  1135. opts.c = Math.sqrt(2);
  1136. opts.m = Math.PI// Math.sqrt(Math.PI) / Math.sqrt(2);
  1137. opts.f = 1200//notes[b % 6].fq()// (bf)// * Math.pow(2, 3/12))
  1138. opts.wave = 'saw_i'
  1139. var stringer = clang(opts)
  1140. var zmod = {}
  1141. zmod.curves = [attack, release];
  1142. zmod.durations = durations;
  1143. var mod = nvelope(zmod.curves, zmod.durations);
  1144. var synth = function(y){
  1145. return function(t){
  1146. stringer.m = opts.m + (.251 * (Math.abs(oz.sine(t, y/2))))//amod(opts.m, .05, t, 1/16)
  1147. stringer.f = opts.f + (1 + oz.sine(t, y))
  1148. var x = (stringer.ring(t, amod(0, 12, t, 12), amod(Math.sqrt(12), 1.25, t, 1/4)))
  1149. return x
  1150. }
  1151. }
  1152. generator.set(_t, synth(1/21), zmod)
  1153. generator.set(_t + bpm / 60 / 2, synth(1/70), zmod)
  1154. generator.set(_t + bpm / 60 / 4, synth(1/64), zmod)
  1155. generator.set(_t + bpm / 60 / 8, synth(1/33), zmod)
  1156. })
  1157.  
  1158.  
  1159. gongbeat = beatmath(8, [1,2,3,4,5])
  1160.  
  1161. gong = timer.beat(1/2, [[,1,,,,,],[,1,,,,,],[,1,,,,,],[,1,,,,,],[,,,,,1,]], function (_t, b, xxx, swing){
  1162.  
  1163. var beat = b % 8
  1164. var m = b % 128
  1165. if(gongbeat(b)){
  1166. var opts = {}
  1167. opts.c = 1;
  1168. opts.m = Math.PI / 3;
  1169. opts.f = 54//
  1170. opts.wave = 'square'
  1171. var stringer = clang(opts)
  1172. var fux = jdelay(480, .51, .2)
  1173. var attack = [[0,0],[0,1], [1,1]]
  1174. var release = [[1,1],[.24,1],[.25,0], [1,0]]
  1175. var curves = [attack, release]
  1176. var durs = [.020, .3670]
  1177. var mods = {curves: curves, durations: durs}
  1178. var lope = nvelope(curves, durs)
  1179. var kx = Math.abs(Math.floor(amod(6, 1, _t, 1/3)))
  1180. var fq = b % 8 % 5 === 0 ? (basefq * Math.sqrt(2)/2) * (kx / 5) : basefq
  1181.  
  1182. var synth = function(t,s,i){
  1183. var wave = ''
  1184. return (oz.sine(t,fq) * lope(t - _t)
  1185. )
  1186. return (stringer.ring(t, amod(0, Math.PI / 6, t, 16), Math.sqrt(2)/1.667))
  1187. }
  1188. var gen = generator.set(_t, synth, mods)
  1189. }
  1190. })
  1191.  
  1192.  
  1193. t2 = timer.beat(1/4, [,1,,1,], function(_t, b){
  1194. var attack = [[0,0], [0,1], [0,0], [0,1], [1,.667]]
  1195. var release = [[0,.667], [-3,0], [1, 0]]
  1196. var y = b % 2 == 1 ? 2 : 1/2
  1197. var durations = [60 / bpm / 56, bpm / 60 * 1/8]//, bpm / 60 * y ]
  1198. var opts = {}
  1199. opts.c = Math.sqrt(2);
  1200. opts.m = 2+b%4/Math.PI// Math.sqrt(Math.PI) / Math.sqrt(2);
  1201. opts.f = 442/16/2//notes[b % 6].fq()// (bf)// * Math.pow(2, 3/12))
  1202. opts.wave = 'sine'
  1203. var stringer = clang(opts)
  1204. var zmod = {}
  1205. zmod.curves = [attack, release];
  1206. zmod.durations = durations;
  1207. var mod = nvelope(zmod.curves, zmod.durations);
  1208. var synth = function(y){
  1209. return function(t){
  1210. t += 1000
  1211. stringer.m = opts.m + (.5 + ( .05 * oz.saw(t, y)))//amod(opts.m, .05, t, 1/16)
  1212. stringer.f = opts.f + (.5 + oz.sine(t, y/4))
  1213. var x = (stringer.ring(t, ( 2.15 + oz.saw(t, 4)), amod(Math.sqrt(12), 1.15, t, 4)))
  1214. return x
  1215. }
  1216. }
  1217. generator.set(_t, synth(0), zmod)
  1218. generator.set(_t + .13, synth(3/2/2), zmod)
  1219. generator.set(_t + .26, synth(3/2/2/2), zmod)
  1220. generator.set(_t + .39, synth(3/2/2/2/2), zmod)
  1221. })
  1222. },247972)
  1223. setTimeout(function(){// this is my 666th session using this live code thing I made
  1224. // I have previously run sessions as long as three days
  1225. // the most live code updates performed during one session is 455
  1226. // for this special occassion I am going to cheat
  1227. //require('cheatcode')
  1228. //synth.connect(master.destination)
  1229. // that is not the only cheat
  1230. // really, that isn't a cheat at all
  1231. // cuz i wrote all the cheatcode
  1232. // what i am about to do is cheat
  1233. bpm = 74 / 2
  1234. //timer=sync(bpm, master.sampleRate)
  1235. basefq = 54 * 2
  1236. t1.emit('stop')
  1237. t2.emit('stop')
  1238. gong.emit('stop')
  1239. t1 = timer.beat(1/2, [1,,1,], function(_t, b){
  1240. var bpm = 74
  1241. var attack = [[0,0], [0,1], [0,0], [0,1], [1,.667]]
  1242. var release = [[0,.667], [-3,0], [1, 0]]
  1243. var y = b % 2 == 1 ? 2 : 1/2
  1244. var durations = [60 / bpm / 128, bpm / 60 * 1/16]//, bpm / 60 * y ]
  1245. var opts = {}
  1246. opts.c = Math.sqrt(2);
  1247. opts.m = Math.PI// Math.sqrt(Math.PI) / Math.sqrt(2);
  1248. opts.f = 1200//notes[b % 6].fq()// (bf)// * Math.pow(2, 3/12))
  1249. opts.wave = 'saw_i'
  1250. var stringer = clang(opts)
  1251. var zmod = {}
  1252. zmod.curves = [attack, release];
  1253. zmod.durations = durations;
  1254. var mod = nvelope(zmod.curves, zmod.durations);
  1255. var synth = function(y){
  1256. return function(t){
  1257. stringer.m = opts.m + (.251 * (Math.abs(oz.sine(t, y/2))))//amod(opts.m, .05, t, 1/16)
  1258. stringer.f = opts.f + (1 + oz.sine(t, 4))
  1259. var x = (stringer.ring(t, amod(0, 12, t, 12), amod(Math.sqrt(12), 1.25, t, 1/4)))
  1260. return x
  1261. }
  1262. }
  1263. generator.set(_t, synth(1/21), zmod)
  1264. generator.set(_t + bpm / 60 / 2, synth(1/70), zmod)
  1265. generator.set(_t + bpm / 60 / 4, synth(1/64), zmod)
  1266. generator.set(_t + bpm / 60 / 8, synth(1/33), zmod)
  1267. })
  1268.  
  1269.  
  1270. gongbeat = beatmath(8, [1,2,3,4,5])
  1271.  
  1272. gong = timer.beat(1/2, [[,1,,,,,],[,1,,,,,],[,1,,,,,],[,1,,,,,],[,,,,,1,]], function (_t, b, xxx, swing){
  1273.  
  1274. var beat = b % 8
  1275. var m = b % 128
  1276. if(gongbeat(b)){
  1277. var opts = {}
  1278. opts.c = 1;
  1279. opts.m = Math.PI / 3;
  1280. opts.f = 54//
  1281. opts.wave = 'square'
  1282. var stringer = clang(opts)
  1283. var fux = jdelay(480, .51, .2)
  1284. var attack = [[0,0],[0,1], [1,1]]
  1285. var release = [[1,1],[.24,1],[.25,0], [1,0]]
  1286. var curves = [attack, release]
  1287. var durs = [.020, .3670]
  1288. var mods = {curves: curves, durations: durs}
  1289. var lope = nvelope(curves, durs)
  1290. var kx = Math.abs(Math.floor(amod(6, 1, _t, 1/3)))
  1291. var fq = b % 8 % 5 === 0 ? (basefq * Math.sqrt(2)/2) * (kx / 5) : basefq
  1292.  
  1293. var synth = function(t,s,i){
  1294. var wave = ''
  1295. return (oz.sine(t,fq) * lope(t - _t)
  1296. )
  1297. return (stringer.ring(t, amod(0, Math.PI / 6, t, 16), Math.sqrt(2)/1.667))
  1298. }
  1299. var gen = generator.set(_t, synth, mods)
  1300. }
  1301. })
  1302.  
  1303.  
  1304. t2 = timer.beat(1/4, [,1,,1,], function(_t, b){
  1305. var attack = [[0,0], [0,1], [0,0], [0,1], [1,.667]]
  1306. var release = [[0,.667], [-3,0], [1, 0]]
  1307. var y = b % 2 == 1 ? 2 : 1/2
  1308. var durations = [60 / bpm / 56, bpm / 60 * 1/8]//, bpm / 60 * y ]
  1309. var opts = {}
  1310. opts.c = Math.sqrt(2);
  1311. opts.m = 2+b%4/Math.PI// Math.sqrt(Math.PI) / Math.sqrt(2);
  1312. opts.f = 442/16/2//notes[b % 6].fq()// (bf)// * Math.pow(2, 3/12))
  1313. opts.wave = 'sine'
  1314. var stringer = clang(opts)
  1315. var zmod = {}
  1316. zmod.curves = [attack, release];
  1317. zmod.durations = durations;
  1318. var mod = nvelope(zmod.curves, zmod.durations);
  1319. var synth = function(y){
  1320. return function(t){
  1321. t += 1000
  1322. stringer.m = opts.m + (.5 + ( .05 * oz.saw(t, y)))//amod(opts.m, .05, t, 1/16)
  1323. stringer.f = opts.f + (.5 + oz.sine(t, y/4))
  1324. var x = (stringer.ring(t, ( 2.15 + oz.saw(t, 4)), amod(Math.sqrt(12), 1.15, t, 4)))
  1325. return x
  1326. }
  1327. }
  1328. generator.set(_t, synth(0), zmod)
  1329. generator.set(_t + .13, synth(3/2/2), zmod)
  1330. generator.set(_t + .26, synth(3/2/2/2), zmod)
  1331. generator.set(_t + .39, synth(3/2/2/2/2), zmod)
  1332. })
  1333. },253342)
  1334. setTimeout(function(){// this is my 666th session using this live code thing I made
  1335. // I have previously run sessions as long as three days
  1336. // the most live code updates performed during one session is 455
  1337. // for this special occassion I am going to cheat
  1338. //require('cheatcode')
  1339. //synth.connect(master.destination)
  1340. // that is not the only cheat
  1341. // really, that isn't a cheat at all
  1342. // cuz i wrote all the cheatcode
  1343. // what i am about to do is cheat
  1344. bpm = 74 / 2
  1345. //timer=sync(bpm, master.sampleRate)
  1346. basefq = 54 * 2
  1347. t1.emit('stop')
  1348. t2.emit('stop')
  1349. gong.emit('stop')
  1350. t1 = timer.beat(1/2, [1,,1,], function(_t, b){
  1351. var bpm = 74
  1352. var attack = [[0,0], [0,1], [0,0], [0,1], [1,.667]]
  1353. var release = [[0,.667], [-3,0], [1, 0]]
  1354. var y = b % 2 == 1 ? 2 : 1/2
  1355. var durations = [60 / bpm / 128, bpm / 60 * 1/16]//, bpm / 60 * y ]
  1356. var opts = {}
  1357. opts.c = Math.sqrt(2);
  1358. opts.m = Math.PI// Math.sqrt(Math.PI) / Math.sqrt(2);
  1359. opts.f = 1200//notes[b % 6].fq()// (bf)// * Math.pow(2, 3/12))
  1360. opts.wave = 'saw_i'
  1361. var stringer = clang(opts)
  1362. var zmod = {}
  1363. zmod.curves = [attack, release];
  1364. zmod.durations = durations;
  1365. var mod = nvelope(zmod.curves, zmod.durations);
  1366. var synth = function(y){
  1367. return function(t){
  1368. stringer.m = opts.m + (.251 * (Math.abs(oz.sine(t, y/2))))//amod(opts.m, .05, t, 1/16)
  1369. stringer.f = opts.f + (1 + oz.sine(t, 12))
  1370. var x = (stringer.ring(t, amod(0, 12, t, 12), amod(Math.sqrt(12), 1.25, t, 1/4)))
  1371. return x
  1372. }
  1373. }
  1374. generator.set(_t, synth(1/21), zmod)
  1375. generator.set(_t + bpm / 60 / 2, synth(1/70), zmod)
  1376. generator.set(_t + bpm / 60 / 4, synth(1/64), zmod)
  1377. generator.set(_t + bpm / 60 / 8, synth(1/33), zmod)
  1378. })
  1379.  
  1380.  
  1381. gongbeat = beatmath(8, [1,2,3,4,5])
  1382.  
  1383. gong = timer.beat(1/2, [[,1,,,,,],[,1,,,,,],[,1,,,,,],[,1,,,,,],[,,,,,1,]], function (_t, b, xxx, swing){
  1384.  
  1385. var beat = b % 8
  1386. var m = b % 128
  1387. if(gongbeat(b)){
  1388. var opts = {}
  1389. opts.c = 1;
  1390. opts.m = Math.PI / 3;
  1391. opts.f = 54//
  1392. opts.wave = 'square'
  1393. var stringer = clang(opts)
  1394. var fux = jdelay(480, .51, .2)
  1395. var attack = [[0,0],[0,1], [1,1]]
  1396. var release = [[1,1],[.24,1],[.25,0], [1,0]]
  1397. var curves = [attack, release]
  1398. var durs = [.020, .3670]
  1399. var mods = {curves: curves, durations: durs}
  1400. var lope = nvelope(curves, durs)
  1401. var kx = Math.abs(Math.floor(amod(6, 1, _t, 1/3)))
  1402. var fq = b % 8 % 5 === 0 ? (basefq * Math.sqrt(2)/2) * (kx / 5) : basefq
  1403.  
  1404. var synth = function(t,s,i){
  1405. var wave = ''
  1406. return (oz.sine(t,fq) * lope(t - _t)
  1407. )
  1408. return (stringer.ring(t, amod(0, Math.PI / 6, t, 16), Math.sqrt(2)/1.667))
  1409. }
  1410. var gen = generator.set(_t, synth, mods)
  1411. }
  1412. })
  1413.  
  1414.  
  1415. t2 = timer.beat(1/4, [,1,,1,], function(_t, b){
  1416. var attack = [[0,0], [0,1], [0,0], [0,1], [1,.667]]
  1417. var release = [[0,.667], [-3,0], [1, 0]]
  1418. var y = b % 2 == 1 ? 2 : 1/2
  1419. var durations = [60 / bpm / 56, bpm / 60 * 1/8]//, bpm / 60 * y ]
  1420. var opts = {}
  1421. opts.c = Math.sqrt(2);
  1422. opts.m = 2+b%4/Math.PI// Math.sqrt(Math.PI) / Math.sqrt(2);
  1423. opts.f = 442/16/2//notes[b % 6].fq()// (bf)// * Math.pow(2, 3/12))
  1424. opts.wave = 'sine'
  1425. var stringer = clang(opts)
  1426. var zmod = {}
  1427. zmod.curves = [attack, release];
  1428. zmod.durations = durations;
  1429. var mod = nvelope(zmod.curves, zmod.durations);
  1430. var synth = function(y){
  1431. return function(t){
  1432. t += 1000
  1433. stringer.m = opts.m + (.5 + ( .05 * oz.saw(t, y)))//amod(opts.m, .05, t, 1/16)
  1434. stringer.f = opts.f + (.5 + oz.sine(t, y/4))
  1435. var x = (stringer.ring(t, ( 2.15 + oz.saw(t, 4)), amod(Math.sqrt(12), 1.15, t, 4)))
  1436. return x
  1437. }
  1438. }
  1439. generator.set(_t, synth(0), zmod)
  1440. generator.set(_t + .13, synth(3/2/2), zmod)
  1441. generator.set(_t + .26, synth(3/2/2/2), zmod)
  1442. generator.set(_t + .39, synth(3/2/2/2/2), zmod)
  1443. })
  1444. },258815)
  1445. setTimeout(function(){// this is my 666th session using this live code thing I made
  1446. // I have previously run sessions as long as three days
  1447. // the most live code updates performed during one session is 455
  1448. // for this special occassion I am going to cheat
  1449. //require('cheatcode')
  1450. //synth.connect(master.destination)
  1451. // that is not the only cheat
  1452. // really, that isn't a cheat at all
  1453. // cuz i wrote all the cheatcode
  1454. // what i am about to do is cheat
  1455. bpm = 74 / 2
  1456. //timer=sync(bpm, master.sampleRate)
  1457. basefq = 54 * 2
  1458. t1.emit('stop')
  1459. t2.emit('stop')
  1460. gong.emit('stop')
  1461. t1 = timer.beat(1/2, [1,,1,], function(_t, b){
  1462. var bpm = 74
  1463. var attack = [[0,0], [0,1], [0,0], [0,1], [1,.667]]
  1464. var release = [[0,.667], [-3,0], [1, 0]]
  1465. var y = b % 2 == 1 ? 2 : 1/2
  1466. var durations = [60 / bpm / 128, bpm / 60 * 1/16]//, bpm / 60 * y ]
  1467. var opts = {}
  1468. opts.c = Math.sqrt(2);
  1469. opts.m = Math.PI// Math.sqrt(Math.PI) / Math.sqrt(2);
  1470. opts.f = 1200//notes[b % 6].fq()// (bf)// * Math.pow(2, 3/12))
  1471. opts.wave = 'saw_i'
  1472. var stringer = clang(opts)
  1473. var zmod = {}
  1474. zmod.curves = [attack, release];
  1475. zmod.durations = durations;
  1476. var mod = nvelope(zmod.curves, zmod.durations);
  1477. var synth = function(y){
  1478. return function(t){
  1479. stringer.m = opts.m + (.251 * (Math.abs(oz.sine(t, y/2))))//amod(opts.m, .05, t, 1/16)
  1480. stringer.f = opts.f + (1 + oz.sine(t, 24))
  1481. var x = (stringer.ring(t, amod(0, 12, t, 12), amod(Math.sqrt(12), 1.25, t, 1/4)))
  1482. return x
  1483. }
  1484. }
  1485. generator.set(_t, synth(1/21), zmod)
  1486. generator.set(_t + bpm / 60 / 2, synth(1/70), zmod)
  1487. generator.set(_t + bpm / 60 / 4, synth(1/64), zmod)
  1488. generator.set(_t + bpm / 60 / 8, synth(1/33), zmod)
  1489. })
  1490.  
  1491.  
  1492. gongbeat = beatmath(8, [1,2,3,4,5])
  1493.  
  1494. gong = timer.beat(1/2, [[,1,,,,,],[,1,,,,,],[,1,,,,,],[,1,,,,,],[,,,,,1,]], function (_t, b, xxx, swing){
  1495.  
  1496. var beat = b % 8
  1497. var m = b % 128
  1498. if(gongbeat(b)){
  1499. var opts = {}
  1500. opts.c = 1;
  1501. opts.m = Math.PI / 3;
  1502. opts.f = 54//
  1503. opts.wave = 'square'
  1504. var stringer = clang(opts)
  1505. var fux = jdelay(480, .51, .2)
  1506. var attack = [[0,0],[0,1], [1,1]]
  1507. var release = [[1,1],[.24,1],[.25,0], [1,0]]
  1508. var curves = [attack, release]
  1509. var durs = [.020, .3670]
  1510. var mods = {curves: curves, durations: durs}
  1511. var lope = nvelope(curves, durs)
  1512. var kx = Math.abs(Math.floor(amod(6, 1, _t, 1/3)))
  1513. var fq = b % 8 % 5 === 0 ? (basefq * Math.sqrt(2)/2) * (kx / 5) : basefq
  1514.  
  1515. var synth = function(t,s,i){
  1516. var wave = ''
  1517. return (oz.sine(t,fq) * lope(t - _t)
  1518. )
  1519. return (stringer.ring(t, amod(0, Math.PI / 6, t, 16), Math.sqrt(2)/1.667))
  1520. }
  1521. var gen = generator.set(_t, synth, mods)
  1522. }
  1523. })
  1524.  
  1525.  
  1526. t2 = timer.beat(1/4, [,1,,1,], function(_t, b){
  1527. var attack = [[0,0], [0,1], [0,0], [0,1], [1,.667]]
  1528. var release = [[0,.667], [-3,0], [1, 0]]
  1529. var y = b % 2 == 1 ? 2 : 1/2
  1530. var durations = [60 / bpm / 56, bpm / 60 * 1/8]//, bpm / 60 * y ]
  1531. var opts = {}
  1532. opts.c = Math.sqrt(2);
  1533. opts.m = 2+b%4/Math.PI// Math.sqrt(Math.PI) / Math.sqrt(2);
  1534. opts.f = 442/16/2//notes[b % 6].fq()// (bf)// * Math.pow(2, 3/12))
  1535. opts.wave = 'sine'
  1536. var stringer = clang(opts)
  1537. var zmod = {}
  1538. zmod.curves = [attack, release];
  1539. zmod.durations = durations;
  1540. var mod = nvelope(zmod.curves, zmod.durations);
  1541. var synth = function(y){
  1542. return function(t){
  1543. t += 1000
  1544. stringer.m = opts.m + (.5 + ( .05 * oz.saw(t, y)))//amod(opts.m, .05, t, 1/16)
  1545. stringer.f = opts.f + (.5 + oz.sine(t, y/4))
  1546. var x = (stringer.ring(t, ( 2.15 + oz.saw(t, 4)), amod(Math.sqrt(12), 1.15, t, 4)))
  1547. return x
  1548. }
  1549. }
  1550. generator.set(_t, synth(0), zmod)
  1551. generator.set(_t + .13, synth(3/2/2), zmod)
  1552. generator.set(_t + .26, synth(3/2/2/2), zmod)
  1553. generator.set(_t + .39, synth(3/2/2/2/2), zmod)
  1554. })
  1555. },268406)
  1556. setTimeout(function(){// this is my 666th session using this live code thing I made
  1557. // I have previously run sessions as long as three days
  1558. // the most live code updates performed during one session is 455
  1559. // for this special occassion I am going to cheat
  1560. //require('cheatcode')
  1561. //synth.connect(master.destination)
  1562. // that is not the only cheat
  1563. // really, that isn't a cheat at all
  1564. // cuz i wrote all the cheatcode
  1565. // what i am about to do is cheat
  1566. bpm = 74 / 2
  1567. //timer=sync(bpm, master.sampleRate)
  1568. basefq = 54 * 2
  1569. t1.emit('stop')
  1570. t2.emit('stop')
  1571. gong.emit('stop')
  1572. t1 = timer.beat(1/2, [1,,1,], function(_t, b){
  1573. var bpm = 74
  1574. var attack = [[0,0], [0,1], [0,0], [0,1], [1,.667]]
  1575. var release = [[0,.667], [-3,0], [1, 0]]
  1576. var y = b % 2 == 1 ? 2 : 1/2
  1577. var durations = [60 / bpm / 128, bpm / 60 * 1/16]//, bpm / 60 * y ]
  1578. var opts = {}
  1579. opts.c = Math.sqrt(2);
  1580. opts.m = Math.PI// Math.sqrt(Math.PI) / Math.sqrt(2);
  1581. opts.f = 1200//notes[b % 6].fq()// (bf)// * Math.pow(2, 3/12))
  1582. opts.wave = 'saw_i'
  1583. var stringer = clang(opts)
  1584. var zmod = {}
  1585. zmod.curves = [attack, release];
  1586. zmod.durations = durations;
  1587. var mod = nvelope(zmod.curves, zmod.durations);
  1588. var synth = function(y){
  1589. return function(t){
  1590. stringer.m = opts.m + (.251 * (Math.abs(oz.sine(t, y/2))))//amod(opts.m, .05, t, 1/16)
  1591. stringer.f = opts.f + (1 + oz.sine(t, 128))
  1592. var x = (stringer.ring(t, amod(0, 12, t, 12), amod(Math.sqrt(12), 1.25, t, 1/4)))
  1593. return x
  1594. }
  1595. }
  1596. generator.set(_t, synth(1/21), zmod)
  1597. generator.set(_t + bpm / 60 / 2, synth(1/70), zmod)
  1598. generator.set(_t + bpm / 60 / 4, synth(1/64), zmod)
  1599. generator.set(_t + bpm / 60 / 8, synth(1/33), zmod)
  1600. })
  1601.  
  1602.  
  1603. gongbeat = beatmath(8, [1,2,3,4,5])
  1604.  
  1605. gong = timer.beat(1/2, [[,1,,,,,],[,1,,,,,],[,1,,,,,],[,1,,,,,],[,,,,,1,]], function (_t, b, xxx, swing){
  1606.  
  1607. var beat = b % 8
  1608. var m = b % 128
  1609. if(gongbeat(b)){
  1610. var opts = {}
  1611. opts.c = 1;
  1612. opts.m = Math.PI / 3;
  1613. opts.f = 54//
  1614. opts.wave = 'square'
  1615. var stringer = clang(opts)
  1616. var fux = jdelay(480, .51, .2)
  1617. var attack = [[0,0],[0,1], [1,1]]
  1618. var release = [[1,1],[.24,1],[.25,0], [1,0]]
  1619. var curves = [attack, release]
  1620. var durs = [.020, .3670]
  1621. var mods = {curves: curves, durations: durs}
  1622. var lope = nvelope(curves, durs)
  1623. var kx = Math.abs(Math.floor(amod(6, 1, _t, 1/3)))
  1624. var fq = b % 8 % 5 === 0 ? (basefq * Math.sqrt(2)/2) * (kx / 5) : basefq
  1625.  
  1626. var synth = function(t,s,i){
  1627. var wave = ''
  1628. return (oz.sine(t,fq) * lope(t - _t)
  1629. )
  1630. return (stringer.ring(t, amod(0, Math.PI / 6, t, 16), Math.sqrt(2)/1.667))
  1631. }
  1632. var gen = generator.set(_t, synth, mods)
  1633. }
  1634. })
  1635.  
  1636.  
  1637. t2 = timer.beat(1/4, [,1,,1,], function(_t, b){
  1638. var attack = [[0,0], [0,1], [0,0], [0,1], [1,.667]]
  1639. var release = [[0,.667], [-3,0], [1, 0]]
  1640. var y = b % 2 == 1 ? 2 : 1/2
  1641. var durations = [60 / bpm / 56, bpm / 60 * 1/8]//, bpm / 60 * y ]
  1642. var opts = {}
  1643. opts.c = Math.sqrt(2);
  1644. opts.m = 2+b%4/Math.PI// Math.sqrt(Math.PI) / Math.sqrt(2);
  1645. opts.f = 442/16/2//notes[b % 6].fq()// (bf)// * Math.pow(2, 3/12))
  1646. opts.wave = 'sine'
  1647. var stringer = clang(opts)
  1648. var zmod = {}
  1649. zmod.curves = [attack, release];
  1650. zmod.durations = durations;
  1651. var mod = nvelope(zmod.curves, zmod.durations);
  1652. var synth = function(y){
  1653. return function(t){
  1654. t += 1000
  1655. stringer.m = opts.m + (.5 + ( .05 * oz.saw(t, y)))//amod(opts.m, .05, t, 1/16)
  1656. stringer.f = opts.f + (.5 + oz.sine(t, y/4))
  1657. var x = (stringer.ring(t, ( 2.15 + oz.saw(t, 4)), amod(Math.sqrt(12), 1.15, t, 4)))
  1658. return x
  1659. }
  1660. }
  1661. generator.set(_t, synth(0), zmod)
  1662. generator.set(_t + .13, synth(3/2/2), zmod)
  1663. generator.set(_t + .26, synth(3/2/2/2), zmod)
  1664. generator.set(_t + .39, synth(3/2/2/2/2), zmod)
  1665. })
  1666. },275898)
  1667. setTimeout(function(){// this is my 666th session using this live code thing I made
  1668. // I have previously run sessions as long as three days
  1669. // the most live code updates performed during one session is 455
  1670. // for this special occassion I am going to cheat
  1671. //require('cheatcode')
  1672. //synth.connect(master.destination)
  1673. // that is not the only cheat
  1674. // really, that isn't a cheat at all
  1675. // cuz i wrote all the cheatcode
  1676. // what i am about to do is cheat
  1677. bpm = 74 / 2
  1678. //timer=sync(bpm, master.sampleRate)
  1679. basefq = 54 * 2
  1680. t1.emit('stop')
  1681. t2.emit('stop')
  1682. gong.emit('stop')
  1683. t1 = timer.beat(1/2, [1,,1,], function(_t, b){
  1684. var bpm = 74
  1685. var attack = [[0,0], [0,1], [0,0], [0,1], [1,.667]]
  1686. var release = [[0,.667], [-3,0], [1, 0]]
  1687. var y = b % 2 == 1 ? 2 : 1/2
  1688. var durations = [60 / bpm / 128, bpm / 60 * 1/16]//, bpm / 60 * y ]
  1689. var opts = {}
  1690. opts.c = Math.sqrt(2);
  1691. opts.m = Math.PI// Math.sqrt(Math.PI) / Math.sqrt(2);
  1692. opts.f = 1200//notes[b % 6].fq()// (bf)// * Math.pow(2, 3/12))
  1693. opts.wave = 'square'
  1694. var stringer = clang(opts)
  1695. var zmod = {}
  1696. zmod.curves = [attack, release];
  1697. zmod.durations = durations;
  1698. var mod = nvelope(zmod.curves, zmod.durations);
  1699. var synth = function(y){
  1700. return function(t){
  1701. stringer.m = opts.m + (.251 * (Math.abs(oz.sine(t, y/2))))//amod(opts.m, .05, t, 1/16)
  1702. stringer.f = opts.f + (1 + oz.sine(t, 128))
  1703. var x = (stringer.ring(t, amod(0, 12, t, 12), amod(Math.sqrt(12), 1.25, t, 1/4)))
  1704. return x
  1705. }
  1706. }
  1707. generator.set(_t, synth(1/21), zmod)
  1708. generator.set(_t + bpm / 60 / 2, synth(1/70), zmod)
  1709. generator.set(_t + bpm / 60 / 4, synth(1/64), zmod)
  1710. generator.set(_t + bpm / 60 / 8, synth(1/33), zmod)
  1711. })
  1712.  
  1713.  
  1714. gongbeat = beatmath(8, [1,2,3,4,5])
  1715.  
  1716. gong = timer.beat(1/2, [[,1,,,,,],[,1,,,,,],[,1,,,,,],[,1,,,,,],[,,,,,1,]], function (_t, b, xxx, swing){
  1717.  
  1718. var beat = b % 8
  1719. var m = b % 128
  1720. if(gongbeat(b)){
  1721. var opts = {}
  1722. opts.c = 1;
  1723. opts.m = Math.PI / 3;
  1724. opts.f = 54//
  1725. opts.wave = 'square'
  1726. var stringer = clang(opts)
  1727. var fux = jdelay(480, .51, .2)
  1728. var attack = [[0,0],[0,1], [1,1]]
  1729. var release = [[1,1],[.24,1],[.25,0], [1,0]]
  1730. var curves = [attack, release]
  1731. var durs = [.020, .3670]
  1732. var mods = {curves: curves, durations: durs}
  1733. var lope = nvelope(curves, durs)
  1734. var kx = Math.abs(Math.floor(amod(6, 1, _t, 1/3)))
  1735. var fq = b % 8 % 5 === 0 ? (basefq * Math.sqrt(2)/2) * (kx / 5) : basefq
  1736.  
  1737. var synth = function(t,s,i){
  1738. var wave = ''
  1739. return (oz.sine(t,fq) * lope(t - _t)
  1740. )
  1741. return (stringer.ring(t, amod(0, Math.PI / 6, t, 16), Math.sqrt(2)/1.667))
  1742. }
  1743. var gen = generator.set(_t, synth, mods)
  1744. }
  1745. })
  1746.  
  1747.  
  1748. t2 = timer.beat(1/4, [,1,,1,], function(_t, b){
  1749. var attack = [[0,0], [0,1], [0,0], [0,1], [1,.667]]
  1750. var release = [[0,.667], [-3,0], [1, 0]]
  1751. var y = b % 2 == 1 ? 2 : 1/2
  1752. var durations = [60 / bpm / 56, bpm / 60 * 1/8]//, bpm / 60 * y ]
  1753. var opts = {}
  1754. opts.c = Math.sqrt(2);
  1755. opts.m = 2+b%4/Math.PI// Math.sqrt(Math.PI) / Math.sqrt(2);
  1756. opts.f = 442/16/2//notes[b % 6].fq()// (bf)// * Math.pow(2, 3/12))
  1757. opts.wave = 'sine'
  1758. var stringer = clang(opts)
  1759. var zmod = {}
  1760. zmod.curves = [attack, release];
  1761. zmod.durations = durations;
  1762. var mod = nvelope(zmod.curves, zmod.durations);
  1763. var synth = function(y){
  1764. return function(t){
  1765. t += 1000
  1766. stringer.m = opts.m + (.5 + ( .05 * oz.saw(t, y)))//amod(opts.m, .05, t, 1/16)
  1767. stringer.f = opts.f + (.5 + oz.sine(t, y/4))
  1768. var x = (stringer.ring(t, ( 2.15 + oz.saw(t, 4)), amod(Math.sqrt(12), 1.15, t, 4)))
  1769. return x
  1770. }
  1771. }
  1772. generator.set(_t, synth(0), zmod)
  1773. generator.set(_t + .13, synth(3/2/2), zmod)
  1774. generator.set(_t + .26, synth(3/2/2/2), zmod)
  1775. generator.set(_t + .39, synth(3/2/2/2/2), zmod)
  1776. })
  1777. },291220)
  1778. setTimeout(function(){// this is my 666th session using this live code thing I made
  1779. // I have previously run sessions as long as three days
  1780. // the most live code updates performed during one session is 455
  1781. // for this special occassion I am going to cheat
  1782. //require('cheatcode')
  1783. //synth.connect(master.destination)
  1784. // that is not the only cheat
  1785. // really, that isn't a cheat at all
  1786. // cuz i wrote all the cheatcode
  1787. // what i am about to do is cheat
  1788. bpm = 74 / 2
  1789. //timer=sync(bpm, master.sampleRate)
  1790. basefq = 54 * 2
  1791. t1.emit('stop')
  1792. t2.emit('stop')
  1793. gong.emit('stop')
  1794. t1 = timer.beat(1/2, [1,,1,], function(_t, b){
  1795. var bpm = 74
  1796. var attack = [[0,0], [0,1], [0,0], [0,1], [1,.667]]
  1797. var release = [[0,.667], [-3,0], [1, 0]]
  1798. var y = b % 2 == 1 ? 2 : 1/2
  1799. var durations = [60 / bpm / 128 * 4, bpm / 60 * 1/16]//, bpm / 60 * y ]
  1800. var opts = {}
  1801. opts.c = Math.sqrt(2);
  1802. opts.m = Math.PI// Math.sqrt(Math.PI) / Math.sqrt(2);
  1803. opts.f = 1200//notes[b % 6].fq()// (bf)// * Math.pow(2, 3/12))
  1804. opts.wave = 'square'
  1805. var stringer = clang(opts)
  1806. var zmod = {}
  1807. zmod.curves = [attack, release];
  1808. zmod.durations = durations;
  1809. var mod = nvelope(zmod.curves, zmod.durations);
  1810. var synth = function(y){
  1811. return function(t){
  1812. stringer.m = opts.m + (.251 * (Math.abs(oz.sine(t, y/2))))//amod(opts.m, .05, t, 1/16)
  1813. stringer.f = opts.f + (1 + oz.sine(t, 128))
  1814. var x = (stringer.ring(t, amod(0, 12, t, 12), amod(Math.sqrt(12), 1.25, t, 1/4)))
  1815. return x
  1816. }
  1817. }
  1818. generator.set(_t, synth(1/21), zmod)
  1819. generator.set(_t + bpm / 60 / 2, synth(1/70), zmod)
  1820. generator.set(_t + bpm / 60 / 4, synth(1/64), zmod)
  1821. generator.set(_t + bpm / 60 / 8, synth(1/33), zmod)
  1822. })
  1823.  
  1824.  
  1825. gongbeat = beatmath(8, [1,2,3,4,5])
  1826.  
  1827. gong = timer.beat(1/2, [[,1,,,,,],[,1,,,,,],[,1,,,,,],[,1,,,,,],[,,,,,1,]], function (_t, b, xxx, swing){
  1828.  
  1829. var beat = b % 8
  1830. var m = b % 128
  1831. if(gongbeat(b)){
  1832. var opts = {}
  1833. opts.c = 1;
  1834. opts.m = Math.PI / 3;
  1835. opts.f = 54//
  1836. opts.wave = 'square'
  1837. var stringer = clang(opts)
  1838. var fux = jdelay(480, .51, .2)
  1839. var attack = [[0,0],[0,1], [1,1]]
  1840. var release = [[1,1],[.24,1],[.25,0], [1,0]]
  1841. var curves = [attack, release]
  1842. var durs = [.020, .3670]
  1843. var mods = {curves: curves, durations: durs}
  1844. var lope = nvelope(curves, durs)
  1845. var kx = Math.abs(Math.floor(amod(6, 1, _t, 1/3)))
  1846. var fq = b % 8 % 5 === 0 ? (basefq * Math.sqrt(2)/2) * (kx / 5) : basefq
  1847.  
  1848. var synth = function(t,s,i){
  1849. var wave = ''
  1850. return (oz.sine(t,fq) * lope(t - _t)
  1851. )
  1852. return (stringer.ring(t, amod(0, Math.PI / 6, t, 16), Math.sqrt(2)/1.667))
  1853. }
  1854. var gen = generator.set(_t, synth, mods)
  1855. }
  1856. })
  1857.  
  1858.  
  1859. t2 = timer.beat(1/4, [,1,,1,], function(_t, b){
  1860. var attack = [[0,0], [0,1], [0,0], [0,1], [1,.667]]
  1861. var release = [[0,.667], [-3,0], [1, 0]]
  1862. var y = b % 2 == 1 ? 2 : 1/2
  1863. var durations = [60 / bpm / 56, bpm / 60 * 1/8]//, bpm / 60 * y ]
  1864. var opts = {}
  1865. opts.c = Math.sqrt(2);
  1866. opts.m = 2+b%4/Math.PI// Math.sqrt(Math.PI) / Math.sqrt(2);
  1867. opts.f = 442/16/2//notes[b % 6].fq()// (bf)// * Math.pow(2, 3/12))
  1868. opts.wave = 'sine'
  1869. var stringer = clang(opts)
  1870. var zmod = {}
  1871. zmod.curves = [attack, release];
  1872. zmod.durations = durations;
  1873. var mod = nvelope(zmod.curves, zmod.durations);
  1874. var synth = function(y){
  1875. return function(t){
  1876. t += 1000
  1877. stringer.m = opts.m + (.5 + ( .05 * oz.saw(t, y)))//amod(opts.m, .05, t, 1/16)
  1878. stringer.f = opts.f + (.5 + oz.sine(t, y/4))
  1879. var x = (stringer.ring(t, ( 2.15 + oz.saw(t, 4)), amod(Math.sqrt(12), 1.15, t, 4)))
  1880. return x
  1881. }
  1882. }
  1883. generator.set(_t, synth(0), zmod)
  1884. generator.set(_t + .13, synth(3/2/2), zmod)
  1885. generator.set(_t + .26, synth(3/2/2/2), zmod)
  1886. generator.set(_t + .39, synth(3/2/2/2/2), zmod)
  1887. })
  1888. },296099)
  1889. setTimeout(function(){// this is my 666th session using this live code thing I made
  1890. // I have previously run sessions as long as three days
  1891. // the most live code updates performed during one session is 455
  1892. // for this special occassion I am going to cheat
  1893. //require('cheatcode')
  1894. //synth.connect(master.destination)
  1895. // that is not the only cheat
  1896. // really, that isn't a cheat at all
  1897. // cuz i wrote all the cheatcode
  1898. // what i am about to do is cheat
  1899. bpm = 74 / 2
  1900. //timer=sync(bpm, master.sampleRate)
  1901. basefq = 54 * 2
  1902. t1.emit('stop')
  1903. t2.emit('stop')
  1904. gong.emit('stop')
  1905. t1 = timer.beat(1/2, [1,,1,], function(_t, b){
  1906. var bpm = 74
  1907. var attack = [[0,0], [0,1], [0,0], [0,1], [1,.667]]
  1908. var release = [[0,.667], [-3,0], [1, 0]]
  1909. var y = b % 2 == 1 ? 2 : 1/2
  1910. var durations = [60 / bpm / 128 * 4, bpm / 60 * 1/16 * 2]//, bpm / 60 * y ]
  1911. var opts = {}
  1912. opts.c = Math.sqrt(2);
  1913. opts.m = Math.PI// Math.sqrt(Math.PI) / Math.sqrt(2);
  1914. opts.f = 1200//notes[b % 6].fq()// (bf)// * Math.pow(2, 3/12))
  1915. opts.wave = 'square'
  1916. var stringer = clang(opts)
  1917. var zmod = {}
  1918. zmod.curves = [attack, release];
  1919. zmod.durations = durations;
  1920. var mod = nvelope(zmod.curves, zmod.durations);
  1921. var synth = function(y){
  1922. return function(t){
  1923. stringer.m = opts.m + (.251 * (Math.abs(oz.sine(t, y/2))))//amod(opts.m, .05, t, 1/16)
  1924. stringer.f = opts.f + (1 + oz.sine(t, 128))
  1925. var x = (stringer.ring(t, amod(0, 12, t, 12), amod(Math.sqrt(12), 1.25, t, 1/4)))
  1926. return x
  1927. }
  1928. }
  1929. generator.set(_t, synth(1/21), zmod)
  1930. generator.set(_t + bpm / 60 / 2, synth(1/70), zmod)
  1931. generator.set(_t + bpm / 60 / 4, synth(1/64), zmod)
  1932. generator.set(_t + bpm / 60 / 8, synth(1/33), zmod)
  1933. })
  1934.  
  1935.  
  1936. gongbeat = beatmath(8, [1,2,3,4,5])
  1937.  
  1938. gong = timer.beat(1/2, [[,1,,,,,],[,1,,,,,],[,1,,,,,],[,1,,,,,],[,,,,,1,]], function (_t, b, xxx, swing){
  1939.  
  1940. var beat = b % 8
  1941. var m = b % 128
  1942. if(gongbeat(b)){
  1943. var opts = {}
  1944. opts.c = 1;
  1945. opts.m = Math.PI / 3;
  1946. opts.f = 54//
  1947. opts.wave = 'square'
  1948. var stringer = clang(opts)
  1949. var fux = jdelay(480, .51, .2)
  1950. var attack = [[0,0],[0,1], [1,1]]
  1951. var release = [[1,1],[.24,1],[.25,0], [1,0]]
  1952. var curves = [attack, release]
  1953. var durs = [.020, .3670]
  1954. var mods = {curves: curves, durations: durs}
  1955. var lope = nvelope(curves, durs)
  1956. var kx = Math.abs(Math.floor(amod(6, 1, _t, 1/3)))
  1957. var fq = b % 8 % 5 === 0 ? (basefq * Math.sqrt(2)/2) * (kx / 5) : basefq
  1958.  
  1959. var synth = function(t,s,i){
  1960. var wave = ''
  1961. return (oz.sine(t,fq) * lope(t - _t)
  1962. )
  1963. return (stringer.ring(t, amod(0, Math.PI / 6, t, 16), Math.sqrt(2)/1.667))
  1964. }
  1965. var gen = generator.set(_t, synth, mods)
  1966. }
  1967. })
  1968.  
  1969.  
  1970. t2 = timer.beat(1/4, [,1,,1,], function(_t, b){
  1971. var attack = [[0,0], [0,1], [0,0], [0,1], [1,.667]]
  1972. var release = [[0,.667], [-3,0], [1, 0]]
  1973. var y = b % 2 == 1 ? 2 : 1/2
  1974. var durations = [60 / bpm / 56, bpm / 60 * 1/8]//, bpm / 60 * y ]
  1975. var opts = {}
  1976. opts.c = Math.sqrt(2);
  1977. opts.m = 2+b%4/Math.PI// Math.sqrt(Math.PI) / Math.sqrt(2);
  1978. opts.f = 442/16/2//notes[b % 6].fq()// (bf)// * Math.pow(2, 3/12))
  1979. opts.wave = 'sine'
  1980. var stringer = clang(opts)
  1981. var zmod = {}
  1982. zmod.curves = [attack, release];
  1983. zmod.durations = durations;
  1984. var mod = nvelope(zmod.curves, zmod.durations);
  1985. var synth = function(y){
  1986. return function(t){
  1987. t += 1000
  1988. stringer.m = opts.m + (.5 + ( .05 * oz.saw(t, y)))//amod(opts.m, .05, t, 1/16)
  1989. stringer.f = opts.f + (.5 + oz.sine(t, y/4))
  1990. var x = (stringer.ring(t, ( 2.15 + oz.saw(t, 4)), amod(Math.sqrt(12), 1.15, t, 4)))
  1991. return x
  1992. }
  1993. }
  1994. generator.set(_t, synth(0), zmod)
  1995. generator.set(_t + .13, synth(3/2/2), zmod)
  1996. generator.set(_t + .26, synth(3/2/2/2), zmod)
  1997. generator.set(_t + .39, synth(3/2/2/2/2), zmod)
  1998. })
  1999. },304399)
  2000. setTimeout(function(){// this is my 666th session using this live code thing I made
  2001. // I have previously run sessions as long as three days
  2002. // the most live code updates performed during one session is 455
  2003. // for this special occassion I am going to cheat
  2004. //require('cheatcode')
  2005. //synth.connect(master.destination)
  2006. // that is not the only cheat
  2007. // really, that isn't a cheat at all
  2008. // cuz i wrote all the cheatcode
  2009. // what i am about to do is cheat
  2010. bpm = 74 / 2
  2011. //timer=sync(bpm, master.sampleRate)
  2012. basefq = 54 * 2
  2013. t1.emit('stop')
  2014. t2.emit('stop')
  2015. gong.emit('stop')
  2016. t1 = timer.beat(1/2, [1,,1,], function(_t, b){
  2017. var bpm = 74
  2018. var attack = [[0,1], [0,1], [0,0], [0,1], [1,.667]]
  2019. var release = [[0,.667], [-3,0], [1, 0]]
  2020. var y = b % 2 == 1 ? 2 : 1/2
  2021. var durations = [60 / bpm / 128 * 4, bpm / 60 * 1/16 * 2]//, bpm / 60 * y ]
  2022. var opts = {}
  2023. opts.c = Math.sqrt(2);
  2024. opts.m = Math.PI// Math.sqrt(Math.PI) / Math.sqrt(2);
  2025. opts.f = 1200//notes[b % 6].fq()// (bf)// * Math.pow(2, 3/12))
  2026. opts.wave = 'square'
  2027. var stringer = clang(opts)
  2028. var zmod = {}
  2029. zmod.curves = [attack, release];
  2030. zmod.durations = durations;
  2031. var mod = nvelope(zmod.curves, zmod.durations);
  2032. var synth = function(y){
  2033. return function(t){
  2034. stringer.m = opts.m + (.251 * (Math.abs(oz.sine(t, y/2))))//amod(opts.m, .05, t, 1/16)
  2035. stringer.f = opts.f + (1 + oz.sine(t, 128))
  2036. var x = (stringer.ring(t, amod(0, 12, t, 12), amod(Math.sqrt(12), 1.25, t, 1/4)))
  2037. return x
  2038. }
  2039. }
  2040. generator.set(_t, synth(1/21), zmod)
  2041. generator.set(_t + bpm / 60 / 2, synth(1/70), zmod)
  2042. generator.set(_t + bpm / 60 / 4, synth(1/64), zmod)
  2043. generator.set(_t + bpm / 60 / 8, synth(1/33), zmod)
  2044. })
  2045.  
  2046.  
  2047. gongbeat = beatmath(8, [1,2,3,4,5])
  2048.  
  2049. gong = timer.beat(1/2, [[,1,,,,,],[,1,,,,,],[,1,,,,,],[,1,,,,,],[,,,,,1,]], function (_t, b, xxx, swing){
  2050.  
  2051. var beat = b % 8
  2052. var m = b % 128
  2053. if(gongbeat(b)){
  2054. var opts = {}
  2055. opts.c = 1;
  2056. opts.m = Math.PI / 3;
  2057. opts.f = 54//
  2058. opts.wave = 'square'
  2059. var stringer = clang(opts)
  2060. var fux = jdelay(480, .51, .2)
  2061. var attack = [[0,0],[0,1], [1,1]]
  2062. var release = [[1,1],[.24,1],[.25,0], [1,0]]
  2063. var curves = [attack, release]
  2064. var durs = [.020, .3670]
  2065. var mods = {curves: curves, durations: durs}
  2066. var lope = nvelope(curves, durs)
  2067. var kx = Math.abs(Math.floor(amod(6, 1, _t, 1/3)))
  2068. var fq = b % 8 % 5 === 0 ? (basefq * Math.sqrt(2)/2) * (kx / 5) : basefq
  2069.  
  2070. var synth = function(t,s,i){
  2071. var wave = ''
  2072. return (oz.sine(t,fq) * lope(t - _t)
  2073. )
  2074. return (stringer.ring(t, amod(0, Math.PI / 6, t, 16), Math.sqrt(2)/1.667))
  2075. }
  2076. var gen = generator.set(_t, synth, mods)
  2077. }
  2078. })
  2079.  
  2080.  
  2081. t2 = timer.beat(1/4, [,1,,1,], function(_t, b){
  2082. var attack = [[0,0], [0,1], [0,0], [0,1], [1,.667]]
  2083. var release = [[0,.667], [-3,0], [1, 0]]
  2084. var y = b % 2 == 1 ? 2 : 1/2
  2085. var durations = [60 / bpm / 56, bpm / 60 * 1/8]//, bpm / 60 * y ]
  2086. var opts = {}
  2087. opts.c = Math.sqrt(2);
  2088. opts.m = 2+b%4/Math.PI// Math.sqrt(Math.PI) / Math.sqrt(2);
  2089. opts.f = 442/16/2//notes[b % 6].fq()// (bf)// * Math.pow(2, 3/12))
  2090. opts.wave = 'sine'
  2091. var stringer = clang(opts)
  2092. var zmod = {}
  2093. zmod.curves = [attack, release];
  2094. zmod.durations = durations;
  2095. var mod = nvelope(zmod.curves, zmod.durations);
  2096. var synth = function(y){
  2097. return function(t){
  2098. t += 1000
  2099. stringer.m = opts.m + (.5 + ( .05 * oz.saw(t, y)))//amod(opts.m, .05, t, 1/16)
  2100. stringer.f = opts.f + (.5 + oz.sine(t, y/4))
  2101. var x = (stringer.ring(t, ( 2.15 + oz.saw(t, 4)), amod(Math.sqrt(12), 1.15, t, 4)))
  2102. return x
  2103. }
  2104. }
  2105. generator.set(_t, synth(0), zmod)
  2106. generator.set(_t + .13, synth(3/2/2), zmod)
  2107. generator.set(_t + .26, synth(3/2/2/2), zmod)
  2108. generator.set(_t + .39, synth(3/2/2/2/2), zmod)
  2109. })
  2110. },337282)
  2111. setTimeout(function(){// this is my 666th session using this live code thing I made
  2112. // I have previously run sessions as long as three days
  2113. // the most live code updates performed during one session is 455
  2114. // for this special occassion I am going to cheat
  2115. //require('cheatcode')
  2116. //synth.connect(master.destination)
  2117. // that is not the only cheat
  2118. // really, that isn't a cheat at all
  2119. // cuz i wrote all the cheatcode
  2120. // what i am about to do is cheat
  2121. bpm = 74 / 2
  2122. //timer=sync(bpm, master.sampleRate)
  2123. basefq = 54 * 2
  2124. t1.emit('stop')
  2125. t2.emit('stop')
  2126. gong.emit('stop')
  2127. t1 = timer.beat(1/2, [1,,1,], function(_t, b){
  2128. var bpm = 74
  2129. var attack = [[0,1], [0,1], [0,0], [0,1], [1,.667]]
  2130. var release = [[0,.667], [-3,0], [1, 0]]
  2131. var y = b % 2 == 1 ? 2 : 1/2
  2132. var durations = [60 / bpm / 128 * 4, bpm / 60 * 1/16 * 2]//, bpm / 60 * y ]
  2133. var opts = {}
  2134. opts.c = Math.sqrt(2);
  2135. opts.m = Math.PI// Math.sqrt(Math.PI) / Math.sqrt(2);
  2136. opts.f = 1200//notes[b % 6].fq()// (bf)// * Math.pow(2, 3/12))
  2137. opts.wave = 'square'
  2138. var stringer = clang(opts)
  2139. var zmod = {}
  2140. zmod.curves = [attack, release];
  2141. zmod.durations = durations;
  2142. var mod = nvelope(zmod.curves, zmod.durations);
  2143. var synth = function(y){
  2144. return function(t){
  2145. stringer.m = opts.m + (.251 * (Math.abs(oz.sine(t, y/2))))//amod(opts.m, .05, t, 1/16)
  2146. stringer.f = opts.f + (1 + oz.sine(t, 128))
  2147. var x = (stringer.ring(t, amod(0, 12, t, 12), amod(Math.sqrt(12), 1.25, t, 1/4)))
  2148. return x
  2149. }
  2150. }
  2151. generator.set(_t, synth(1/21), zmod)
  2152. generator.set(_t + bpm / 60 / 2, synth(1/70), zmod)
  2153. generator.set(_t + bpm / 60 / 4, synth(1/64), zmod)
  2154. generator.set(_t + bpm / 60 / 8, synth(1/33), zmod)
  2155. })
  2156.  
  2157.  
  2158. gongbeat = beatmath(8, [1,2,3,4,5])
  2159.  
  2160. gong = timer.beat(1/2, [[,1,,,,,],[,1,,,,,],[,1,,,,,],[,1,,,,,],[,,,,,1,]], function (_t, b, xxx, swing){
  2161.  
  2162. var beat = b % 8
  2163. var m = b % 128
  2164. if(gongbeat(b)){
  2165. var opts = {}
  2166. opts.c = 1;
  2167. opts.m = Math.PI / 3;
  2168. opts.f = 54//
  2169. opts.wave = 'square'
  2170. var stringer = clang(opts)
  2171. var fux = jdelay(480, .51, .2)
  2172. var attack = [[0,0],[0,1], [1,1]]
  2173. var release = [[1,1],[.24,1],[.25,0], [1,0]]
  2174. var curves = [attack, release]
  2175. var durs = [.020, .3670]
  2176. var mods = {curves: curves, durations: durs}
  2177. var lope = nvelope(curves, durs)
  2178. var kx = Math.abs(Math.floor(amod(6, 1, _t, 1/3)))
  2179. var fq = b % 8 % 5 === 0 ? (basefq * Math.sqrt(2)/2) * (kx / 5) : basefq
  2180.  
  2181. var synth = function(t,s,i){
  2182. var wave = ''
  2183. return (oz.sine(t,fq) * lope(t - _t)
  2184. )
  2185. return (stringer.ring(t, amod(0, Math.PI / 6, t, 16), Math.sqrt(2)/1.667))
  2186. }
  2187. var gen = generator.set(_t, synth, mods)
  2188. }
  2189. })
  2190.  
  2191.  
  2192. t2 = timer.beat(1, [,1,,1,], function(_t, b){
  2193. bpm = 74 / 4
  2194. var attack = [[0,0], [0,1], [0,0], [0,1], [1,.667]]
  2195. var release = [[0,.667], [-3,0], [1, 0]]
  2196. var y = b % 2 == 1 ? 2 : 1/2
  2197. var durations = [60 / bpm / 56, bpm / 60 * 1/8]//, bpm / 60 * y ]
  2198. var opts = {}
  2199. opts.c = Math.sqrt(2);
  2200. opts.m = 2+b%4/Math.PI// Math.sqrt(Math.PI) / Math.sqrt(2);
  2201. opts.f = 442/16/2//notes[b % 6].fq()// (bf)// * Math.pow(2, 3/12))
  2202. opts.wave = 'sine'
  2203. var stringer = clang(opts)
  2204. var zmod = {}
  2205. zmod.curves = [attack, release];
  2206. zmod.durations = durations;
  2207. var mod = nvelope(zmod.curves, zmod.durations);
  2208. var synth = function(y){
  2209. return function(t){
  2210. t += 1000
  2211. stringer.m = opts.m + (.5 + ( .05 * oz.saw(t, y)))//amod(opts.m, .05, t, 1/16)
  2212. stringer.f = opts.f + (.5 + oz.sine(t, y/4))
  2213. var x = (stringer.ring(t, ( 2.15 + oz.saw(t, 4)), amod(Math.sqrt(12), 1.15, t, 4)))
  2214. return x
  2215. }
  2216. }
  2217. generator.set(_t, synth(0), zmod)
  2218. generator.set(_t + .13, synth(3/2/2), zmod)
  2219. generator.set(_t + .26, synth(3/2/2/2), zmod)
  2220. generator.set(_t + .39, synth(3/2/2/2/2), zmod)
  2221. })
  2222. },344015)
  2223. setTimeout(function(){// this is my 666th session using this live code thing I made
  2224. // I have previously run sessions as long as three days
  2225. // the most live code updates performed during one session is 455
  2226. // for this special occassion I am going to cheat
  2227. //require('cheatcode')
  2228. //synth.connect(master.destination)
  2229. // that is not the only cheat
  2230. // really, that isn't a cheat at all
  2231. // cuz i wrote all the cheatcode
  2232. // what i am about to do is cheat
  2233. bpm = 74 / 2
  2234. //timer=sync(bpm, master.sampleRate)
  2235. basefq = 54 * 2
  2236. t1.emit('stop')
  2237. t2.emit('stop')
  2238. gong.emit('stop')
  2239. t1 = timer.beat(1/2, [1,,1,], function(_t, b){
  2240. var bpm = 74
  2241. var attack = [[0,1], [0,1], [0,0], [0,1], [1,.667]]
  2242. var release = [[0,.667], [-3,0], [1, 0]]
  2243. var y = b % 2 == 1 ? 2 : 1/2
  2244. var durations = [60 / bpm / 128 * 4, bpm / 60 * 1/16 * 2]//, bpm / 60 * y ]
  2245. var opts = {}
  2246. opts.c = Math.sqrt(2);
  2247. opts.m = Math.PI// Math.sqrt(Math.PI) / Math.sqrt(2);
  2248. opts.f = 1200//notes[b % 6].fq()// (bf)// * Math.pow(2, 3/12))
  2249. opts.wave = 'square'
  2250. var stringer = clang(opts)
  2251. var zmod = {}
  2252. zmod.curves = [attack, release];
  2253. zmod.durations = durations;
  2254. var mod = nvelope(zmod.curves, zmod.durations);
  2255. var synth = function(y){
  2256. return function(t){
  2257. stringer.m = opts.m + (.251 * (Math.abs(oz.sine(t, y/2))))//amod(opts.m, .05, t, 1/16)
  2258. stringer.f = opts.f + (1 + oz.sine(t, 128))
  2259. var x = (stringer.ring(t, amod(0, 12, t, 12), amod(Math.sqrt(12), 1.25, t, 1/4)))
  2260. return x
  2261. }
  2262. }
  2263. generator.set(_t, synth(1/21), zmod)
  2264. generator.set(_t + bpm / 60 / 2, synth(1/70), zmod)
  2265. generator.set(_t + bpm / 60 / 4, synth(1/64), zmod)
  2266. generator.set(_t + bpm / 60 / 8, synth(1/33), zmod)
  2267. })
  2268.  
  2269.  
  2270. gongbeat = beatmath(8, [1,2,3,4,5])
  2271.  
  2272. gong = timer.beat(1/2, [[,1,,,,,],[,1,,,,,],[,1,,,,,],[,1,,,,,],[,,,,,1,]], function (_t, b, xxx, swing){
  2273.  
  2274. var beat = b % 8
  2275. var m = b % 128
  2276. if(gongbeat(b)){
  2277. var opts = {}
  2278. opts.c = 1;
  2279. opts.m = Math.PI / 3;
  2280. opts.f = 54//
  2281. opts.wave = 'square'
  2282. var stringer = clang(opts)
  2283. var fux = jdelay(480, .51, .2)
  2284. var attack = [[0,0],[0,1], [1,1]]
  2285. var release = [[1,1],[.24,1],[.25,0], [1,0]]
  2286. var curves = [attack, release]
  2287. var durs = [.020, .3670]
  2288. var mods = {curves: curves, durations: durs}
  2289. var lope = nvelope(curves, durs)
  2290. var kx = Math.abs(Math.floor(amod(6, 1, _t, 1/3)))
  2291. var fq = b % 8 % 5 === 0 ? (basefq * Math.sqrt(2)/2) * (kx / 5) : basefq
  2292.  
  2293. var synth = function(t,s,i){
  2294. var wave = ''
  2295. return (oz.sine(t,fq) * lope(t - _t)
  2296. )
  2297. return (stringer.ring(t, amod(0, Math.PI / 6, t, 16), Math.sqrt(2)/1.667))
  2298. }
  2299. var gen = generator.set(_t, synth, mods)
  2300. }
  2301. })
  2302.  
  2303.  
  2304. t2 = timer.beat(1, [,1,,1,], function(_t, b){
  2305. var bpm = 74 / 4
  2306. var attack = [[0,0], [0,1], [0,0], [0,1], [1,.667]]
  2307. var release = [[0,.667], [-3,0], [1, 0]]
  2308. var y = b % 2 == 1 ? 2 : 1/2
  2309. var durations = [60 / bpm / 56, bpm / 60 * 1/8]//, bpm / 60 * y ]
  2310. var opts = {}
  2311. opts.c = Math.sqrt(2);
  2312. opts.m = 2+b%4/Math.PI// Math.sqrt(Math.PI) / Math.sqrt(2);
  2313. opts.f = 442/16/2//notes[b % 6].fq()// (bf)// * Math.pow(2, 3/12))
  2314. opts.wave = 'sine'
  2315. var stringer = clang(opts)
  2316. var zmod = {}
  2317. zmod.curves = [attack, release];
  2318. zmod.durations = durations;
  2319. var mod = nvelope(zmod.curves, zmod.durations);
  2320. var synth = function(y){
  2321. return function(t){
  2322. t += 1000
  2323. stringer.m = opts.m + (.5 + ( .05 * oz.saw(t, y)))//amod(opts.m, .05, t, 1/16)
  2324. stringer.f = opts.f + (.5 + oz.sine(t, y/4))
  2325. var x = (stringer.ring(t, ( 2.15 + oz.saw(t, 4)), amod(Math.sqrt(12), 1.15, t, 4)))
  2326. return x
  2327. }
  2328. }
  2329. generator.set(_t, synth(0), zmod)
  2330. generator.set(_t + .13, synth(3/2/2), zmod)
  2331. generator.set(_t + .26, synth(3/2/2/2), zmod)
  2332. generator.set(_t + .39, synth(3/2/2/2/2), zmod)
  2333. })
  2334. },347529)
  2335. setTimeout(function(){// this is my 666th session using this live code thing I made
  2336. // I have previously run sessions as long as three days
  2337. // the most live code updates performed during one session is 455
  2338. // for this special occassion I am going to cheat
  2339. //require('cheatcode')
  2340. //synth.connect(master.destination)
  2341. // that is not the only cheat
  2342. // really, that isn't a cheat at all
  2343. // cuz i wrote all the cheatcode
  2344. // what i am about to do is cheat
  2345. bpm = 74 / 2
  2346. //timer=sync(bpm, master.sampleRate)
  2347. basefq = 54 * 2
  2348. t1.emit('stop')
  2349. t2.emit('stop')
  2350. gong.emit('stop')
  2351. t1 = timer.beat(1/2, [1,,1,], function(_t, b){
  2352. var bpm = 74
  2353. var attack = [[0,1], [0,1], [0,0], [0,1], [1,.667]]
  2354. var release = [[0,.667], [-3,0], [1, 0]]
  2355. var y = b % 2 == 1 ? 2 : 1/2
  2356. var durations = [60 / bpm / 128 * 4, bpm / 60 * 1/16 * 2]//, bpm / 60 * y ]
  2357. var opts = {}
  2358. opts.c = Math.sqrt(2);
  2359. opts.m = Math.PI// Math.sqrt(Math.PI) / Math.sqrt(2);
  2360. opts.f = 1200//notes[b % 6].fq()// (bf)// * Math.pow(2, 3/12))
  2361. opts.wave = 'square'
  2362. var stringer = clang(opts)
  2363. var zmod = {}
  2364. zmod.curves = [attack, release];
  2365. zmod.durations = durations;
  2366. var mod = nvelope(zmod.curves, zmod.durations);
  2367. var synth = function(y){
  2368. return function(t){
  2369. stringer.m = opts.m + (.251 * (Math.abs(oz.sine(t, y/2))))//amod(opts.m, .05, t, 1/16)
  2370. stringer.f = opts.f + (1 + oz.sine(t, 128))
  2371. var x = (stringer.ring(t, amod(0, 12, t, 12), amod(Math.sqrt(12), 1.25, t, 1/4)))
  2372. return x
  2373. }
  2374. }
  2375. generator.set(_t, synth(1/21), zmod)
  2376. generator.set(_t + bpm / 60 / 2, synth(1/70), zmod)
  2377. generator.set(_t + bpm / 60 / 4, synth(1/64), zmod)
  2378. generator.set(_t + bpm / 60 / 8, synth(1/33), zmod)
  2379. })
  2380.  
  2381.  
  2382. gongbeat = beatmath(8, [1,2,3,4,5])
  2383.  
  2384. gong = timer.beat(1/2, [[,1,,,,,],[,1,,,,,],[,1,,,,,],[,1,,,,,],[,,,,,1,]], function (_t, b, xxx, swing){
  2385.  
  2386. var beat = b % 8
  2387. var m = b % 128
  2388. if(gongbeat(b)){
  2389. var opts = {}
  2390. opts.c = 1;
  2391. opts.m = Math.PI / 3;
  2392. opts.f = 54//
  2393. opts.wave = 'square'
  2394. var stringer = clang(opts)
  2395. var fux = jdelay(480, .51, .2)
  2396. var attack = [[0,0],[0,1], [1,1]]
  2397. var release = [[1,1],[.24,1],[.25,0], [1,0]]
  2398. var curves = [attack, release]
  2399. var durs = [.020, .3670]
  2400. var mods = {curves: curves, durations: durs}
  2401. var lope = nvelope(curves, durs)
  2402. var kx = Math.abs(Math.floor(amod(6, 1, _t, 1/3)))
  2403. var fq = b % 8 % 5 === 0 ? (basefq * Math.sqrt(2)/2) * (kx / 5) : basefq
  2404.  
  2405. var synth = function(t,s,i){
  2406. var wave = ''
  2407. return (oz.sine(t,fq) * lope(t - _t)
  2408. )
  2409. return (stringer.ring(t, amod(0, Math.PI / 6, t, 16), Math.sqrt(2)/1.667))
  2410. }
  2411. var gen = generator.set(_t, synth, mods)
  2412. }
  2413. })
  2414.  
  2415.  
  2416. t2 = timer.beat(1, [,1,,1,], function(_t, b){
  2417. var bpm = 74 / 4 / 2
  2418. var attack = [[0,0], [0,1], [0,0], [0,1], [1,.667]]
  2419. var release = [[0,.667], [-3,0], [1, 0]]
  2420. var y = b % 2 == 1 ? 2 : 1/2
  2421. var durations = [60 / bpm / 56, bpm / 60 * 1/8]//, bpm / 60 * y ]
  2422. var opts = {}
  2423. opts.c = Math.sqrt(2);
  2424. opts.m = 2+b%4/Math.PI// Math.sqrt(Math.PI) / Math.sqrt(2);
  2425. opts.f = 442/16/2//notes[b % 6].fq()// (bf)// * Math.pow(2, 3/12))
  2426. opts.wave = 'sine'
  2427. var stringer = clang(opts)
  2428. var zmod = {}
  2429. zmod.curves = [attack, release];
  2430. zmod.durations = durations;
  2431. var mod = nvelope(zmod.curves, zmod.durations);
  2432. var synth = function(y){
  2433. return function(t){
  2434. t += 1000
  2435. stringer.m = opts.m + (.5 + ( .05 * oz.saw(t, y)))//amod(opts.m, .05, t, 1/16)
  2436. stringer.f = opts.f + (.5 + oz.sine(t, y/4))
  2437. var x = (stringer.ring(t, ( 2.15 + oz.saw(t, 4)), amod(Math.sqrt(12), 1.15, t, 4)))
  2438. return x
  2439. }
  2440. }
  2441. generator.set(_t, synth(0), zmod)
  2442. generator.set(_t + .13, synth(3/2/2), zmod)
  2443. generator.set(_t + .26, synth(3/2/2/2), zmod)
  2444. generator.set(_t + .39, synth(3/2/2/2/2), zmod)
  2445. })
  2446. },353260)
  2447. setTimeout(function(){// this is my 666th session using this live code thing I made
  2448. // I have previously run sessions as long as three days
  2449. // the most live code updates performed during one session is 455
  2450. // for this special occassion I am going to cheat
  2451. //require('cheatcode')
  2452. //synth.connect(master.destination)
  2453. // that is not the only cheat
  2454. // really, that isn't a cheat at all
  2455. // cuz i wrote all the cheatcode
  2456. // what i am about to do is cheat
  2457. bpm = 74 / 2
  2458. //timer=sync(bpm, master.sampleRate)
  2459. basefq = 54 * 2
  2460. t1.emit('stop')
  2461. t2.emit('stop')
  2462. gong.emit('stop')
  2463. t1 = timer.beat(1/2, [1,,1,], function(_t, b){
  2464. var bpm = 74
  2465. var attack = [[0,1], [0,1], [0,0], [0,1], [1,.667]]
  2466. var release = [[0,.667], [-3,0], [1, 0]]
  2467. var y = b % 2 == 1 ? 2 : 1/2
  2468. var durations = [60 / bpm / 128 * 4, bpm / 60 * 1/16 * 2]//, bpm / 60 * y ]
  2469. var opts = {}
  2470. opts.c = Math.sqrt(2);
  2471. opts.m = Math.PI// Math.sqrt(Math.PI) / Math.sqrt(2);
  2472. opts.f = 1200//notes[b % 6].fq()// (bf)// * Math.pow(2, 3/12))
  2473. opts.wave = 'square'
  2474. var stringer = clang(opts)
  2475. var zmod = {}
  2476. zmod.curves = [attack, release];
  2477. zmod.durations = durations;
  2478. var mod = nvelope(zmod.curves, zmod.durations);
  2479. var synth = function(y){
  2480. return function(t){
  2481. stringer.m = opts.m + (.251 * (Math.abs(oz.sine(t, y/2))))//amod(opts.m, .05, t, 1/16)
  2482. stringer.f = opts.f + (1 + oz.sine(t, 128))
  2483. var x = (stringer.ring(t, amod(0, 12, t, 12), amod(Math.sqrt(12), 1.25, t, 1/4)))
  2484. return x
  2485. }
  2486. }
  2487. generator.set(_t, synth(1/21), zmod)
  2488. generator.set(_t + bpm / 60 / 2, synth(1/70), zmod)
  2489. generator.set(_t + bpm / 60 / 4, synth(1/64), zmod)
  2490. generator.set(_t + bpm / 60 / 8, synth(1/33), zmod)
  2491. })
  2492.  
  2493.  
  2494. gongbeat = beatmath(8, [1,2,3,4,5])
  2495.  
  2496. gong = timer.beat(1/2, [[,1,,,,,],[,1,,,,,],[,1,,,,,],[,1,,,,,],[,,,,,1,]], function (_t, b, xxx, swing){
  2497.  
  2498. var beat = b % 8
  2499. var m = b % 128
  2500. if(gongbeat(b)){
  2501. var opts = {}
  2502. opts.c = 1;
  2503. opts.m = Math.PI / 3;
  2504. opts.f = 54//
  2505. opts.wave = 'square'
  2506. var stringer = clang(opts)
  2507. var fux = jdelay(480, .51, .2)
  2508. var attack = [[0,0],[0,1], [1,1]]
  2509. var release = [[1,1],[.24,1],[.25,0], [1,0]]
  2510. var curves = [attack, release]
  2511. var durs = [.020, .3670]
  2512. var mods = {curves: curves, durations: durs}
  2513. var lope = nvelope(curves, durs)
  2514. var kx = Math.abs(Math.floor(amod(6, 1, _t, 1/3)))
  2515. var fq = b % 8 % 5 === 0 ? (basefq * Math.sqrt(2)/2) * (kx / 5) : basefq
  2516.  
  2517. var synth = function(t,s,i){
  2518. var wave = ''
  2519. return (oz.sine(t,fq) * lope(t - _t)
  2520. )
  2521. return (stringer.ring(t, amod(0, Math.PI / 6, t, 16), Math.sqrt(2)/1.667))
  2522. }
  2523. var gen = generator.set(_t, synth, mods)
  2524. }
  2525. })
  2526.  
  2527.  
  2528. t2 = timer.beat(1, [,1,,1,], function(_t, b){
  2529. var bpm = 74 / 4 / 2 / 2
  2530. var attack = [[0,0], [0,1], [0,0], [0,1], [1,.667]]
  2531. var release = [[0,.667], [-3,0], [1, 0]]
  2532. var y = b % 2 == 1 ? 2 : 1/2
  2533. var durations = [60 / bpm / 56, bpm / 60 * 1/8]//, bpm / 60 * y ]
  2534. var opts = {}
  2535. opts.c = Math.sqrt(2);
  2536. opts.m = 2+b%4/Math.PI// Math.sqrt(Math.PI) / Math.sqrt(2);
  2537. opts.f = 442/16/2//notes[b % 6].fq()// (bf)// * Math.pow(2, 3/12))
  2538. opts.wave = 'sine'
  2539. var stringer = clang(opts)
  2540. var zmod = {}
  2541. zmod.curves = [attack, release];
  2542. zmod.durations = durations;
  2543. var mod = nvelope(zmod.curves, zmod.durations);
  2544. var synth = function(y){
  2545. return function(t){
  2546. t += 1000
  2547. stringer.m = opts.m + (.5 + ( .05 * oz.saw(t, y)))//amod(opts.m, .05, t, 1/16)
  2548. stringer.f = opts.f + (.5 + oz.sine(t, y/4))
  2549. var x = (stringer.ring(t, ( 2.15 + oz.saw(t, 4)), amod(Math.sqrt(12), 1.15, t, 4)))
  2550. return x
  2551. }
  2552. }
  2553. generator.set(_t, synth(0), zmod)
  2554. generator.set(_t + .13, synth(3/2/2), zmod)
  2555. generator.set(_t + .26, synth(3/2/2/2), zmod)
  2556. generator.set(_t + .39, synth(3/2/2/2/2), zmod)
  2557. })
  2558. },407759)
  2559. setTimeout(function(){// this is my 666th session using this live code thing I made
  2560. // I have previously run sessions as long as three days
  2561. // the most live code updates performed during one session is 455
  2562. // for this special occassion I am going to cheat
  2563. //require('cheatcode')
  2564. //synth.connect(master.destination)
  2565. // that is not the only cheat
  2566. // really, that isn't a cheat at all
  2567. // cuz i wrote all the cheatcode
  2568. // what i am about to do is cheat
  2569. bpm = 74 / 2
  2570. //timer=sync(bpm, master.sampleRate)
  2571. basefq = 54 * 2
  2572. t1.emit('stop')
  2573. t2.emit('stop')
  2574. gong.emit('stop')
  2575. t1 = timer.beat(1/2, [1,,1,], function(_t, b){
  2576. var bpm = 74
  2577. var attack = [[0,1], [0,1], [0,0], [0,1], [1,.667]]
  2578. var release = [[0,.667], [-3,0], [1, 0]]
  2579. var y = b % 2 == 1 ? 2 : 1/2
  2580. var durations = [60 / bpm / 128 * 4, bpm / 60 * 1/16 * 2]//, bpm / 60 * y ]
  2581. var opts = {}
  2582. opts.c = Math.sqrt(2);
  2583. opts.m = Math.PI// Math.sqrt(Math.PI) / Math.sqrt(2);
  2584. opts.f = 1200//notes[b % 6].fq()// (bf)// * Math.pow(2, 3/12))
  2585. opts.wave = 'square'
  2586. var stringer = clang(opts)
  2587. var zmod = {}
  2588. zmod.curves = [attack, release];
  2589. zmod.durations = durations;
  2590. var mod = nvelope(zmod.curves, zmod.durations);
  2591. var synth = function(y){
  2592. return function(t){
  2593. stringer.m = opts.m + (.251 * (Math.abs(oz.sine(t, y/2))))//amod(opts.m, .05, t, 1/16)
  2594. //stringer.f = opts.f + (1 + oz.sine(t, 128))
  2595. var x = (stringer.ring(t, amod(0, 12, t, 12), amod(Math.sqrt(12), 1.25, t, 1/4)))
  2596. return x
  2597. }
  2598. }
  2599. generator.set(_t, synth(1/21), zmod)
  2600. generator.set(_t + bpm / 60 / 2, synth(1/70), zmod)
  2601. generator.set(_t + bpm / 60 / 4, synth(1/64), zmod)
  2602. generator.set(_t + bpm / 60 / 8, synth(1/33), zmod)
  2603. })
  2604.  
  2605.  
  2606. gongbeat = beatmath(8, [1,2,3,4,5])
  2607.  
  2608. gong = timer.beat(1/2, [[,1,,,,,],[,1,,,,,],[,1,,,,,],[,1,,,,,],[,,,,,1,]], function (_t, b, xxx, swing){
  2609.  
  2610. var beat = b % 8
  2611. var m = b % 128
  2612. if(gongbeat(b)){
  2613. var opts = {}
  2614. opts.c = 1;
  2615. opts.m = Math.PI / 3;
  2616. opts.f = 54//
  2617. opts.wave = 'square'
  2618. var stringer = clang(opts)
  2619. var fux = jdelay(480, .51, .2)
  2620. var attack = [[0,0],[0,1], [1,1]]
  2621. var release = [[1,1],[.24,1],[.25,0], [1,0]]
  2622. var curves = [attack, release]
  2623. var durs = [.020, .3670]
  2624. var mods = {curves: curves, durations: durs}
  2625. var lope = nvelope(curves, durs)
  2626. var kx = Math.abs(Math.floor(amod(6, 1, _t, 1/3)))
  2627. var fq = b % 8 % 5 === 0 ? (basefq * Math.sqrt(2)/2) * (kx / 5) : basefq
  2628.  
  2629. var synth = function(t,s,i){
  2630. var wave = ''
  2631. return (oz.sine(t,fq) * lope(t - _t)
  2632. )
  2633. return (stringer.ring(t, amod(0, Math.PI / 6, t, 16), Math.sqrt(2)/1.667))
  2634. }
  2635. var gen = generator.set(_t, synth, mods)
  2636. }
  2637. })
  2638.  
  2639.  
  2640. t2 = timer.beat(1, [,1,,1,], function(_t, b){
  2641. var bpm = 74 / 4 / 2
  2642. var attack = [[0,0], [0,1], [0,0], [0,1], [1,.667]]
  2643. var release = [[0,.667], [-3,0], [1, 0]]
  2644. var y = b % 2 == 1 ? 2 : 1/2
  2645. var durations = [60 / bpm / 56, bpm / 60 * 1/8]//, bpm / 60 * y ]
  2646. var opts = {}
  2647. opts.c = Math.sqrt(2);
  2648. opts.m = 2+b%4/Math.PI// Math.sqrt(Math.PI) / Math.sqrt(2);
  2649. opts.f = 442/16/2//notes[b % 6].fq()// (bf)// * Math.pow(2, 3/12))
  2650. opts.wave = 'sine'
  2651. var stringer = clang(opts)
  2652. var zmod = {}
  2653. zmod.curves = [attack, release];
  2654. zmod.durations = durations;
  2655. var mod = nvelope(zmod.curves, zmod.durations);
  2656. var synth = function(y){
  2657. return function(t){
  2658. t += 1000
  2659. stringer.m = opts.m + (.5 + ( .05 * oz.saw(t, y)))//amod(opts.m, .05, t, 1/16)
  2660. stringer.f = opts.f + (.5 + oz.sine(t, y/4))
  2661. var x = (stringer.ring(t, ( 2.15 + oz.saw(t, 4)), amod(Math.sqrt(12), 1.15, t, 4)))
  2662. return x
  2663. }
  2664. }
  2665. generator.set(_t, synth(0), zmod)
  2666. generator.set(_t + .13, synth(3/2/2), zmod)
  2667. generator.set(_t + .26, synth(3/2/2/2), zmod)
  2668. generator.set(_t + .39, synth(3/2/2/2/2), zmod)
  2669. })
  2670. },420443)
  2671. setTimeout(function(){// this is my 666th session using this live code thing I made
  2672. // I have previously run sessions as long as three days
  2673. // the most live code updates performed during one session is 455
  2674. // for this special occassion I am going to cheat
  2675. //require('cheatcode')
  2676. //synth.connect(master.destination)
  2677. // that is not the only cheat
  2678. // really, that isn't a cheat at all
  2679. // cuz i wrote all the cheatcode
  2680. // what i am about to do is cheat
  2681. bpm = 74 / 2
  2682. //timer=sync(bpm, master.sampleRate)
  2683. basefq = 54 * 2
  2684. t1.emit('stop')
  2685. t2.emit('stop')
  2686. gong.emit('stop')
  2687. t1 = timer.beat(1/2, [1,,1,], function(_t, b){
  2688. var bpm = 74
  2689. var attack = [[0,1], [0,1], [0,0], [0,1], [1,.667]]
  2690. var release = [[0,.667], [-3,0], [1, 0]]
  2691. var y = b % 2 == 1 ? 2 : 1/2
  2692. var durations = [60 / bpm / 128 * 4, bpm / 60 * 1/16 * 2]//, bpm / 60 * y ]
  2693. var opts = {}
  2694. opts.c = Math.sqrt(2);
  2695. opts.m = Math.PI// Math.sqrt(Math.PI) / Math.sqrt(2);
  2696. opts.f = 1200//notes[b % 6].fq()// (bf)// * Math.pow(2, 3/12))
  2697. opts.wave = 'square'
  2698. var stringer = clang(opts)
  2699. var zmod = {}
  2700. zmod.curves = [attack, release];
  2701. zmod.durations = durations;
  2702. var mod = nvelope(zmod.curves, zmod.durations);
  2703. var synth = function(y){
  2704. return function(t){
  2705. stringer.m = opts.m + (.251 * (Math.abs(oz.sine(t, y/2))))//amod(opts.m, .05, t, 1/16)
  2706. //stringer.f = opts.f + (1 + oz.sine(t, 128))
  2707. var x = (stringer.ring(t, amod(0, 12, t, 12), amod(Math.sqrt(12), 1.25, t, 1/4)))
  2708. return x
  2709. }
  2710. }
  2711. generator.set(_t, synth(1/21), zmod)
  2712. generator.set(_t + bpm / 60 / 2, synth(1/70), zmod)
  2713. generator.set(_t + bpm / 60 / 4, synth(1/64), zmod)
  2714. generator.set(_t + bpm / 60 / 8, synth(1/33), zmod)
  2715. })
  2716.  
  2717.  
  2718. gongbeat = beatmath(8, [1,2,3,4,5])
  2719.  
  2720. gong = timer.beat(1/2, [[,1,,,,,],[,1,,,,,],[,1,,,,,],[,1,,,,,],[,,,,,1,]], function (_t, b, xxx, swing){
  2721.  
  2722. var beat = b % 8
  2723. var m = b % 128
  2724. if(gongbeat(b)){
  2725. var opts = {}
  2726. opts.c = 1;
  2727. opts.m = Math.PI / 3;
  2728. opts.f = 54//
  2729. opts.wave = 'square'
  2730. var stringer = clang(opts)
  2731. var fux = jdelay(480, .51, .2)
  2732. var attack = [[0,0],[0,1], [1,1]]
  2733. var release = [[1,1],[.24,1],[.25,0], [1,0]]
  2734. var curves = [attack, release]
  2735. var durs = [.020, .3670]
  2736. var mods = {curves: curves, durations: durs}
  2737. var lope = nvelope(curves, durs)
  2738. var kx = Math.abs(Math.floor(amod(6, 1, _t, 1/3)))
  2739. var fq = b % 8 % 5 === 0 ? (basefq * Math.sqrt(2)/2) * (kx / 5) : basefq
  2740.  
  2741. var synth = function(t,s,i){
  2742. var wave = ''
  2743. return (oz.sine(t,fq) * lope(t - _t)
  2744. )
  2745. return (stringer.ring(t, amod(0, Math.PI / 6, t, 16), Math.sqrt(2)/1.667))
  2746. }
  2747. var gen = generator.set(_t, synth, mods)
  2748. }
  2749. })
  2750.  
  2751.  
  2752. t2 = timer.beat(1, [,1,,1,], function(_t, b){
  2753. var bpm = 74 / 4 / 2 / 4
  2754. var attack = [[0,0], [0,1], [0,0], [0,1], [1,.667]]
  2755. var release = [[0,.667], [-3,0], [1, 0]]
  2756. var y = b % 2 == 1 ? 2 : 1/2
  2757. var durations = [60 / bpm / 56, bpm / 60 * 1/8]//, bpm / 60 * y ]
  2758. var opts = {}
  2759. opts.c = Math.sqrt(2);
  2760. opts.m = 2+b%4/Math.PI// Math.sqrt(Math.PI) / Math.sqrt(2);
  2761. opts.f = 442/16/2//notes[b % 6].fq()// (bf)// * Math.pow(2, 3/12))
  2762. opts.wave = 'sine'
  2763. var stringer = clang(opts)
  2764. var zmod = {}
  2765. zmod.curves = [attack, release];
  2766. zmod.durations = durations;
  2767. var mod = nvelope(zmod.curves, zmod.durations);
  2768. var synth = function(y){
  2769. return function(t){
  2770. t += 1000
  2771. stringer.m = opts.m + (.5 + ( .05 * oz.saw(t, y)))//amod(opts.m, .05, t, 1/16)
  2772. stringer.f = opts.f + (.5 + oz.sine(t, y/4))
  2773. var x = (stringer.ring(t, ( 2.15 + oz.saw(t, 4)), amod(Math.sqrt(12), 1.15, t, 4)))
  2774. return x
  2775. }
  2776. }
  2777. generator.set(_t, synth(0), zmod)
  2778. generator.set(_t + .13, synth(3/2/2), zmod)
  2779. generator.set(_t + .26, synth(3/2/2/2), zmod)
  2780. generator.set(_t + .39, synth(3/2/2/2/2), zmod)
  2781. })
  2782. },429844)
  2783. setTimeout(function(){// this is my 666th session using this live code thing I made
  2784. // I have previously run sessions as long as three days
  2785. // the most live code updates performed during one session is 455
  2786. // for this special occassion I am going to cheat
  2787. //require('cheatcode')
  2788. //synth.connect(master.destination)
  2789. // that is not the only cheat
  2790. // really, that isn't a cheat at all
  2791. // cuz i wrote all the cheatcode
  2792. // what i am about to do is cheat
  2793. bpm = 74 / 2
  2794. //timer=sync(bpm, master.sampleRate)
  2795. basefq = 54 * 2
  2796. t1.emit('stop')
  2797. t2.emit('stop')
  2798. gong.emit('stop')
  2799. t1 = timer.beat(1/2, [1,,1,], function(_t, b){
  2800. var bpm = 74
  2801. var attack = [[0,1], [0,1], [0,0], [0,1], [1,.667]]
  2802. var release = [[0,.667], [-3,0], [1, 0]]
  2803. var y = b % 2 == 1 ? 2 : 1/2
  2804. var durations = [60 / bpm / 128 * 4, bpm / 60 * 1/16 * 2]//, bpm / 60 * y ]
  2805. var opts = {}
  2806. opts.c = Math.sqrt(2);
  2807. opts.m = Math.PI// Math.sqrt(Math.PI) / Math.sqrt(2);
  2808. opts.f = 1200//notes[b % 6].fq()// (bf)// * Math.pow(2, 3/12))
  2809. opts.wave = 'square'
  2810. var stringer = clang(opts)
  2811. var zmod = {}
  2812. zmod.curves = [attack, release];
  2813. zmod.durations = durations;
  2814. var mod = nvelope(zmod.curves, zmod.durations);
  2815. var synth = function(y){
  2816. return function(t){
  2817. stringer.m = opts.m + (.251 * (Math.abs(oz.sine(t, y/2))))//amod(opts.m, .05, t, 1/16)
  2818. //stringer.f = opts.f + (1 + oz.sine(t, 128))
  2819. var x = (stringer.ring(t, amod(0, 12, t, 12), amod(Math.sqrt(12), 1.25, t, 1/4)))
  2820. return x
  2821. }
  2822. }
  2823. generator.set(_t, synth(1/21), zmod)
  2824. generator.set(_t + bpm / 60 / 2, synth(1/70), zmod)
  2825. generator.set(_t + bpm / 60 / 4, synth(1/64), zmod)
  2826. generator.set(_t + bpm / 60 / 8, synth(1/33), zmod)
  2827. })
  2828.  
  2829.  
  2830. gongbeat = beatmath(8, [1,2,3,4,5])
  2831.  
  2832. gong = timer.beat(1/2, [[,1,,,,,],[,1,,,,,],[,1,,,,,],[,1,,,,,],[,,,,,1,]], function (_t, b, xxx, swing){
  2833.  
  2834. var beat = b % 8
  2835. var m = b % 128
  2836. if(gongbeat(b)){
  2837. var opts = {}
  2838. opts.c = 1;
  2839. opts.m = Math.PI / 3;
  2840. opts.f = 54//
  2841. opts.wave = 'square'
  2842. var stringer = clang(opts)
  2843. var fux = jdelay(480, .51, .2)
  2844. var attack = [[0,0],[0,1], [1,1]]
  2845. var release = [[1,1],[.24,1],[.25,0], [1,0]]
  2846. var curves = [attack, release]
  2847. var durs = [.020, .3670]
  2848. var mods = {curves: curves, durations: durs}
  2849. var lope = nvelope(curves, durs)
  2850. var kx = Math.abs(Math.floor(amod(6, 1, _t, 1/3)))
  2851. var fq = b % 8 % 5 === 0 ? (basefq * Math.sqrt(2)/2) * (kx / 5) : basefq
  2852.  
  2853. var synth = function(t,s,i){
  2854. var wave = ''
  2855. return (oz.sine(t,fq) * lope(t - _t)
  2856. )
  2857. return (stringer.ring(t, amod(0, Math.PI / 6, t, 16), Math.sqrt(2)/1.667))
  2858. }
  2859. var gen = generator.set(_t, synth, mods)
  2860. }
  2861. })
  2862.  
  2863.  
  2864. t2 = timer.beat(1, [,1,,1,], function(_t, b){
  2865. var bpm = 74 / 4 / 2 / 2
  2866. var attack = [[0,0], [0,1], [0,0], [0,1], [1,.667]]
  2867. var release = [[0,.667], [-3,0], [1, 0]]
  2868. var y = b % 2 == 1 ? 2 : 1/2
  2869. var durations = [60 / bpm / 56, bpm / 60 * 1/8]//, bpm / 60 * y ]
  2870. var opts = {}
  2871. opts.c = Math.sqrt(2);
  2872. opts.m = 2+b%4/Math.PI// Math.sqrt(Math.PI) / Math.sqrt(2);
  2873. opts.f = 442/16/2//notes[b % 6].fq()// (bf)// * Math.pow(2, 3/12))
  2874. opts.wave = 'sine'
  2875. var stringer = clang(opts)
  2876. var zmod = {}
  2877. zmod.curves = [attack, release];
  2878. zmod.durations = durations;
  2879. var mod = nvelope(zmod.curves, zmod.durations);
  2880. var synth = function(y){
  2881. return function(t){
  2882. t += 1000
  2883. stringer.m = opts.m + (.5 + ( .05 * oz.saw(t, y)))//amod(opts.m, .05, t, 1/16)
  2884. stringer.f = opts.f + (.5 + oz.sine(t, y/4))
  2885. var x = (stringer.ring(t, ( 2.15 + oz.saw(t, 4)), amod(Math.sqrt(12), 1.15, t, 4)))
  2886. return x
  2887. }
  2888. }
  2889. generator.set(_t, synth(0), zmod)
  2890. generator.set(_t + .13, synth(3/2/2), zmod)
  2891. generator.set(_t + .26, synth(3/2/2/2), zmod)
  2892. generator.set(_t + .39, synth(3/2/2/2/2), zmod)
  2893. })
  2894. },432708)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement