2018-03-21 22:49:35 +00:00
|
|
|
$nyquist plug-in
|
|
|
|
$version 4
|
|
|
|
$type process
|
|
|
|
$preview linear
|
|
|
|
$name (_ "Notch Filter")
|
|
|
|
$manpage "Notch_Filter"
|
|
|
|
$debugbutton false
|
|
|
|
$action (_ "Applying Notch Filter...")
|
|
|
|
$author (_ "Steve Daulton and Bill Wharrie")
|
2018-07-02 21:41:33 +00:00
|
|
|
$release 2.3.0
|
2018-03-21 22:49:35 +00:00
|
|
|
$copyright (_ "Released under terms of the GNU General Public License version 2")
|
2011-02-15 08:24:35 +00:00
|
|
|
|
2017-05-23 11:27:48 +00:00
|
|
|
;; notch.ny by Steve Daulton and Bill Wharrie
|
2018-03-21 22:49:35 +00:00
|
|
|
|
2011-02-15 08:24:35 +00:00
|
|
|
;; Released under terms of the GNU General Public License version 2:
|
2018-03-21 22:49:35 +00:00
|
|
|
;; http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
|
|
|
|
;;
|
|
|
|
;; For information about writing and modifying Nyquist plug-ins:
|
|
|
|
;; https://wiki.audacityteam.org/wiki/Nyquist_Plug-ins_Reference
|
2011-02-15 08:24:35 +00:00
|
|
|
|
2015-08-19 14:25:55 +00:00
|
|
|
|
2018-03-21 22:49:35 +00:00
|
|
|
$control frequency (_ "Frequency (Hz)") float-text "" 60 0 nil
|
|
|
|
$control q (_ "Q (higher value reduces width)") float-text "" 1 0.1 1000
|
2015-08-19 14:25:55 +00:00
|
|
|
|
2015-08-23 17:37:09 +00:00
|
|
|
(cond
|
2018-03-21 22:49:35 +00:00
|
|
|
((< frequency 0.1) (_ "Frequency must be at least 0.1 Hz."))
|
2015-08-23 17:37:09 +00:00
|
|
|
((>= frequency (/ *sound-srate* 2.0))
|
2018-03-21 22:49:35 +00:00
|
|
|
(format nil (_ "Error:~%~%Frequency (~a Hz) is too high for track sample rate.~%~%~
|
2017-05-23 11:27:48 +00:00
|
|
|
Track sample rate is ~a Hz.~%~
|
2018-03-01 19:52:26 +00:00
|
|
|
Frequency must be less than ~a Hz.")
|
2017-05-23 11:27:48 +00:00
|
|
|
frequency
|
|
|
|
*sound-srate*
|
|
|
|
(/ *sound-srate* 2.0)))
|
2015-08-23 17:37:09 +00:00
|
|
|
(T (notch2 *track* frequency q)))
|