mirror of
https://github.com/cookiengineer/audacity
synced 2025-10-11 09:03:36 +02:00
Simplify uses of catch
This commit is contained in:
@@ -53,16 +53,15 @@
|
||||
((< 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~%~
|
||||
(catch 'error-message
|
||||
(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*)))))
|
||||
(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."
|
||||
(multichan-expand #'result *track*)))))
|
||||
|
@@ -63,18 +63,17 @@
|
||||
(>= (get '*selection* 'high-hz)(/ *sound-srate* 2)))
|
||||
(remprop '*selection* 'high-hz))
|
||||
|
||||
(cond
|
||||
((not (get '*TRACK* 'VIEW)) ; 'View is NIL during Preview
|
||||
(setf p-err (format nil "This effect requires a frequency selection in the~%~
|
||||
(catch 'error-message
|
||||
(cond
|
||||
((not (get '*TRACK* 'VIEW)) ; 'View is NIL during Preview
|
||||
(setf p-err (format nil "This effect requires a frequency selection in the~%~
|
||||
'Spectral Selection' or 'Spectral Selection 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*)))))
|
||||
(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."
|
||||
(multichan-expand #'result *track*)))))
|
||||
|
||||
|
Reference in New Issue
Block a user