SuperCollider code written for smol release called 'noether'. https://music.lukaprincic.si/album/noether
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

92 lines
2.8 KiB

  1. /*
  2. matt
  3. written by Luka Prinčič for 'noether' release.
  4. you need the matthew_1-25.wav in a smp folder.
  5. */
  6. (
  7. Server.default.waitForBoot {
  8. Buffer.freeAll;
  9. // load buffers
  10. ~selfpath = PathName.new(thisProcess.nowExecutingPath).pathOnly;
  11. ~buf2 = Buffer.readChannel(s, ~selfpath +/+ "smp/matthew_1-25.wav", channels:1);
  12. SynthDef(\granulator, {
  13. var snd, mpos, clicks, env, glitch, nenv;
  14. // positions
  15. mpos = Demand.kr(Impulse.kr(1/64), 0, Dseq([
  16. 0.247, 0.295, 0.265, 0.39, 0.147, 0.275, 0.698, 0.242 ],inf));
  17. env = EnvGen.ar(
  18. Env([0, 0, 1, 0.5, 0.8, 0.5, 0.8, 0.5, 1, 0, 0],
  19. [ 0, 15, 1, 15, 1, 15, 1, 15.95, 0.05, 0 ], \sqr,
  20. releaseNode: 9, loopNode: 0),
  21. gate:1);
  22. snd = GrainBuf.ar(
  23. numChannels: 2,
  24. trigger: Impulse.ar(128 * LFNoise0.ar(128).range(1,1.4)),
  25. dur: 0.2,
  26. sndbuf: ~buf2,
  27. rate: [0.5, 1],
  28. pos: SinOsc.kr(1/64, phase:pi/2*3).range(mpos, mpos+0.01).poll(2, \pos)
  29. * LFNoise0.ar(128).range(1, 0.999),
  30. ) * 0.3;
  31. snd = LPF.ar(in: snd, freq: LFNoise1.ar(0.3).exprange(450,15000));
  32. snd = Splay.ar( [ snd[0][0] * 0.5, snd[0][1] ]
  33. + [ snd[1][1], snd[1][0] * 0.5 ], 1) * 2 ;
  34. snd = snd * LFPulse.kr(8).range(LFNoise1.kr([0.1,0.1]).range(
  35. EnvGen.kr(Env([1, 1, 0.5, 0.2, 1, 1],[64, 64, 256, 64, 64])),
  36. 1),1);
  37. snd = snd * LFPulse.kr(3).range(LFNoise1.kr([0.1,0.1]).range(
  38. EnvGen.kr(Env([1, 1, 0.8, 0.6, 1, 1],[64, 64, 256, 64, 64])),
  39. 1),1);
  40. clicks = HPF.ar(LFSaw.ar(8, 1, mul:LFNoise0.kr(2).range(0.02,0.05)), 1000);
  41. clicks = LPF.ar(in: clicks, freq: LFNoise1.ar(0.3).exprange(450,9000))
  42. * LFSaw.kr(1/16, iphase:1).range(0,1);
  43. clicks = clicks + LPF.ar(
  44. HPF.ar(
  45. LFSaw.ar(1, 0, mul:LFNoise0.kr(2).range(0.005,0.04)),
  46. LFNoise1.kr(1/8).range(500,4000)),
  47. 7000);
  48. clicks = clicks * EnvGen.kr(Env([0,0,1,1,0,0],[128,32,256,32,64]));
  49. glitch = GbmanN.ar(LFNoise0.kr(LFNoise0.kr(4).range(1,20)).exprange(240, SampleRate.ir));
  50. glitch = glitch * EnvGen.ar(Env(
  51. [0, 0, 0, 1, 1, 0, 0],
  52. [ 0, 16+15.75, 0, 0.25, 0, 0 ],
  53. \lin, 5, 0));
  54. glitch = BPF.ar(glitch, 1000) * LFNoise0.kr(1/16).range(0.005, 0.02);
  55. glitch = glitch * EnvGen.kr(Env([0,0,1,1,1,0],[256,128,64,64]));
  56. glitch = GVerb.ar(glitch, 100, 5, 0.8, 0.5, 30, 1, 0, 0.8);
  57. nenv = EnvGen.ar(Env([0,0,1,0,0], [0,32,0,0], 20, 3, 0));
  58. snd = snd * env * EnvGen.kr(Env([1,1,0],[512,0.1]));
  59. snd = Decimator.ar(snd, LFNoise1.kr(1/16).range(5000,22050), mul:-18.dbamp, add:snd);
  60. snd = CombL.ar(BPF.ar(snd, 1000), 1, [0.5,2/3], 8, add:snd);
  61. snd = snd + clicks;
  62. snd = snd + glitch;
  63. snd = snd +
  64. (PinkNoise.ar
  65. * nenv
  66. * LFNoise0.kr(1/16).range(0.005, 0.05)
  67. * EnvGen.kr(Env([0,0,1,1,0,0],[128,256,64,64]))
  68. );
  69. snd = snd * EnvGen.kr(Env([0, 1, 1, 0],[32, 512-32, 32], \sqr), doneAction:2);
  70. Out.ar(0,Limiter.ar(snd, 0.95));
  71. }).play;
  72. }
  73. )