Quantifies temporal variability in acoustic energy across frequency bins by comparing mean power spectra (MPS) between consecutive segments of an audio recording. Useful for identifying periods of rapid acoustic change in soundscapes.
Arguments
- wave
A
Wave
object (fromtuneR
package) containing the audio data.- fun
Function to apply in spectral calculation (
"mean"
,"var"
, etc.). Passed toseewave::meanspec(FUN)
.- segment_l
Length (in seconds) of each analysis segment. Longer segments provide better frequency resolution but fewer temporal comparisons (default: 5s).
- freq_res
Frequency resolution (in Hz) for spectral analysis. Higher values increase frequency binning (default: 50Hz).
- plot
Logical. If
TRUE
(default), generates a heatmap of spectral changes.
Value
A list with components:
dynamicity
: Scalar metric of overall acoustic variability (mean ΔMPS across all bins).delta_mps
: Matrix of absolute MPS differences between segments (frequency bins × time).dynamicity_vector
: Frequency-specific variability (sum of ΔMPS per bin).frequency
: Vector of frequency bins (kHz).time
: Vector of segment mid-point times (s).