Revert "Track view awareness removed from Spectral Edit effects as demanded by"
This reverts commit 4d0e8f6c76
.
This commit is contained in:
parent
4d0e8f6c76
commit
a0ebf3eb4a
|
@ -45,4 +45,7 @@
|
|||
(T (sum (prod env (wet sig f0 f1 fc))
|
||||
(prod (diff 1.0 env) sig))))))
|
||||
|
||||
(catch 'error-message (multichan-expand #'result *track*))
|
||||
(if (string-not-equal (get '*TRACK* 'VIEW) "spectral" :end1 8 :end2 8)
|
||||
"Use this effect in the 'Spectral Selection'\nor 'Spectral Selection log(f)' view."
|
||||
(catch 'error-message
|
||||
(multichan-expand #'result *track*)))
|
||||
|
|
|
@ -42,15 +42,27 @@
|
|||
(env (snd-pwl 0.0 rate breakpoints)))
|
||||
(cond
|
||||
((not (or f0 f1))
|
||||
(throw 'error-message "~aPlease select frequencies."))
|
||||
(throw 'error-message (format nil "~aPlease select frequencies." p-err)))
|
||||
((not f0)
|
||||
(throw 'error-message "~aLow frequency is undefined."))
|
||||
(throw 'error-message (format nil "~aLow frequency is undefined." p-err)))
|
||||
((not f1)
|
||||
(throw 'error-message "~aHigh frequency is undefined."))
|
||||
(throw 'error-message (format nil "~aHigh frequency is undefined." p-err)))
|
||||
((= bw 0)
|
||||
(throw 'error-message "~aBandwidth is zero.~%Select a frequency range."))
|
||||
(throw 'error-message (format nil "~aBandwidth is zero.~%Select a frequency range." p-err)))
|
||||
;; 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))))))
|
||||
|
||||
(catch 'error-message (multichan-expand #'result *track*))
|
||||
(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*)))))
|
||||
|
|
|
@ -47,9 +47,9 @@
|
|||
(env (snd-pwl 0.0 rate breakpoints)))
|
||||
(cond
|
||||
((not (or f0 f1))
|
||||
(throw 'error-message "Please select frequencies."))
|
||||
((and f0 f1 (= f0 f1))
|
||||
(throw 'error-message "Please select a frequency range."))
|
||||
(throw 'error-message (format nil "~aPlease select frequencies." p-err)))
|
||||
((and f0 f1 (= f0 f1)) (throw 'error-message
|
||||
"Please select a frequency range."))
|
||||
; shelf is above Nyquist frequency so do nothing
|
||||
((and f0 (>= f0 (/ *sound-srate* 2.0))) nil)
|
||||
(T (sum (prod env (wet sig control-gain f0 f1))
|
||||
|
@ -63,4 +63,18 @@
|
|||
(>= (get '*selection* 'high-hz)(/ *sound-srate* 2)))
|
||||
(remprop '*selection* 'high-hz))
|
||||
|
||||
(catch 'error-message (multichan-expand #'result *track*))
|
||||
(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*)))))
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user