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 / Utility / volume < prev   
Text File  |  2007-02-12  |  510b  |  25 lines

  1. // This effect Copyright (C) 2004 and later Cockos Incorporated
  2. // License: GPL - http://www.gnu.org/licenses/gpl.html
  3. desc: volume adjustment
  4. slider1:6<-150,150,1>adjustment (dB)
  5. slider2:0<-150,150,1>max volume (dB)
  6.  
  7. @slider
  8.   adj1=2 ^ (slider1/6); 
  9.   adj2=2 ^ (slider2/6);
  10.   doseek=1;
  11.  
  12. @block
  13. doseek ? (
  14.   dadj=(adj1-adj1_s)/samplesblock;
  15.   doseek=0;
  16. ):(
  17.   dadj=0;
  18.   adj1_s=adj1;
  19. );
  20.  
  21. @sample
  22. spl0=min(max(spl0*adj1_s,-adj2),adj2);
  23. spl1=min(max(spl1*adj1_s,-adj2),adj2);
  24. adj1_s+=dadj;
  25.