home *** CD-ROM | disk | FTP | other *** search
/ PC World 2007 January / PCWorld_2007-01_cd.bin / temacd / reaper / reaper147-install.exe / Effects / SStillwell / realoud < prev    next >
Encoding:
Text File  |  2006-08-14  |  1.9 KB  |  54 lines

  1. // Copyright 2006, Thomas Scott Stillwell
  2. // All rights reserved.
  3. //
  4. //Redistribution and use in source and binary forms, with or without modification, are permitted 
  5. //provided that the following conditions are met:
  6. //
  7. //Redistributions of source code must retain the above copyright notice, this list of conditions 
  8. //and the following disclaimer. 
  9. //
  10. //Redistributions in binary form must reproduce the above copyright notice, this list of conditions 
  11. //and the following disclaimer in the documentation and/or other materials provided with the distribution. 
  12.  
  13.  
  14. //
  15. //The name of Thomas Scott Stillwell may not be used to endorse or 
  16. //promote products derived from this software without specific prior written permission. 
  17.  
  18.  
  19. //
  20.  
  21.  
  22. //THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
  23. //IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
  24. //FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS 
  25. //BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 
  26. //(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 
  27. //PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 
  28. //STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 
  29. //THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  30. desc:realoud - makes it louder, duh...
  31.  
  32. slider1:0<0,100,0.1>mix%
  33.  
  34. @init
  35.  
  36.   pi = 3.1415926535;
  37.   halfpi = pi / 2;
  38.  
  39. @slider
  40.  
  41.   mix=slider1 / 100;
  42.   mix1 = 1 - mix;
  43.  
  44. @sample
  45.  
  46.   spl0=min(max(spl0,-1),1);
  47.   spl1=min(max(spl1,-1),1);
  48.  
  49.   dry0 = spl0;
  50.   dry1 = spl1;
  51.  
  52.   wet0 = sin(dry0 * halfpi);
  53.   wet1 = sin(dry1 * halfpi); 
  54.  
  55.   spl0 = mix1 * dry0 + mix * wet0;
  56.   spl1 = mix1 * dry1 + mix * wet1;
  57.