1 //======================================================
4 // Faster version using fixed delays (20% gain)
6 //======================================================
8 declare name "freeverb -- a Schroeder reverb";
9 declare author "Yann Orlarey";
10 declare version "1.0";
12 // Constant Parameters
13 //--------------------
23 initialwet = 1.0/scalewet;
44 allpasstuningL1 = 556;
45 allpasstuningL2 = 441;
46 allpasstuningL3 = 341;
47 allpasstuningL4 = 225;
51 //--------------------
52 // Damp : filtrage des aigus des echos (surtout actif pour des grandes valeurs de RoomSize)
53 // RoomSize : taille de la piece
54 // Dry : signal original
55 // Wet : signal avec reverb
\8eration
57 dampSlider = hslider("damp",0.5, 0, 1, 0.025)*scaledamp;
58 roomsizeSlider = hslider("roomsize", 0.5, 0, 1, 0.025)*scaleroom + offsetroom;
59 wetSlider = hslider("wet", 0.25, 0, 1, 0.025);
60 drySlider = hslider("dry", 0, 0, 1, 0.025);
61 combfeed = roomsizeSlider;
67 // Comb and Allpass filters
68 //-------------------------
70 allpass(dt,fb) = (_,_ <: (*(fb),_:+:@(dt)), -) ~ _ : (!,_);
72 comb(dt, fb, damp) = (+:@(dt)) ~ (*(1-damp) : (+ ~ *(damp)) : *(fb));
78 monoReverb(fb1, fb2, damp, spread)
79 = _ <: comb(combtuningL1+spread, fb1, damp),
80 comb(combtuningL2+spread, fb1, damp),
81 comb(combtuningL3+spread, fb1, damp),
82 comb(combtuningL4+spread, fb1, damp),
83 comb(combtuningL5+spread, fb1, damp),
84 comb(combtuningL6+spread, fb1, damp),
85 comb(combtuningL7+spread, fb1, damp),
86 comb(combtuningL8+spread, fb1, damp)
88 allpass (allpasstuningL1+spread, fb2)
89 : allpass (allpasstuningL2+spread, fb2)
90 : allpass (allpasstuningL3+spread, fb2)
91 : allpass (allpasstuningL4+spread, fb2)
94 stereoReverb(fb1, fb2, damp, spread)
95 = + <: monoReverb(fb1, fb2, damp, 0), monoReverb(fb1, fb2, damp, spread);
98 // fxctrl : add an input gain and a wet-dry control to a stereo FX
99 //----------------------------------------------------------------
101 fxctrl(g,w,Fx) = _,_ <: (*(g),*(g) : Fx : *(w),*(w)), *(1-w), *(1-w) +> _,_;
108 freeverb = vgroup("freeverb", fxctrl(fixedgain, wetSlider, stereoReverb(combfeed, allpassfeed, dampSlider, stereospread)));