1declare name "Freeverb"; 2declare category "Reverb"; 3 4declare version "0.01"; 5declare author "brummer"; 6declare license "BSD"; 7declare copyright "(c)brummer 2008"; 8 9import("stdfaust.lib"); 10 11import("guitarix.lib"); 12 13/*----------------------------------------------- 14 freeverb by "Grame" 15 -----------------------------------------------*/ 16 17// Filter Parameters 18 19combtuningL1 = 1116; 20combtuningL2 = 1188; 21combtuningL3 = 1277; 22combtuningL4 = 1356; 23combtuningL5 = 1422; 24combtuningL6 = 1491; 25combtuningL7 = 1557; 26combtuningL8 = 1617; 27 28allpasstuningL1 = 556; 29allpasstuningL2 = 441; 30allpasstuningL3 = 341; 31allpasstuningL4 = 225; 32 33roomsizeSlider = vslider("RoomSize[name:Room Size]", 0.5, 0, 1, 0.025)*0.28 + 0.7; 34dampslider = vslider("damp[name:HF Damp]",0.5, 0, 1, 0.025); 35combfeed = roomsizeSlider; 36//wetslider = 0.5 + vslider("wet_dry[name:Wet/Dry]", 0, -0.5, 0.5, 0.1); 37wet_dry = vslider("wet_dry[name:Wet/Dry]", 50, 0, 100, 1) : /(100); 38dry = 1 - wet_dry; 39 40// Reverb components 41 42monoReverb(fb1, fb2, damp, spread) 43 = _ <: comb(combtuningL1+spread, fb1, damp), 44 comb(combtuningL2+spread, fb1, damp), 45 comb(combtuningL3+spread, fb1, damp), 46 comb(combtuningL4+spread, fb1, damp), 47 comb(combtuningL5+spread, fb1, damp), 48 comb(combtuningL6+spread, fb1, damp), 49 comb(combtuningL7+spread, fb1, damp), 50 comb(combtuningL8+spread, fb1, damp) 51 +> 52 allpass (allpasstuningL1+spread, fb2) 53 : allpass (allpasstuningL2+spread, fb2) 54 : allpass (allpasstuningL3+spread, fb2) 55 : allpass (allpasstuningL4+spread, fb2) 56 ; 57 58//---------------------------------------------------------------- 59 60fxctrl(g,w,Fx) = _ <: (*(g) <: _ + Fx ), *(1-w) +> _; 61process = _<:*(dry),(*(wet_dry):fxctrl(0.015,wet_dry, monoReverb(combfeed, 0.5, dampslider, 23))):>_; 62