;nyquist plug-in ;version 1 ;type process ;name "RFT-Stereo-Compressor" ;action "RFT-Stereo-Compressor" ;info " Analyzer mode: upper track: Attenuation lower track: Correlation" ;control tresh "Compressor Threshold" real "Percent" 10 0 100 ;control ratio "Compressor Ratio" real "Percent" 150 0 300 ;control ar-time "Attack / Release Time" real "Milliseconds" 2 1 20 ;control test "Analyze (0) " int "Compress (1)" 1 0 1 ; this plugin was written by edgar-rft@web.de and is released ; under terms of the GNU General Public License on May 4th 2005 ; in analyze mode the upper track represents the attenuation level ; and the lower track represents the stereo phase correlation. (setf sc-hp 300) (if (arrayp s) (cond ; Stereo ((= test 0) (vector (s-min (scale (/ ratio 100) (s-max (sum (lp (s-max (s-max (hp (aref s 0) sc-hp) (hp (aref s 1) sc-hp)) (s-max (scale -1 (hp (aref s 0) sc-hp)) (scale -1 (hp (aref s 1) sc-hp)))) (/ 1000.0 ar-time)) (/ tresh -100.0)) 0)) 1.0) (sum (aref s 0) (scale -1 (aref s 1))))) ((= test 1) (vector (mult (scale -1 (sum -1 (s-min (scale (/ ratio 100) (s-max (sum (lp (s-max (s-max (hp (aref s 0) sc-hp) (hp (aref s 1) sc-hp)) (s-max (scale -1 (hp (aref s 0) sc-hp)) (scale -1 (hp (aref s 1) sc-hp)))) (/ 1000.0 ar-time)) (/ tresh -100.0)) 0)) 1.0))) (aref s 0)) (mult (scale -1 (sum -1 (s-min (scale (/ ratio 100) (s-max (sum (lp (s-max (s-max (hp (aref s 0) sc-hp) (hp (aref s 1) sc-hp)) (s-max (scale -1 (hp (aref s 0) sc-hp)) (scale -1 (hp (aref s 1) sc-hp)))) (/ 1000.0 ar-time)) (/ tresh -100.0)) 0)) 1.0))) (aref s 1))))) (cond ; Mono ((= test 0) (s-min (scale (/ ratio 100) (s-max (sum (lp (s-max (hp s sc-hp) (scale -1 (hp s sc-hp))) (/ 1000.0 ar-time)) (/ tresh -100.0)) 0)) 1.0)) ((= test 1) (mult (scale -1 (sum -1 (s-min (scale (/ ratio 100) (s-max (sum (lp (s-max (hp s sc-hp) (scale -1 (hp s sc-hp))) (/ 1000000.0 ar-time)) (/ tresh -100.0)) 0)) 1.0))) s))))