After further consideration, i think it makes more sense to mask/drown out sound at and below the desired cutoff point. Using equalizer to lower the dB level has the unsurprising but less than desirable effect of making everything much, much quieter. I suppose i can use equalizer a second time to boost the volume again, but this seems extra clunky and i’m slightly concerned about creating some sort of distortion from manipulating recordings multiple times.
I think a better option might be to add white noise to cover anything quieter. Generate > Noise looks perfect for this, but i haven’t figured out how this can be used as part of a chain since it overwrites each file rather than adding noise to and blending them. I came across this post earlier Adding background noise oder background muisc - #10 by steve and the AddNoise.ny plugin is really promising.
This approach can be used for mixing any type of generated sound with the currently selected audio, for example this plug-in (attached) has options for white noise, pink noise, crackle and wind noise.
I’m concerned that this doesn’t quite work though since the level of white noise produced by it is a ratio, rather than constant. My recordings from the field have varying levels of sound depending on the number, variety, and distance of species calling, but the added white noise should be at a constant level across all recordings.
In looking at the code, it seems like there are only two lines that need to be changed (9 and 13?) in order to get an amplitude level like the one found in Generate > Noise, but i have NO idea what to change them to. Looking at other examples hasn’t yielded much help, and i don’t have any experience with Nyquist outside of my time spent on this today.
;nyquist plug-in
;version 3
;type process
;categories "http://lv2plug.in/ns/lv2core#GeneratorPlugin"
;name "Add Noise ..."
;action "Adding Selected Noise ..."
;info "by 'Steve Daulton.\nReleased under GPL V2."
;control mix "Noise mix (%)" real "" 20 0 100
;control type "Type of Noise" choice "White,Pink,Crackle,Wind" 0
(setf mix (/ mix 100))
;;; Wind noise by Robert J. H.
(defun wind (gust speed)
(defmacro contour (scale offset min-wind max-wind)
`(sum ,offset
(mult ,scale
(s-abs (reson (noise) ,min-wind ,max-wind 1)))))
(mult 2
(contour 300 0.7 gust speed)
(sim (reson (noise) 593 80 2)
(reson (noise) (contour 300000 300 gust speed) 200 2))))
;;; pink noise
(defun pink ()
(setf params (list '(25600 -4 2.0) '(12800 -3 2.0) '(6400 -2 2.0) '(3200 -1 2.0)
'(1600 0 2.0) '(800 1 2.0) '(400 2 2.0) '(200 3 2.0) '(100 4 2.0)
'(50 5 2.0) '(25 6 2.0) '(12.5 7 2.0)))
(force-srate *sound-srate*
(sound-srate-abs 96000
(progn
(setf colour-noise (noise))
(dotimes (i (length params))
(setf colour-noise
(eq-band colour-noise
(first (nth i params))
(second (nth i params))
(third (nth i params)))))
(lowpass2 colour-noise 25600 0.5)))))
;;; crackle
(defun crackle (density)
(defun clicks ()
(let ((mynoise (mult 1.33 (lp (noise) 1000)))
(density (max
(- 0.9 density)
0.1)))
(clip
(mult (/ (- 1 density))
(diff (s-max mynoise density) density))
1.0)))
(sum (clicks) (mult -1 (clicks))))
;;; mix two mono sounds
(defun mono-mix (snd1 snd2 mix)
(sim (mult (- 1 mix) snd1)
(mult mix snd2)))
;; select the type of noise
(setf my-noise
(case type
(0 (noise))
(1 (pink))
(2 (crackle 0.4))
(t (let ((gustiness 0.2)
(wind-speed 0.2))
(wind gustiness wind-speed)))))
; stereo mix sound and noise
(multichan-expand #'mono-mix s my-noise mix)