Advertisement
Guest User

Untitled

a guest
Oct 23rd, 2016
178
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ( // This works!
  2. /*** SYNTHDEF: REVERB ***/
  3. SynthDef(\reverb, {
  4.     arg in, out=0 ,
  5.         predelay=0.1,
  6.         revtime=1.8,
  7.         lpf=4500,
  8.         mix=0.15, amp = 1;
  9.     var dry, wet, temp, sig;
  10.     dry = In.ar(in, 2);
  11.     temp = In.ar(in, 2);
  12.     wet = Silent.ar(2); // <---- !!!
  13.     temp = DelayN.ar(temp, 0, 2, predelay);
  14.     16.do{
  15.         temp = AllpassN.ar(temp, 0.05, {Rand(0.001, 0.05)}!2, revtime);
  16.         temp = LPF.ar(temp, lpf);// Damping
  17.         temp = wet+temp;
  18.     };
  19.     sig = XFade2.ar(dry, wet, mix*2-1, amp);
  20.     Out.ar(out, sig);
  21. }).add;
  22.  
  23. )
  24. ( // This results in "ERROR: XFade2 input 1 is not audio rate: 0 audio"
  25. /*** SYNTHDEF: REVERB ***/
  26. SynthDef(\reverb, {
  27.     arg in, out=0 ,
  28.         predelay=0.1,
  29.         revtime=1.8,
  30.         lpf=4500,
  31.         mix=0.15, amp = 1;
  32.     var dry, wet, temp, sig;
  33.     dry = In.ar(in, 2);
  34.     temp = In.ar(in, 2);
  35.     wet = 0;// <---- !!!
  36.     temp = DelayN.ar(temp, 0, 2, predelay);
  37.     16.do{
  38.         temp = AllpassN.ar(temp, 0.05, {Rand(0.001, 0.05)}!2, revtime);
  39.         temp = LPF.ar(temp, lpf);// Damping
  40.         temp = wet+temp;
  41.     };
  42.     sig = XFade2.ar(dry, wet, mix*2-1, amp);
  43.     Out.ar(out, sig);
  44. }).add;
  45.  
  46. )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement