This function calculates the trill index of an sound wave object by analyzing the frequency modulation pattern over time. It can operate in either binary or continuous modes and provides options for generating visual plots of the trill activity. The function also identifies potential noise issues in the low- and mid-frequency ranges.
Usage
tai_folder(
folder = NULL,
recursive = FALSE,
list = NULL,
start = 0,
end = 1,
unit = "minutes",
channel = "each",
hpf = 0,
cutoff = -60,
n.windows = 120,
freq.res = 100,
plot = FALSE,
plot.title = NULL,
verbose = TRUE,
output.csv = "tai_results.csv",
n.cores = -1
)
Arguments
- folder
Character. The path to the folder containing the WAV 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. If provided, files outside the list will be excluded.
- 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
Channel or channels to be analyzed. Options are "left", "right", "each", and "mix".
- cutoff
Numeric. The cutoff in decibels for the spectrogram generation.
- n.windows
Numeric. Number of time windows to divide the signal into for analysis. Default is 60.
- freq.res
Numeric. Frequency resolution (Hz per bin) for the spectrogram analysis. Default is 100.
- plot
Logical. If TRUE, generates a plot of the trill index over time. Default is TRUE.
- plot.title
Character. The title to be used for the plot. Default is NULL.
- verbose
Logical. If TRUE, provides detailed output during the function's execution. Default is FALSE.
- wave
A wave object to be analyzed.