home *** CD-ROM | disk | FTP | other *** search
/ PC World 2007 March / PCWorld_2007-03_cd.bin / audio-video / reaper / reaper174-install.exe / Effects / Meters / vumeter < prev   
Text File  |  2005-06-24  |  565b  |  29 lines

  1. // This effect Copyright (C) 2004 and later Cockos Incorporated
  2. // License: GPL - http://www.gnu.org/licenses/gpl.html
  3.  
  4. desc: VU meter
  5. slider1:0,L volume (dB)
  6. slider2:0,R volume (dB)
  7. slider3:200, sample time (ms)
  8.  
  9. @init
  10.   sc=6/log(2);
  11.  
  12. @slider
  13.   sampletime=slider3*srate/1000;
  14.  
  15. @block
  16.  bscnt>sampletime ? 
  17.  (
  18.       slider1=log(peakvoll)*sc;
  19.       slider2=log(peakvolr)*sc; 
  20.       sliderchange(3); 
  21.       bscnt=peakvoll=peakvolr=0;
  22.  );
  23.  bscnt += samplesblock;
  24.  
  25. @sample
  26.  
  27. peakvoll=max(peakvoll,abs(spl0));
  28. peakvolr=max(peakvolr,abs(spl1));
  29.