Skip to contents

NBAI describes the relative amount of narrow-band persistent sound activity, like that of Cicadas and Orthopterans. This index can be used to evaluate insect activity and their influence on other soundscape metrics (e.g., summary acoustic indices).

Usage

nbai_folder(
  folder = NULL,
  recursive = FALSE,
  list = NULL,
  start = 0,
  end = 1,
  unit = "minutes",
  channel = "each",
  hpf = 0,
  freq.res = 50,
  cutoff = -60,
  activity.cutoff = 10,
  output.csv = "nbai_results.csv",
  n.cores = -1,
  verbose = TRUE
)

Arguments

folder

Character. The path to the folder containing the wave files to analyze.

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'.

channel

Character. If Wave is stereo and you want to use only one channel, pass either "left" or "right" to this argument. If you want to analyze a mix of both channels, select "mix". If NULL (default), results are returned for each channel.

hpf

Numeric. High-pass filter. The default (500 Hz) should be used always for consistency unless signals of interest are below that threshold.

freq.res

Numeric. Frequency resolution in Hz. This value determines the "height" of each frequency bin and, therefore, the window length to be used (sampling rate / frequency resolution).

cutoff

Numeric. Cutoff threshold defining the sounds that will be analyzed, in dBFS.

activity.cutoff

Numeric. Cutoff percent activity. Only the frequency bands active equal or above this percentage will be considered as "active" in the active band statistics.

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).

verbose

Logical. If TRUE, details of dynamic range will be printed on the console.

Value

A list containing: 1) A binary spectrogram (if mono), 2) tibble with the Narrow-Band Activity Index (NBI) summary statistics, and 3) a tibble with NBI spectral, which number of rows equals the number of frequency bins in the analysis.

Examples

if (FALSE) { # \dontrun{
nbai(wave, channel = 'left', plot = TRUE, verbose = TRUE)
} # }