wav2leq | R Documentation |
This function computes the Leq value of a time wave based on the properties of the recording chain, if known.
wav2leq(wave, f, channel = 1, gain, dt = 1, sensitivity = -35, Vadc = 2, pref = 2 * 10^-5)
wave |
an R object. |
f |
sampling frequency of |
channel |
channel of the R object, by default left channel (1). |
gain |
total gain applied to the sound (preamplifer + amplifier), in dB. |
dt |
integration time step, in s (by default 1 s). |
sensitivity |
sensitivity of the microphone, in dB/V (by default - 35 dB/V). |
Vadc |
maximal voltage (peak to peak) converted by the analog to digital convertor ADC, in V (by default 2 V). |
pref |
sound pressure reference in the medium, in Pa (by default = 2*10^-5 Pa in air). |
A numeric vector of length 1 returning the Leq value, in dB.
This function can be used to turn a recorder, as a Songmeter or an Audiomoth, in a kind of soundlevel meter.
Sylvain Haupert
wav2dBSPL
data(tico)
## with a 1 s time of integration (that is for the first time window)
wav2leq(tico, gain=18)
## with a 0.5 s time of integration (that is for 3 successive time windows)
wav2leq(tico, dt=0.5, gain=18)
## for the complete sound
wav2leq(tico, dt=duration(tico), gain=18)
## which is equivalent to
meandB(wav2dBSPL(tico, gain=18))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.