Skip to contents

Normalized Difference Soundscape Index (NDSI) from Kasten et al., et al. 2012. The NDSI seeks to "estimate the level of anthropogenic disturbance on the soundscape by computing the ratio of human-generated (anthrophony) to biological (biophony) acoustic components found in field collected sound samples" (Kasten, et al. 2012). This version is optimized to work with a path to the folder containing the audio files.

Usage

ndsi_folder(
  folder = NULL,
  recursive = recursive,
  list = NULL,
  start = 0,
  end = 1,
  unit = "minutes",
  w.len = 512,
  anthro.min = 1000,
  anthro.max = 2000,
  bio.min = 2000,
  bio.max = 11000,
  rm.offset = TRUE,
  output.csv = "ndsi_results.csv",
  n.cores = -1
)

Arguments

folder

a path to the folder containing the audio files.

recursive

Logical. Whether to search in subfolders. Default is TRUE.

list

An optional list (subset) of files in the folder to analyze.

start

numerical. Where to start reading the Wave.

end

numerical. Where to end reading the Wave.

unit

character. Unit of measurement for 'start' and 'end'. Options are 'samples', 'seconds', 'minutes', 'hours'. Default is 'minutes'.

w.len

numeric. Window length for the FFT (sampling rate / frequency resolution).

anthro.min

minimum value of the range of frequencies of the anthrophony.

anthro.max

maximum value of the range of frequencies of the anthrophony.

bio.min

minimum value of the range of frequencies of the biophony.

bio.max

maximum value of the range of frequencies of the biophony.

rm.offset

logical. Whether to remove the DC offset.

output.csv

character vector. When 'save.csv' is TRUE, optionally provide a file name. Default name is "ndsi_results.csv"

n.cores

The number of cores to use for parallel processing. Use n.cores = -1 to use all but one core. Default is NULL (single-core processing).

Value

a wide format tibble with NDSI values per channel (if stereo), parameters used and audio metadata

Examples

if (FALSE) { # \dontrun{
path <- readClipboard() #use this to paste the folder path from the clipboard.
ndsi_folder(path)
} # }