mirror of
https://github.com/cookiengineer/audacity
synced 2025-05-02 00:29:41 +02:00
Merge branch 'master'
This commit is contained in:
commit
732a98f3d9
@ -2,38 +2,38 @@
|
|||||||
;version 4
|
;version 4
|
||||||
;type process
|
;type process
|
||||||
;preview linear
|
;preview linear
|
||||||
;categories "http://lv2plug.in/ns/lv2core#HighpassPlugin"
|
|
||||||
;name "High Pass Filter..."
|
;name "High Pass Filter..."
|
||||||
;action "Performing High Pass Filter..."
|
;action "Performing High Pass Filter..."
|
||||||
;author "Dominic Mazzoni"
|
;author "Dominic Mazzoni"
|
||||||
;copyright "Released under terms of the GNU General Public License version 2"
|
;copyright "Released under terms of the GNU General Public License version 2"
|
||||||
|
|
||||||
;; highpass.ny by Dominic Mazzoni
|
;; highpass.ny by Dominic Mazzoni
|
||||||
;; Modified by David R. Sky
|
;; Last updated August 2015
|
||||||
;; Updated by Steve Daulton June 2012, 2015.
|
|
||||||
;; Released under terms of the GNU General Public License version 2:
|
;; Released under terms of the GNU General Public License version 2:
|
||||||
;; http://www.gnu.org/licenses/old-licenses/gpl-2.0.html .
|
;; http://www.gnu.org/licenses/old-licenses/gpl-2.0.html .
|
||||||
|
|
||||||
;; To enable the Q control, remove one semicolon from the start of lines 20 and 34
|
;control range "Frequency range" choice "Hz,kHz" 0
|
||||||
|
;control frequency "Frequency" real "" 1000 1 1000
|
||||||
;control rolloff "Rolloff (dB per octave)" choice " 6 dB,12 dB,24 dB,36 dB,48 dB" 0
|
;control rolloff "Rolloff (dB per octave)" choice " 6 dB,12 dB,24 dB,36 dB,48 dB" 0
|
||||||
;;control q "Filter quality (Q) for 12 dB rolloff" real "" 0.7071 .1 20
|
|
||||||
;control frequency "Cutoff frequency (Hz)" real "" 1000 1 20000
|
|
||||||
|
|
||||||
|
|
||||||
(cond
|
(case range
|
||||||
((> frequency (/ *sound-srate* 2))
|
(0 (setf f0 (format nil "~a Hz" frequency))
|
||||||
(format nil
|
(setf srate (format nil "~a Hz" *sound-srate*))
|
||||||
"Cutoff frequency is set at ~a Hz but must not~%~
|
(setf fmax (format nil "~a Hz" (/ *sound-srate* 2))))
|
||||||
be greater than ~a Hz (half of the track sample rate)."
|
(T (setf f0 (format nil "~a kHz" frequency))
|
||||||
frequency
|
(setf frequency (* frequency 1000))
|
||||||
(truncate (/ *sound-srate* 2.0))))
|
(setf srate (format nil "~a kHz" (/ *sound-srate* 1000)))
|
||||||
((< frequency 1)
|
(setf fmax (format nil "~a kHz" (/ *sound-srate* 2000)))))
|
||||||
(format nil
|
|
||||||
"Cutoff frequency is set at ~a Hz~%but must be at least 1 Hz."
|
|
||||||
frequency))
|
(if (>= frequency (/ *sound-srate* 2.0))
|
||||||
; ((= rolloff 1)(highpass2 s frequency (max (min q 20) 0.1)))
|
(format nil "Error:\nFrequency (~a) too high for track sample rate.~%~%~
|
||||||
(T
|
Track sample rate is ~a~%~
|
||||||
|
Frequency must be less than ~a."
|
||||||
|
f0
|
||||||
|
srate
|
||||||
|
fmax)
|
||||||
(funcall
|
(funcall
|
||||||
(nth rolloff '(hp highpass2 highpass4 highpass6 highpass8))
|
(nth rolloff '(hp highpass2 highpass4 highpass6 highpass8))
|
||||||
*track* frequency)))
|
*track* frequency))
|
||||||
|
@ -2,37 +2,38 @@
|
|||||||
;version 4
|
;version 4
|
||||||
;type process
|
;type process
|
||||||
;preview linear
|
;preview linear
|
||||||
;categories "http://lv2plug.in/ns/lv2core#LowpassPlugin"
|
|
||||||
;name "Low Pass Filter..."
|
;name "Low Pass Filter..."
|
||||||
;action "Performing Low Pass Filter..."
|
;action "Performing Low Pass Filter..."
|
||||||
;author "Dominic Mazzoni"
|
;author "Dominic Mazzoni"
|
||||||
;copyright "Released under terms of the GNU General Public License version 2"
|
;copyright "Released under terms of the GNU General Public License version 2"
|
||||||
|
|
||||||
;; lowpass.ny by Dominic Mazzoni
|
;; lowpass.ny by Dominic Mazzoni
|
||||||
;; Modified by David R. Sky
|
;; Last updated August 2015
|
||||||
;; Updated by Steve Daulton June 2012
|
|
||||||
;; Released under terms of the GNU General Public License version 2:
|
;; Released under terms of the GNU General Public License version 2:
|
||||||
;; http://www.gnu.org/licenses/old-licenses/gpl-2.0.html .
|
;; http://www.gnu.org/licenses/old-licenses/gpl-2.0.html .
|
||||||
|
|
||||||
;; To enable the Q control, remove one semicolon from the start of lines 20 and 34
|
;control range "Frequency range" choice "Hz,kHz" 0
|
||||||
|
;control frequency "Frequency" real "" 1000 1 1000
|
||||||
;control rolloff "Rolloff (dB per octave)" choice " 6 dB,12 dB,24 dB,36 dB,48 dB" 0
|
;control rolloff "Rolloff (dB per octave)" choice " 6 dB,12 dB,24 dB,36 dB,48 dB" 0
|
||||||
;;control q "Filter quality (Q) for 12 dB rolloff" real "" 0.7071 .1 20
|
|
||||||
;control frequency "Cutoff frequency (Hz)" real "" 1000 1 20000
|
|
||||||
|
|
||||||
(cond
|
|
||||||
((> frequency (/ *sound-srate* 2))
|
(case range
|
||||||
(format nil
|
(0 (setf f0 (format nil "~a Hz" frequency))
|
||||||
"Cutoff frequency is set at ~a Hz but must not~%~
|
(setf srate (format nil "~a Hz" *sound-srate*))
|
||||||
be greater than ~a Hz (half of the track sample rate)."
|
(setf fmax (format nil "~a Hz" (/ *sound-srate* 2))))
|
||||||
frequency
|
(T (setf f0 (format nil "~a kHz" frequency))
|
||||||
(truncate (/ *sound-srate* 2.0))))
|
(setf frequency (* frequency 1000))
|
||||||
((< frequency 1)
|
(setf srate (format nil "~a kHz" (/ *sound-srate* 1000)))
|
||||||
(format nil
|
(setf fmax (format nil "~a kHz" (/ *sound-srate* 2000)))))
|
||||||
"Cutoff frequency is set at ~a Hz~%but must be at least 1 Hz."
|
|
||||||
frequency))
|
|
||||||
; ((= rolloff 1)(lowpass2 s frequency (max (min q 20) 0.1)))
|
(if (>= frequency (/ *sound-srate* 2.0))
|
||||||
(T
|
(format nil "Error:\nFrequency (~a) too high for track sample rate.~%~%~
|
||||||
(funcall
|
Track sample rate is ~a~%~
|
||||||
|
Frequency must be less than ~a."
|
||||||
|
f0
|
||||||
|
srate
|
||||||
|
fmax)
|
||||||
|
(funcall
|
||||||
(nth rolloff '(lp lowpass2 lowpass4 lowpass6 lowpass8))
|
(nth rolloff '(lp lowpass2 lowpass4 lowpass6 lowpass8))
|
||||||
*track* frequency)))
|
*track* frequency))
|
||||||
|
@ -1,26 +1,37 @@
|
|||||||
;nyquist plug-in
|
;nyquist plug-in
|
||||||
;version 1
|
;version 4
|
||||||
;type process
|
;type process
|
||||||
;preview linear
|
;preview linear
|
||||||
;categories "http://lv2plug.in/ns/lv2core/#FilterPlugin"
|
|
||||||
;name "Notch Filter..."
|
;name "Notch Filter..."
|
||||||
;action "Performing Notch Filter..."
|
;action "Applying Notch Filter..."
|
||||||
;author "Steve Daulton and Bill Wharrie"
|
;author "Steve Daulton and Bill Wharrie"
|
||||||
;copyright "Released under terms of the GNU General Public License version 2"
|
;copyright "Released under terms of the GNU General Public License version 2"
|
||||||
|
|
||||||
;control freq "Frequency" real "Hz" 60 0 10000
|
|
||||||
;control q "Q (higher value reduces width)" real "" 1 0.1 20
|
|
||||||
|
|
||||||
;; notch.ny by Steve Daulton and Bill Wharrie, September 2010.
|
;; notch.ny by Steve Daulton and Bill Wharrie, September 2010.
|
||||||
|
;; Last updated August 2015.
|
||||||
;; Released under terms of the GNU General Public License version 2:
|
;; Released under terms of the GNU General Public License version 2:
|
||||||
;; http://www.gnu.org/licenses/old-licenses/gpl-2.0.html .
|
;; http://www.gnu.org/licenses/old-licenses/gpl-2.0.html .
|
||||||
|
|
||||||
;; (multichan-expand) provides legacy support for old versions of Audacity
|
;control range "Frequency range" choice "Hz,kHz" 0
|
||||||
;; in which the (notch2) function only supports mono tracks.
|
;control frequency "Frequency" real "" 60 1 1000
|
||||||
|
;control q "Q (higher value reduces width)" real "" 1 0.1 20
|
||||||
|
|
||||||
(cond
|
|
||||||
((> freq (/ *sound-srate* 2.0))(format nil "Error:\nFrequency too high for track sample rate."))
|
(case range
|
||||||
((< freq 0)(format nil "Error:\nNegative frequency is invalid."))
|
(0 (setf f0 (format nil "~a Hz" frequency))
|
||||||
((< q 0.01)(format nil "Error:\nWidth must be at least 0.01."))
|
(setf srate (format nil "~a Hz" *sound-srate*))
|
||||||
((= freq 0) (format nil "Nothing to be done."))
|
(setf fmax (format nil "~a Hz" (/ *sound-srate* 2))))
|
||||||
(T (multichan-expand #'notch2 s freq q)))
|
(T (setf f0 (format nil "~a kHz" frequency))
|
||||||
|
(setf frequency (* frequency 1000))
|
||||||
|
(setf srate (format nil "~a kHz" (/ *sound-srate* 1000)))
|
||||||
|
(setf fmax (format nil "~a kHz" (/ *sound-srate* 2000)))))
|
||||||
|
|
||||||
|
|
||||||
|
(if (>= frequency (/ *sound-srate* 2.0))
|
||||||
|
(format nil "Error:\nFrequency (~a) too high for track sample rate.~%~%~
|
||||||
|
Track sample rate is ~a~%~
|
||||||
|
Frequency must be less than ~a."
|
||||||
|
f0
|
||||||
|
srate
|
||||||
|
fmax)
|
||||||
|
(notch2 *track* frequency q))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user