Smol or mid-sized snippets of SuperCollider code that start in SuperCollider's Workspace Emacs buffer from scratch.
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.

49 lines
1.1 KiB

  1. ~delay1 = Bus.audio(s, 2);
  2. (
  3. SynthDef(\dlywrangler, {
  4. arg out=0, in, wet=0.1;
  5. var snd, dly2;
  6. snd = In.ar(in,2);
  7. dly2 = CombN.ar(HPF.ar(snd,300), 1, [0.5,0.77], 5, mul:LFNoise1.kr(0.1).range(0.8,0.3));
  8. snd = CombN.ar(snd, 1, Lag.ar(LFNoise0.ar(1).range(0.01,0.1),0.1), 3, mul:wet) + snd;
  9. snd = Limiter.ar(snd, 0.8);
  10. snd = snd + dly2;
  11. Out.ar(out, snd);
  12. }).add;
  13. SynthDef(\bap, {
  14. arg freq=440, gate=1, out=0, amp=0.1;
  15. var snd = Saw.ar([freq, freq*1.01]);
  16. var env = Linen.kr(gate, releaseTime: 0.1, doneAction:2);
  17. snd = snd + SinOsc.ar([freq*0.99, freq]);
  18. snd = snd + Pulse.ar([freq*0.99, freq]);
  19. snd = snd.clip2(LFNoise1.ar(0.3).range(0.3,0.8)) * 5;
  20. snd = snd.wrap2(LFNoise1.ar(0.3).range(0.3,0.8)) * 2;
  21. snd = snd.fold2(LFNoise1.ar(0.3).range(0.3,0.8)) * 5;
  22. snd = Limiter.ar(snd);
  23. snd = Splay.ar(snd);
  24. Out.ar(out, snd*env*amp);
  25. }).add;
  26. )
  27. ~dlywrang1 = Synth(\dlywrangler, [\out, 0, \in, ~delay1]);
  28. Pdef(\s2).play
  29. (
  30. Pbindef(\s2,
  31. \instrument, \bap,
  32. \degree, 0,
  33. \dur, 2,
  34. \octave, [2,3],
  35. \amp, 0.5,
  36. \legato, 1,
  37. \out, ~delay1,
  38. \dlywet, Pstutter(8, Pfunc({~dlywrang1.set(\wet, rrand(0, ((3..6) * 0.1).choose ) ) }))
  39. )
  40. )
  41. ~dlywrang1.free