Minimum decibel cutoff for large quantity of files

I’m a masters student using bioacoustic monitoring for my research this summer. I’m also a complete novice with all things audio. The question i have relates to distance and volume.

Here’s the short and sweet version of the background info: the remote recorders that i’ll be setting up can detect the loudest of my study species (Puerto Rican coquí frogs) at ~50 meters. There are areas that i’ll be working in where that is actually too far. I need to sample the variety of species on coffee farms, some of which have dimensions under 50m; with the mic’s sensitivity i’ll be picking up species from off of the farm (in the surrounding forest). This completely washes out my results from these farms.

My proposed solution: play a test tone at the frequency that the frogs call at (~1.5khz) and the volume that they call at (~100dB) at a distance of 35-40 meters (minimum dimension of the smallest farm). The idea being that i can then use this test tone on the recording as the minimum decibel cutoff for the recording. The software that i’ll use to run my analysis will be trained to recognize the various calls and once the minimum volume is set i’ll only record species on the farms. Is this a sound idea? (No pun intended.) I have two concerns with my solution, 1) i might lose some species on the farms that call at lower dB, which isn’t a huge issue as long as this is standardized across all locations; 2) i’m going to have about 144 1 minute recordings from 39 or so locations, for a total of 28,080 recordings. Which means i’ll need to be able to do this en masse, in some sort of batch editing. Is this possible?

My apologies if this isn’t the correct place on the forum, or if it’s outside of the scope of it. Like i said, i’m totally new to this and looking for any help i can get. This is waaay outside of the range of stuff that my advisor has experience with.

Thanks in advance for any and all input/feedback.
Kris

The technique you propose will work if you microphone is truly omni-directional, and if the sound level from the frogs is really that consistent. But my instinct is that you are going to have issues with frogs out in the forest that are enough louder, that you won’t be able to distinguish them from quieter frogs that are only 25m away.

I suspect the best solution (and also the most expensive and compute intensive) would be to deploy an array of microphones, and then use a combination of correlation (to find the same call in the different microphone recordings) and triangulation (based on the difference in delays) to locate the particular call.

The mics that i used over the summer were not omni-directional, and i only had a single recorder for each site, which unfortunately leaves triangulation out of the question. So far i’ve tried reducing the gain on the sidebar, and using amplify to reduce dB level, but i’m not having a lot of luck. Pretty much all of what i’ve found online relating to dB level has related to normalizing or amplifying, but i’m still at a loss for how to cut sound below my minimum required level.

Your concern over losing some quieter species is valid flynwill, but i’m hoping it ends up being a non-issue. I figure if i survey the unedited recordings as well as the adjusted recordings i can look at whether or not i’m losing and species. The species on which the test tones was based is the loudest amphibian on the island (and in the world, as i understand it), and the volume at which i played the tones was at the top of their range, so there shouldn’t be too much concern about exceptionally loud individuals making it past the cutoff from outside of the desired distance.

If there doesn’t exist an easy way to adjust minimum volume levels, the only other workaround i’ve come up with, but haven’t tried to implement yet, is to add a constant sound at the appropriate dB level to mask anything quieter than it. In theory this would still allow for analysis using the bioacoustic software.

Any advice or tips, of any kind is greatly appreciated.

Perhaps “Sound Activated Recording” is what you need: http://manual.audacityteam.org/man/transport_menu_transport_options.html#sound_activation_level

To remove sounds below a specified threshold level, use a “Noise Gate”. There’s a Noise Gate plug-in here: http://wiki.audacityteam.org/wiki/Nyquist_Effect_Plug-ins#Noise_Gate
Installation instructions are here: http://wiki.audacityteam.org/wiki/Download_Nyquist_Plug-ins#install

Noise Gate is really, really close to what i’m looking to do but doesn’t quite serve the exact need that i have, unless i’m using it incorrectly. Rather than removing noise when the recording drops below a set level, i need to remove all noise below a level across the entirety of a sound file. In the example sound file from the photo, i need to remove any and all noise from about -54 to -60 dB. (At 2:34 the test tone at 30m from the recorder starts, this is the noise level at which i’m trying to set the minimum and remove everything below).

If you mean that you want to remove quiet sounds that occur at the exact same time as louder sounds, that may not be possible.
What sort of “noise” do you want to remove?

I’m trying to remove any and all sounds below a threshold, determined by a test tone played on recordings at a specified distances in order to not count (ie. remove before analyzing the recordings) any amphibians calling from the same distance as the tone.

I think Effect > Equalization might have done the trick. I reduced dB level iteratively until the test tone at which i want to cut off sound can no longer be heard. This seems to have the desired outcome, and when i look at the sonogram in the analytical software the closer amphibian calls are still detectable, while the test tone and individuals calling from farther away are no longer detectable. Fingers crossed that there isn’t an as-of-yet unknown side effect of this method that negatively impacts the bioacoustic analyses.

Thank you for your suggestions!

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)

Line 9, from

;control mix "Noise mix (%)" real "" 20 0 100

to

;control level "Noise level (0 to 1)" real "" 0.5 0 1

Line 13 from

(setf mix (/ mix 100))

to

(setf mix level)

Lines 57 to 59 from

(defun mono-mix (snd1 snd2 mix)
  (sim (mult (- 1 mix) snd1)
    (mult mix snd2)))

to

(defun mono-mix (snd1 snd2 mix)
  (sim snd1
    (mult mix snd2)))

Thank you, Steve!