1$nyquist plug-in
2$version 4
3$type process
4$preview linear
5$name (_ "High-Pass Filter")
6$manpage "High-Pass_Filter"
7$debugbutton disabled
8$action (_ "Performing High-Pass Filter...")
9$author (_ "Dominic Mazzoni")
10$release 2.3.0
11$copyright (_ "Released under terms of the GNU General Public License version 2")
12
13;; Released under terms of the GNU General Public License version 2:
14;; http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
15;;
16;; For information about writing and modifying Nyquist plug-ins:
17;; https://wiki.audacityteam.org/wiki/Nyquist_Plug-ins_Reference
18
19
20$control frequency (_ "Frequency (Hz)") float-text "" 1000 0 nil
21$control rolloff (_ "Roll-off (dB per octave)") choice (("dB6" (_ "6 dB"))
22                                                        ("dB12" (_ "12 dB"))
23                                                        ("dB24" (_ "24 dB"))
24                                                        ("dB36" (_ "36 dB"))
25                                                        ("dB48" (_ "48 dB"))) 0
26
27
28(cond
29  ((< frequency 0.1) (_ "Frequency must be at least 0.1 Hz."))
30  ((>= frequency (/ *sound-srate* 2.0))
31      (format nil (_ "Error:~%~%Frequency (~a Hz) is too high for track sample rate.~%~%~
32                   Track sample rate is ~a Hz~%~
33                   Frequency must be less than ~a Hz.")
34              frequency
35              *sound-srate*
36              (/ *sound-srate* 2.0)))
37  (T  (funcall (nth rolloff '(hp highpass2 highpass4 highpass6 highpass8))
38               *track* frequency)))
39