Advertisement
RudeCode

Untitled

Dec 5th, 2018
2,674
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // LiveCoding by RudeCode /w visuals by b00leant
  2.  
  3.  
  4. n=NdefMixer(s);
  5. Ndef.clear;
  6.  
  7.  
  8. // OSC  - S E N D
  9.  
  10. b = NetAddr.new("192.168.1.25", 8000);
  11.  
  12. b.sendMsg("/cubo", 1);
  13.  
  14. ///////////////////////////////////////////////
  15. //////////////////////////////////////////////
  16.  
  17. //Load setup file to get examples working
  18. ("C:/Users/Mauro/Desktop/howto_co34pt_liveCode-master/Setup/Setup.scd").load;
  19.  
  20. p.clock.tempo = 120/60;
  21.  
  22. ~windNoise={Pan2.ar(Gendy4.ar(0,initCPs:1))};
  23.  
  24. (
  25. b = NetAddr.new("192.168.1.25", 8000);
  26. b.sendMsg("/cuboView", 1);
  27. Ndef(\wind,~windNoise).play;
  28. )
  29.  
  30. //YUPPA by Nathaniel Virgo ('headcube')-140-character
  31. ~yuppa = {x=Saw.ar([50,50.1]);8.do{|i|f=2**(8-i);x=BRF.ar(AllpassN.ar(x,1,0.1/(12-i),2),80**TRand.ar(0,1,Impulse.ar(f/32,1/2)).lag(1/f)*80,2)};x};
  32.  
  33. (
  34. b.sendMsg("/cuboRotateX", 30);
  35. //Ndef(\yu,~yuppa).play;
  36. ~yuppa.play;
  37. )
  38.  
  39.  
  40. // II° part
  41.  
  42.  
  43.  
  44.  
  45.  
  46. (
  47. SynthDef(\onSal, {
  48.     arg carfreq=300, modfreq=550, envdur=8;
  49.     var sig;
  50.     sig=PMOsc.ar(carfreq, modfreq, Line.ar(0,20,envdur,doneAction:2 )!2, 0, 0.02);
  51.     Out.ar(0, sig);
  52. }).add;
  53. )
  54.  
  55.  
  56.  
  57. (
  58. ~windNoise.free(4);
  59. ~intro1= Pbind(\instrument, \onSal ,\dur,24);
  60. )
  61.  
  62. (
  63. p.fadeTime = 4;
  64. ~intro1= Pbind(\instrument, \bpfsaw , \rel,0.05, \ts,1,\dur,Pseq([0.5,Pseq([1],inf)],inf),\freq, [110,150,180], \amp, 0.4);
  65. ~intro1.play;
  66. b.sendMsg("/cuboTraslaX", 30);
  67. )
  68. p.fadeTime=0;
  69. ~intro1.set(\ts,0.1);
  70.  
  71.  
  72.  
  73. ~h = Pbind(\instrument,\bplay,\buf,d["ch"][3],\dur,Pwhite(0.25,0.75).round(0.25),\amp,Pwhite(0.2,0.5));
  74.  
  75. ~h2 = Pbind(\instrument,\bplay,\buf,d["ch"][3],\dur,Pwhite(0.25,0.75).round(0.25),\amp,Pwhite(0.2,1),\rate,Pseq([1,2],inf)*2);
  76.  
  77. (
  78. ~intro1.free(3);~h.play;~h2.play; ~yuppa.free;
  79. b.sendMsg("/piramideView", 1);
  80. )
  81.  
  82.  
  83.  
  84. (
  85. ~t = Pbind(\instrument,\bplay,\buf,d["t"][0],\dur,Pseq([1,1,1,0.5],inf),\amp,0.5,\rate,1.5);
  86. ~t.play;
  87. )
  88.  
  89.  
  90. (
  91. p.clock.tempo = 2;
  92. ~k = Pbind(\instrument,\bplay,\buf,d["sk"][0],\dur,Pbjorklund2(3,8)/4,\amp,0.5,\rate,Pseq([1,1.2],inf));
  93. ~k.play;
  94. b.sendMsg("/piramideRotateX", 30);
  95. )
  96. //Evaluate this to get different permutations
  97. (
  98. ~k2 = Pbind(\instrument,\bplay,\buf,d["sk"][0],\dur,Pbjorklund2(3,8)/4,\amp,0.35,\rate,Pseq([1,1.8],inf)*4);
  99. ~k2.play;
  100. )
  101.  
  102.  
  103.  
  104.  
  105. // III° Part
  106.  
  107.  
  108. (
  109.  
  110.         SynthDef("looper",{ arg out=0,bufnum, vol=1;
  111.     var diskin;
  112.     diskin = (DiskIn.ar( 2, bufnum, 1))*vol;
  113.  
  114.     Out.ar(out, diskin)
  115.  
  116.         }).send(s);
  117.  
  118. )
  119.  
  120. (
  121. f = Buffer.cueSoundFile(s,"C:/Users/Mauro/Desktop/LiveCoding/Code/CODICE/AUDIOSAMPLE/IntroLake.wav"
  122. , 0, 2);
  123. )
  124.  
  125. (
  126. r = Synth.new("looper", [\bufnum,f.bufnum], s);
  127. b.sendMsg("/piramideTraslaY", 30);
  128. )
  129.  
  130. (
  131. r.free;
  132. f.free;
  133. ~bass1= Pbind(\instrument, \ring1 ,\a,6,\d,2,\dur,1, \amp,0.4);
  134. ~bass1.play;
  135.  
  136. ~k = Pbind(\instrument,\bplay,\buf,d["k"][0],\dur,1,\amp,0.5);
  137. ~k.play;
  138. b.sendMsg("/sferaView", 1);
  139. b.sendMsg("/cuboView", 0);
  140. )
  141.  
  142. (
  143. ~k.stop;
  144. ~intro1.set(\ts,0.2);
  145. )
  146.  
  147.  
  148. (
  149. //~k.play;
  150. ~oh = Pbind(\instrument,\bplay,\buf,d["ch"][0],\dur,Pseq([0.5,Pseq([1],inf)],inf),\amp,1);
  151. ~oh.play;
  152. )
  153.  
  154. (
  155. ~k.stop;
  156. ~intro1.set(\ts,3);
  157. )
  158.  
  159. (
  160. ~intro1.set(\ts,0.2);
  161. ~k.play;
  162. ~h = Pbind(\instrument,\bplay,\buf,d["ch"][0],\dur,0.25,\amp,Pwhite(0.1,0.4));
  163. ~h.play;
  164. )
  165.  
  166. ~k.stop;
  167.  
  168. (
  169. ~intro1.stop;
  170. ~sd = Pbind(\instrument,\bplay,\buf,d["s"][4],\dur,2,\amp,0.5);
  171. ~sd.play;
  172. ~bass1.set(\d,1);
  173. ~bass1.set(\amp, 0.35);
  174. )
  175.  
  176. (
  177. ~k.stop;
  178. ~bass1.stop;
  179. ~h.stop;
  180. ~sd.stop;
  181. )
  182.  
  183. (
  184. ~intro1.stop;
  185. ~k = Pbind(\instrument,\bplay,\buf,d["k"][0],\dur,Pwhite(0.25,0.5).round(0.25), \amp, 0.5);
  186. ~k.play;
  187. ~bass1.set(\d,1);
  188. ~h.play;
  189. ~bass1.play
  190. )
  191.  
  192.  
  193. (
  194. ~k.stop;
  195. ~k2 = Pbind(\instrument,\bplay,\buf,d["sk"][0],\dur,1,\amp,0.5);
  196. ~k2.play;
  197. )
  198.  
  199. // IV°
  200.  
  201. ~synth= Pbind(\instrument, \sinfb, \rel,0.5 ,\dur,Pseq([0.5,Pseq([1],inf)],inf),\freq, [110,150,180]);
  202.  
  203. (
  204. ~bass1.stop;
  205. ~synth.play;
  206. )
  207.  
  208. ~k2.stop;
  209.  
  210. (
  211. ~fx2.stop;
  212. ~k = Pbind(\instrument,\bplay,\buf,d["sk"][0],\dur,1,\amp,0.8);
  213. ~k.play;
  214. b.sendMsg("/sferaTraslaX", 30);
  215. )
  216.  
  217. ~sd = Pbind(\instrument,\bplay,\buf,d["s"][4],\dur,2,\amp,0.5);
  218. ~sd.play;
  219.  
  220.  
  221. ~filterSd = {LPF.ar(~sd, 200 , 3.5)};
  222. ~filterSd.play;
  223.  
  224.  
  225. ~verbSd= {FreeVerb.ar(~sd,0.33,0.5,0.8)};
  226. ~verbSd.play;
  227.  
  228.  
  229. (
  230. ~h = Pbind(\instrument,\bplay,\buf,d["ch"][0],\dur,0.5,\amp,Pwhite(0.1,0.3));
  231. ~h.play;
  232. )
  233.  
  234.  
  235. ~verbh= {FreeVerb.ar(~h,0.60,0.5,1)};
  236.  
  237. // game game game
  238. (
  239. ~k.stop;
  240. ~h.stop;
  241. )
  242.  
  243.  
  244. (
  245. ~k.play;
  246. ~verbh.play;
  247. )
  248. ~verbh.stop;
  249.  
  250. (
  251. { | atk = 0.01, dur = 0.15, freq = 50, amp=0.8 |
  252.     BPF.ar(LFSaw.ar(freq), freq, 2, mul: EnvGen.kr( Env.perc( atk, dur-atk, amp, 6 ), doneAction: 2 )) ! 2;
  253. }.asSynthDef.name_("bass").add;
  254. )
  255.  
  256.  
  257. (
  258. ~bass = Pbind(
  259.         \instrument, \bass,
  260.         \delta, 1/4,
  261.     //  \dur, Pkey(\delta) * Pfunc({ thisThread.clock.beatDur }),
  262.     \dur, 0.08,
  263.         \freq, Pseq([/*\r*/ 50,60,70].pyramid, inf),
  264.         \amp,0.3
  265. ))
  266.  
  267. ~bass.play;
  268. ~bass.set(\freq, 50);
  269.  
  270. ~filter = {MoogFF.ar(~bass, 2000, 3.5)};
  271.  
  272. ~filter.play;
  273. ~filter.stop;
  274.  
  275.  
  276.  
  277.  
  278. ///// simple bass 4 new track
  279.  
  280. (
  281. ~bass = Pbind(
  282.         \instrument, \bass,
  283.         \delta, 1/2, // !!!!!!!!!!!!!!!!!!
  284.  
  285.     \dur, 0.08,
  286.  
  287.         \amp,0.3
  288. ))
  289.  
  290.  
  291.  
  292. (
  293. ~h = Pbind(\instrument,\bplay,\buf,d["ch"][3],\dur,0.25,\amp,Pwhite(0.1,0.2));
  294. ~h.play;
  295. )
  296.  
  297. (
  298. ~sd = Pbind(\instrument,\bplay,\buf,d["s"][4],\dur,2,\amp,0.5);
  299. ~sd.play;
  300. )
  301.  
  302.  
  303.  
  304. ~filter = {MoogFF.ar(~bass, 100, 3.5)};
  305. ~filter.play;
  306. ~filter.stop;
  307.  
  308.  
  309. ~h2.free;
  310.  
  311. ///////////////
  312. // chiusura //
  313. /////////////
  314.  
  315. // Ndef
  316.  
  317. Ndef(\wind,~windNoise).stop;
  318.  
  319. ~yuppa.free;
  320.  
  321. // Synth
  322.  
  323. ~coin.free;
  324. ~filterYuppa.free;
  325. ~intro1.free;
  326.  
  327. ~h.free;
  328. ~h2.free;
  329. ~t.free;
  330. ~k.free;
  331. ~k2.free;
  332. ~bass1.free;
  333.  
  334. ~oh.free;
  335. ~sd.free;
  336. ~synth.free;
  337. ~filterSd.free;
  338. ~verbSd.free;
  339. ~verbh.free;
  340. ~bass.free;
  341. ~filter.free;
  342.  
  343.  
  344.  
  345.  
  346. (
  347. p.clear;
  348. Server.hardFreeAll;
  349. )
  350.  
  351. b.sendMsg("/cuboView", 1);
  352. b.sendMsg("/piramideView", 1);
  353. b.sendMsg("/sferaView", 1);
  354.  
  355. b.sendMsg("/cuboRotateX", 30);
  356. b.sendMsg("/piramideRotateX", 30);
  357. b.sendMsg("/sferaRotateX", 30);
  358.  
  359. b.sendMsg("/cuboTraslaX", 30);
  360. b.sendMsg("/piramideTraslaX", 30);
  361. b.sendMsg("/sferaTraslaX", 30);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement