home *** CD-ROM | disk | FTP | other *** search
/ Mac Easy 2013 March / MAC_easy_03_2013.iso / Multimedia / audacity-macosx-ub-2.0.3.dmg / Audacity / plug-ins / highpass.ny < prev    next >
Encoding:
Audacity Nyquits plug-in  |  2013-01-18  |  1.3 KB  |  37 lines

  1. ;nyquist plug-in
  2. ;version 3
  3. ;type process
  4. ;categories "http://lv2plug.in/ns/lv2core#HighpassPlugin"
  5. ;name "High Pass Filter..."
  6. ;action "Performing High Pass Filter..."
  7. ;info "by Dominic Mazzoni, modified by David R. Sky\nReleased under GPL v2.\n"
  8.  
  9. ;; highpass.ny by Dominic Mazzoni
  10. ;; Modified by David R. Sky
  11. ;; Updated by Steve Daulton June 2012
  12. ;; Released under terms of the GNU General Public License version 2:
  13. ;; http://www.gnu.org/licenses/old-licenses/gpl-2.0.html .
  14.  
  15. ;; To enable the Q control, remove one semicolon from the start of lines 18 and 32
  16.  
  17. ;control rolloff "Rolloff (dB per octave)" choice "  6 dB,12 dB,24 dB,36 dB,48 dB" 0
  18. ;;control q "Filter quality (Q) for 12 dB rolloff" real "" 0.7071 .1 20
  19. ;control frequency "Cutoff frequency (Hz)" real "" 1000 1 20000
  20.  
  21. (cond 
  22.   ((> frequency (/ *sound-srate* 2))
  23.     (format nil 
  24.            "Cutoff frequency is set at ~a Hz but must not~%~
  25.            be greater than ~a Hz (half of the track sample rate)."
  26.            frequency
  27.            (truncate (/ *sound-srate* 2.0))))
  28.   ((<= frequency 1)
  29.     (format nil
  30.            "Cutoff frequency is set at ~a Hz~%but must be at least 1 Hz."
  31.            frequency))
  32. ; ((= rolloff 1)(highpass2 s frequency (max (min q 20) 0.1)))
  33.   (T 
  34.     (funcall 
  35.       (nth rolloff '(hp highpass2 highpass4 highpass6 highpass8))
  36.       s frequency)))
  37.