SHARE
TWEET

Untitled

a guest Jan 2nd, 2019 108 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  
  2.  
  3. b = Buffer.alloc(s,512,1,{|z|z.sine1Msg(1.0/[1,3,5,7,9,11,13,15,17])});
  4. c = Buffer.read(s, "~/dminor1.wav");
  5.  
  6. fork{
  7.     s.sync;
  8. ~sound = {
  9.     var sig;
  10.     var local;
  11.     var f = [30,60,15]*Lag.kr(TChoose.kr(Impulse.kr(0.05),[0.75, 0.5, 1]), 8);
  12.     sig = Mix(COsc.ar(b.bufnum,f + SinOsc.ar(f*25, 0, LFTri.kr(0.01).range(0, 10)), [0.1, 0.1001, 0.2], 0.2))*0.1;
  13. sig = sig;
  14. sig = LeakDC.ar(Ringz.ar(sig, TChoose.kr(Impulse.kr(0.1),[88, 97, 99, 100].midicps), LFTri.kr([0.05, 0.051]).range(0.2, 0.5)));
  15. sig = sig + Decimator.ar(sig, 48000*LFNoise0.kr(1).range(0.25, 1), TChoose.kr(Impulse.kr(4), [8, 12, 16, 24]), 0.4);
  16.     sig = LPF.ar(sig, 3000*LFTri.kr(0.01).range(0.1, 1));
  17.     sig = sig + (Splay.ar(Array.fill(4, {PlayBuf.ar(2, c, rrand(-0.8, 0.8), loop: 2)*0.01}), 0.5));
  18.     sig = CombC.ar(sig, 1.0, [0.1, 0.2], LFTri.kr(0.05).range(5, 9));
  19.  
  20.     local = sig + LocalIn.ar(2);
  21.     15.do({
  22.             local = AllpassN.ar(local, 0.06, Rand(0.001, 0.06), 3)
  23.           });
  24.     LocalOut.ar(local*0.4);
  25.  
  26.     Out.ar(0, Limiter.ar(LPF.ar(local, 4000), 0.8)*EnvGen.kr(Env([0, 1, 1, 0],[3, 100, 10])));
  27. }.play;
  28. }
  29.  
  30. (
  31. ~play = { | path, out = 0 |
  32.   if (~buffer.notNil) { ~buffer.free };
  33.     Buffer.read(
  34.         Server.default, path, action: { | buffer, out = 0 |
  35.             ~buffer = buffer;
  36.             ~synth = { | out = 0, amp1 = 1, amp2 = 1, amp3 = 1, amp4 = 1, amp5 = 1, amp6 = 1, amp7 = 1, amp8 = 1 |
  37.  
  38.                 var left, right;
  39.                 #left, right = PlayBuf.ar(2, buffer, BufRateScale.kr(buffer), doneAction: 2);
  40.                 //              Out.ar(out, [left, left, left, left, right, right, right, right])
  41.                 Out.ar(0, [left, left, left, left, right, right, right, right]
  42.                     * [amp1, amp2, amp3, amp4, amp5, amp6, amp7, amp8]
  43.                 )
  44.             }.play(args: [\out, out]);
  45.     })
  46. }
  47. )
  48.  
  49. SynthDef.new(\noiseOne, {
  50.     arg freq = 100, phase = 1.32, mul = 1.1, add = 1;
  51.     var modulator;
  52.     modulator = SinOsc.ar(freq, phase, mul, 0);
  53.     Out.ar(0, LPF.ar([PinkNoise.ar(modulator*0.33, 0), PinkNoise.ar(modulator*0.33, 0)]));
  54. }).add;
  55.  
  56.  
  57. SynthDef.new(\noiseTwo, {
  58.     arg freq = 100, phase = 1, mul = 0.1;
  59.     var modulator;
  60.     modulator = SinTone.ar(freq, phase, mul);
  61.     Out.ar(0, LPF.ar([PinkNoise.ar(modulator*0.2), PinkNoise.ar(modulator*0.2)]));
  62. }).add;
  63.  
  64. SynthDef.new(\noiseThree, {
  65.     arg freq = 500, phase = 1, mul = 0.9;
  66.     var modulator;
  67.     modulator = FSinOsc.ar(freq, phase, mul);
  68.     Out.ar(0, LPF.ar(DelayN.ar([PinkNoise.ar(modulator*0.1), PinkNoise.ar(modulator*0.1)])));
  69. }).add;
  70.  
  71.  
  72. SynthDef.new(\noiseFour, {
  73.     var n = PinkNoise.ar(), f = (0.01, 0.015 ..0.07);
  74.     v = LFTri.kr(f.scramble[5..7]).range(0.0001, 0.003);
  75.     Out.ar(0, DelayN.ar(Splay.ar( MembraneHexagon.ar(n, f.scramble[1..3], mul: v), SinOsc.kr(f.choose))))
  76. }).add;
  77.  
  78.  
  79. ~synth = ~play.();
  80.  
  81.  
  82. x = Synth.new(\noiseOne);
  83.  
  84. x.set(\mul, 10);
  85. x.set(\freq, 100);
  86. x.free;
  87.  
  88.  
  89. z = Synth.new(\noiseTwo);
  90. z.set(\freq, 5000);
  91. z.set(\mul, 10);
  92. z.free;
  93.  
  94. y = Synth.new(\noiseThree);
  95. y.set(\mul, 157);
  96. y.set(\freq, 500)
  97. y.free
  98.  
  99. a = Synth.new(\noiseFour);
  100. a.set(\mul, 3);
  101. a.free;
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top