home *** CD-ROM | disk | FTP | other *** search
/ PC World 2008 February / PCWorld_2008-02_cd.bin / audio-video / reaper / reaper2028-install.exe / Effects / Utility / bufsave < prev    next >
Text File  |  2007-12-03  |  713b  |  31 lines

  1. // This effect Copyright (C) 2004 and later Cockos Incorporated
  2. // License: GPL - http://www.gnu.org/licenses/gpl.html
  3. desc: buffer save/restore
  4.  
  5. slider1:0<0,100,1>slot
  6. slider2:0<-180,6,1>src->buf mix (dB)
  7. slider3:-180<-180,6,1>buf->buf mix (dB)
  8. slider4:-6<-180,6,1>buf->dst mix (dB)
  9. slider5:-6<-180,6,1>src->dst mix (dB)
  10.  
  11. @slider
  12. srcbufmix=2^(slider2/6);
  13. bufbufmix=2^(slider3/6);
  14. bufdstmix=2^(slider4/6);
  15. srcdstmix=2^(slider5/6);
  16.  
  17. @block
  18. bpos=slider1*samplesblock;
  19.  
  20. @sample
  21. os0=gmem[bpos*2];
  22. os1=gmem[bpos*2+1];
  23.  
  24. gmem[bpos*2]=spl0*srcbufmix+os0*bufbufmix;
  25. gmem[bpos*2+1]=spl1*srcbufmix+os1*bufbufmix;
  26.  
  27. spl0=spl0*srcdstmix+os0*bufdstmix;
  28. spl1=spl1*srcdstmix+os1*bufdstmix;
  29.  
  30. bpos+=2;
  31.