1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-11-27 15:50:10 +01:00

Track view awareness removed from Spectral Edit effects as demanded by

Paul Licameli.
This commit is contained in:
Steve Daulton
2015-07-22 09:19:12 +01:00
parent aa54699cf4
commit 4d0e8f6c76
3 changed files with 10 additions and 39 deletions

View File

@@ -42,27 +42,15 @@
(env (snd-pwl 0.0 rate breakpoints)))
(cond
((not (or f0 f1))
(throw 'error-message (format nil "~aPlease select frequencies." p-err)))
(throw 'error-message "~aPlease select frequencies."))
((not f0)
(throw 'error-message (format nil "~aLow frequency is undefined." p-err)))
(throw 'error-message "~aLow frequency is undefined."))
((not f1)
(throw 'error-message (format nil "~aHigh frequency is undefined." p-err)))
(throw 'error-message "~aHigh frequency is undefined."))
((= bw 0)
(throw 'error-message (format nil "~aBandwidth is zero.~%Select a frequency range." p-err)))
(throw 'error-message "~aBandwidth is zero.~%Select a frequency range."))
;; If seleted frequency band is above Nyquist, do nothing.
((< f0 (/ *sound-srate* 2.0))
(sum (prod env (wet sig control-gain f0 f1)) (prod (diff 1.0 env) sig))))))
(cond
((not (get '*TRACK* 'VIEW)) ; 'View is NIL during Preview
(setf p-err (format nil "This effect requires a frequency selection in the~%~
'Spectrogram' or 'Spectrogram (log f)' track view.~%~%"))
(catch 'error-message
(multichan-expand #'result *track*)))
((string-not-equal (get '*TRACK* 'VIEW) "spectral" :end1 8 :end2 8)
"Use this effect in the 'Spectral Selection'\nor 'Spectral Selection log(f)' view.")
(T (setf p-err "")
(if (= control-gain 0) ; Allow dry preview
"Gain is zero. Nothing to do."
(catch 'error-message
(multichan-expand #'result *track*)))))
(catch 'error-message (multichan-expand #'result *track*))