Below is code for a bass tilt plug-in adapted from the 15-band equalizer plug-in by Josu Etxeberria and David Sky. It is designed to add “warmth” to a recording and works well with male vox by simulating proximity effect, like working a ribbon mic up close. It attenuates high frequencies in a diagonal ramp across the audio band. The one control, “warmth”, is the amount of attenuation in dB that will be applied to the highest frequency band (16 kHz). Less attenuation is applied as the frequency decreases, with no attenuation of the lowest band (25 Hz). Visualize a graphic equalizer with the controls set in a diagonal line with the lowest frequency band set to no attenuation and the higher-frequency bands set for gradually increasing attenuation (decreasing levels). Nothing is boosted in the plug-in due to the possible introduction of clipping.
;nyquist plug-in
;version 1
;type process
;name "Bass Tilt"
;action "Equalizing..."
;info "Bass Tilt"
; based on 15-band equalizer code by Josu Etxeberria and David Sky
; created on July 14, 2013
(setf width (/ 9.96578428466 15))
;control maxAtten "Warmth" real "db" 30 0 100
(setf maxAtten (- maxAtten))
; [convert to linear scale using octaves]
; [almost ten octaves between 20 Hz and 20 kHz]
(setf slope (/ maxAtten 19980))
(setf offset (mult 20 slope))
; calculate centers of different bands [in octaves above 20 Hz]
(setf center1 (mult width 0.5 (- (mult 1 2) 1)))
(setf center2 (mult width 0.5 (- (mult 2 2) 1)))
(setf center3 (mult width 0.5 (- (mult 3 2) 1)))
(setf center4 (mult width 0.5 (- (mult 4 2) 1)))
(setf center5 (mult width 0.5 (- (mult 5 2) 1)))
(setf center6 (mult width 0.5 (- (mult 6 2) 1)))
(setf center7 (mult width 0.5 (- (mult 7 2) 1)))
(setf center8 (mult width 0.5 (- (mult 8 2) 1)))
(setf center9 (mult width 0.5 (- (mult 9 2) 1)))
(setf center10 (mult width 0.5 (- (mult 10 2) 1)))
(setf center11 (mult width 0.5 (- (mult 11 2) 1)))
(setf center12 (mult width 0.5 (- (mult 12 2) 1)))
(setf center13 (mult width 0.5 (- (mult 13 2) 1)))
(setf center14 (mult width 0.5 (- (mult 14 2) 1)))
(setf center15 (mult width 0.5 (- (mult 15 2) 1)))
; convert centers [in octaves above 20 Hz] to frequency
(setf f1 (mult 20 (expt 2 center1)))
(setf f2 (mult 20 (expt 2 center2)))
(setf f3 (mult 20 (expt 2 center3)))
(setf f4 (mult 20 (expt 2 center4)))
(setf f5 (mult 20 (expt 2 center5)))
(setf f6 (mult 20 (expt 2 center6)))
(setf f7 (mult 20 (expt 2 center7)))
(setf f8 (mult 20 (expt 2 center8)))
(setf f9 (mult 20 (expt 2 center9)))
(setf f10 (mult 20 (expt 2 center10)))
(setf f11 (mult 20 (expt 2 center11)))
(setf f12 (mult 20 (expt 2 center12)))
(setf f13 (mult 20 (expt 2 center13)))
(setf f14 (mult 20 (expt 2 center14)))
(setf f15 (mult 20 (expt 2 center15)))
(setf fre1 ( - (mult f1 slope) offset))
(setf fre2 ( - (mult f2 slope) offset))
(setf fre3 ( - (mult f3 slope) offset))
(setf fre4 ( - (mult f4 slope) offset))
(setf fre5 ( - (mult f5 slope) offset))
(setf fre6 ( - (mult f6 slope) offset))
(setf fre7 ( - (mult f7 slope) offset))
(setf fre8 ( - (mult f8 slope) offset))
(setf fre9 ( - (mult f9 slope) offset))
(setf fre10 ( - (mult f10 slope) offset))
(setf fre11 ( - (mult f11 slope) offset))
(setf fre12 ( - (mult f12 slope) offset))
(setf fre13 ( - (mult f13 slope) offset))
(setf fre14 ( - (mult f14 slope) offset))
(setf fre15 ( - (mult f15 slope) offset))
; apply EQ to sound
(eq-band
(eq-band
(eq-band
(eq-band
(eq-band
(eq-band
(eq-band
(eq-band
(eq-band
(eq-band
(eq-band
(eq-band
(eq-band
(eq-band
(eq-band
s
f15 Fre15 width)
f14 Fre14 width)
f13 Fre13 width)
f12 Fre12 width)
f11 Fre11 width)
f10 Fre10 width)
f9 Fre9 width)
f8 Fre8 width)
f7 Fre7 width)
f6 Fre6 width)
f5 Fre5 width)
f4 Fre4 width)
f3 Fre3 width)
f2 Fre2 width)
f1 Fre1 width)
; Released under terms of the GNU Public License
; http://www.opensource.org/licenses/gpl-license.php