home *** CD-ROM | disk | FTP | other *** search
/ PC World 2007 July & August / PCWorld_2007-07-08_cd.bin / audio-video / reaper / reaper1861-install.exe / Effects / Guitar / wah < prev   
Text File  |  2007-02-12  |  1KB  |  49 lines

  1. // This effect Copyright (C) 2004 and later Cockos Incorporated
  2. // License: GPL - http://www.gnu.org/licenses/gpl.html
  3.  
  4. desc: wah
  5. slider1:0<0,1>position
  6. slider2:0.7<0,1>resonance (top) (0..1)
  7. slider3:0.1<0,1>resonance (bottom) (0..1)
  8. slider4:0.05<0,0.1>filter distortion
  9.  
  10. @slider
  11.  
  12. maxfreq=2000;
  13. minfreq=200;
  14. pos=slider1/.819;
  15. pos=1-pos;
  16. fh=minfreq+(pos)*(maxfreq-minfreq);
  17. fh<minfreq?fh=minfreq;
  18. fh>maxfreq?fh=maxfreq;
  19.  
  20. res = slider2*pos + slider3*(1-pos);
  21.  
  22. res=min(max(res,0.0),1);
  23. res*=res;
  24. drive=min(max(slider4,0),0.1); // 0 to 0.1
  25. freq = 2 * sin($pi*min(0.25,fh/(srate*2)));
  26. damp = min(2*(1-pow(res,0.25)), min(2,2/freq - freq*0.5));
  27. /*band*=0.3;
  28. notch*=0.3;
  29. low*=0.3;
  30. high*=0.3;
  31. */
  32.  
  33. @sample
  34.   in    = spl0;
  35.   notch = in - damp*band;
  36.   low   = low + freq*band;
  37.   high  = notch - low;
  38.   band  = freq*high + band - drive*band*band*band;
  39.   out   = 0.5*band;
  40.   notch = in - damp*band;
  41.   low   = low + freq*band;
  42.   high  = notch - low;
  43.   band  = freq*high + band - drive*band*band*band;
  44.   out  += 0.5*band;
  45.  
  46. spl0=band;
  47.  
  48.  
  49.