home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World 2006 October
/
PCWorld_2006-10_cd.bin
/
audio-video
/
reaper
/
reaper105-install.exe
/
Effects
/
Misc
/
reverseness
< prev
next >
Wrap
Text File
|
2005-06-24
|
739b
|
36 lines
// This effect Copyright (C) 2004 and later Cockos Incorporated
// License: GPL - http://www.gnu.org/licenses/gpl.html
desc: reverseness (reverses chunks)
slider1:500<0,4000,10>length (ms)
slider2:-6<-120,6,1>wet mix (dB)
slider3:-6<-120,6,1>dry mix (dB)
slider4:0.1<0,1>edge overlap (0..1)
@init
pos=0;
@slider
len=srate*slider1/1000;
wet=2 ^ (slider2/6);
dry=2 ^ (slider3/6);
fadelen=len*slider4*0.5;
freembuf(len*2);
@sample
s0=((len-pos)*2)[0];
s1=((len-pos)*2)[1];
(pos*2)[0]=spl0;
(pos*2)[1]=spl1;
pp=len-pos;
w2=pp<fadelen ? pp/fadelen : (pp > len-fadelen?(len-pp)/fadelen:1);
spl0=s0*wet*w2 + spl0*(dry + 1-w2);
spl1=s1*wet*w2 + spl1*(dry + 1-w2);
(pos+=1)>=len ? pos=0;