home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World 2007 January
/
PCWorld_2007-01_cd.bin
/
temacd
/
reaper
/
reaper147-install.exe
/
Effects
/
Delay
/
delay_chorus
< prev
next >
Wrap
Text File
|
2005-06-24
|
1KB
|
52 lines
// This effect Copyright (C) 2004 and later Cockos Incorporated
// License: GPL - http://www.gnu.org/licenses/gpl.html
desc: delay with chorus
slider1:300<0,4000,20>delay (ms)
slider2:-6<-120,6,1>feedback (dB)
slider3:-6<-120,6,1>output wet w/ chorus (dB)
slider4:-6<-120,6,1>output wet w/o chorus (dB)
slider5:0<-120,6,1>output dry (dB)
slider6:500<1,1000,10>chorus period (ms)
slider7:2<0,100,1>chorus length (ms)
@init
delaypos=0;
@slider
odelay=delaylen;
delaylen=min(slider1 * srate / 1000,500000);
odelay != delaylen ? freembuf(delaylen*2);
wetmix = 2 ^ (slider2/6);
drymix = 1;
wetmix2 = 2 ^ (slider3/6);
wetmix3 = 2 ^ (slider4/6);
drymix2 = 2 ^ (slider5/6);
dppossc = $pi/(slider6 * srate * 0.001);
dpbacksc = min(max(slider7/slider1,0),1)*delaylen*0.5 - 1;
@sample
dppos = dppos+dppossc;
dpback = (sin(dppos)+1)*dpbacksc;
dpint = delaypos-dpback-1;
dpint < 0 ? dpint += delaylen;
dpint *= 2;
os1=dpint[0];
os2=dpint[1];
dpint = delaypos*2;
oss1=dpint[0];
oss2=dpint[1];
dpint[0]=min(max(spl0*drymix + oss1*wetmix,-4),4);
dpint[1]=min(max(spl1*drymix + oss2*wetmix,-4),4);
(delaypos+=1) >= delaylen ? delaypos=0;
spl0=spl0*drymix2 + os1*wetmix2 + oss1*wetmix3;
spl1=spl1*drymix2 + os2*wetmix2 + oss2*wetmix3;